ActionGroupWithStepKeyReferences.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 ActionGroupWithStepKeyReferencesCest
  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 ActionGroupWithStepKeyReferences(AcceptanceTester $I)
  27. {
  28. $I->amGoingTo("create entity that has the stepKey: createSimpleDataActionGroup");
  29. PersistedObjectHandler::getInstance()->createEntity(
  30. "createSimpleDataActionGroup",
  31. "test",
  32. "simpleData",
  33. [],
  34. null
  35. );
  36. $grabTextDataActionGroup = $I->grabTextFrom(".class");
  37. $I->fillField(".{$grabTextDataActionGroup}", PersistedObjectHandler::getInstance()->retrieveEntityField('createSimpleDataActionGroup', 'field', 'test'));
  38. $I->comment("Invocation stepKey will not be appended in non stepKey instances");
  39. $I->click($action0);
  40. $I->fillField($action1);
  41. $I->comment("Invocation stepKey will be appended in non stepKey instances");
  42. $action3ActionGroup = $I->executeJS($action3ActionGroup);
  43. $action4ActionGroup = $I->magentoCLI($action4ActionGroup, "\"stuffHere\"");
  44. $I->comment($action4ActionGroup);
  45. $date = new \DateTime();
  46. $date->setTimestamp(strtotime("{$action5}"));
  47. $date->setTimezone(new \DateTimeZone("America/Los_Angeles"));
  48. $action5ActionGroup = $date->format("H:i:s");
  49. $action6ActionGroup = $I->formatMoney($action6ActionGroup);
  50. $I->amGoingTo("delete entity that has the createDataKey: {$action7ActionGroupActionGroup}");
  51. PersistedObjectHandler::getInstance()->deleteEntity(
  52. "{$action7ActionGroupActionGroup}",
  53. "test"
  54. );
  55. $I->amGoingTo("get entity that has the stepKey: action8ActionGroup");
  56. PersistedObjectHandler::getInstance()->getEntity(
  57. "action8ActionGroup",
  58. "test",
  59. "{$action8}",
  60. [],
  61. null
  62. );
  63. $I->amGoingTo("update entity that has the createdDataKey: 1");
  64. PersistedObjectHandler::getInstance()->updateEntity(
  65. "1",
  66. "test",
  67. "{$action9}",
  68. []
  69. );
  70. $I->amGoingTo("create entity that has the stepKey: action10ActionGroup");
  71. PersistedObjectHandler::getInstance()->createEntity(
  72. "action10ActionGroup",
  73. "test",
  74. "{$action10}",
  75. [],
  76. null
  77. );
  78. $action11ActionGroup = $I->grabAttributeFrom($action11ActionGroup, "someInput");
  79. $action12ActionGroup = $I->grabCookie($action12ActionGroup, ['domain' => 'www.google.com']);
  80. $action13ActionGroup = $I->grabFromCurrentUrl($action13ActionGroup);
  81. $action14ActionGroup = $I->grabMultiple($action14ActionGroup);
  82. $action15ActionGroup = $I->grabTextFrom($action15ActionGroup);
  83. $action16ActionGroup = $I->grabValueFrom($action16ActionGroup);
  84. }
  85. }