ActionGroupWithNoDefaultTest.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. * @group functional
  17. */
  18. class ActionGroupWithNoDefaultTestCest
  19. {
  20. /**
  21. * @param AcceptanceTester $I
  22. * @throws \Exception
  23. */
  24. public function _before(AcceptanceTester $I)
  25. {
  26. $I->amGoingTo("create entity that has the stepKey: createPersonParam");
  27. PersistedObjectHandler::getInstance()->createEntity(
  28. "createPersonParam",
  29. "hook",
  30. "ReplacementPerson",
  31. [],
  32. null
  33. );
  34. $I->fillField("#foo", "myData1");
  35. $I->fillField("#bar", "myData2");
  36. }
  37. /**
  38. * @param AcceptanceTester $I
  39. * @throws \Exception
  40. */
  41. public function _after(AcceptanceTester $I)
  42. {
  43. $I->fillField("#foo", "myData1");
  44. $I->fillField("#bar", "myData2");
  45. }
  46. /**
  47. * @param AcceptanceTester $I
  48. * @throws \Exception
  49. */
  50. public function _failed(AcceptanceTester $I)
  51. {
  52. $I->saveScreenshot();
  53. }
  54. /**
  55. * @Severity(level = SeverityLevel::CRITICAL)
  56. * @Features({"TestModule"})
  57. * @Stories({"MQE-433"})
  58. * @Parameter(name = "AcceptanceTester", value="$I")
  59. * @param AcceptanceTester $I
  60. * @return void
  61. * @throws \Exception
  62. */
  63. public function ActionGroupWithNoDefaultTest(AcceptanceTester $I)
  64. {
  65. $I->amOnPage("/someUrl");
  66. $I->fillField("#foo", "Jane");
  67. $I->fillField("#bar", "Dane");
  68. $I->see("#Jane .Dane");
  69. $I->click("loginButton");
  70. }
  71. }