SectionReplacementTest.txt 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace Magento\AcceptanceTest\_default\Backend;
  3. use Magento\FunctionalTestingFramework\AcceptanceTester;
  4. use Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore;
  5. use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler;
  6. use \Codeception\Util\Locator;
  7. use Yandex\Allure\Adapter\Annotation\Features;
  8. use Yandex\Allure\Adapter\Annotation\Stories;
  9. use Yandex\Allure\Adapter\Annotation\Title;
  10. use Yandex\Allure\Adapter\Annotation\Description;
  11. use Yandex\Allure\Adapter\Annotation\Parameter;
  12. use Yandex\Allure\Adapter\Annotation\Severity;
  13. use Yandex\Allure\Adapter\Model\SeverityLevel;
  14. use Yandex\Allure\Adapter\Annotation\TestCaseId;
  15. /**
  16. */
  17. class SectionReplacementTestCest
  18. {
  19. /**
  20. * @Features({"TestModule"})
  21. * @Parameter(name = "AcceptanceTester", value="$I")
  22. * @param AcceptanceTester $I
  23. * @return void
  24. * @throws \Exception
  25. */
  26. public function SectionReplacementTest(AcceptanceTester $I)
  27. {
  28. $I->click("#element");
  29. $I->click("#foo");
  30. $I->waitForPageLoad(30);
  31. $I->click("#element .stringLiteral");
  32. $I->click("#stringLiteral1 .stringLiteral2");
  33. $I->click("#stringLiteral1-stringLiteral2 .stringLiteral3");
  34. $I->click("#stringLiteral1-stringLiteral2 .stringLiteral1 [stringLiteral3]");
  35. $I->click("#element .John");
  36. $I->click("#John .Doe");
  37. $I->click("#John-Doe .Tiberius");
  38. $I->click("#John-Doe .John [Tiberius]");
  39. $I->click("#element ." . msq("uniqueData") . "John");
  40. $I->click("#" . msq("uniqueData") . "John .stringLiteral2");
  41. $I->click("#" . msq("uniqueData") . "John-stringLiteral2 .stringLiteral3");
  42. $I->click("#" . msq("uniqueData") . "John-stringLiteral2 ." . msq("uniqueData") . "John [stringLiteral3]");
  43. $I->click("#element .Doe" . msq("uniqueData"));
  44. $I->click("#Doe" . msq("uniqueData") . " .stringLiteral2");
  45. $I->click("#Doe" . msq("uniqueData") . "-stringLiteral2 .stringLiteral3");
  46. $I->click("#Doe" . msq("uniqueData") . "-stringLiteral2 .Doe" . msq("uniqueData") . " [stringLiteral3]");
  47. $I->amGoingTo("create entity that has the stepKey: createdData");
  48. PersistedObjectHandler::getInstance()->createEntity(
  49. "createdData",
  50. "test",
  51. "simpleData",
  52. [],
  53. null
  54. );
  55. $I->click("#element ." . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test'));
  56. $I->click("#" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " .stringLiteral2");
  57. $I->click("#" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . "-stringLiteral2 .stringLiteral3");
  58. $I->click("#" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . "-stringLiteral2 ." . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " [stringLiteral3]");
  59. $I->click("#element .{$data}");
  60. $I->click("#{$data1} .{$data2}");
  61. $I->click("#{$data1}-{$data2} .{$data3}");
  62. $I->click("#John-Doe .John [Tiberius]");
  63. $I->click("#stringLiteral1-" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " .John");
  64. $I->click("#stringLiteral1-" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " .{$data}");
  65. $I->click("#stringLiteral1-" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " ." . msq("uniqueData") . "John");
  66. $I->click("#stringLiteral1-" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " .Doe" . msq("uniqueData"));
  67. $I->click("#element .1#element .2");
  68. $I->click("#element .1#element .{$data}");
  69. $I->click("(//div[@data-role='slide'])[1]/a[@data-element='link'][contains(@href,'')]");
  70. $I->click("(//div[@data-role='slide'])[1]/a[@data-element='link'][contains(@href,' ')]");
  71. }
  72. }