ActionGroupGenerationTest.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace tests\verification\Tests;
  7. use tests\util\MftfTestCase;
  8. class ActionGroupGenerationTest extends MftfTestCase
  9. {
  10. /**
  11. * Test generation of a test referencing an action group with no arguments
  12. *
  13. * @throws \Exception
  14. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  15. */
  16. public function testActionGroupWithNoArguments()
  17. {
  18. $this->generateAndCompareTest('ActionGroupWithNoArguments');
  19. }
  20. /**
  21. * Test generation of a test referencing an action group with default arguments and string selector
  22. *
  23. * @throws \Exception
  24. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  25. */
  26. public function testActionGroupWithDefaultArgumentAndStringSelectorParam()
  27. {
  28. $this->generateAndCompareTest('ActionGroupWithDefaultArgumentAndStringSelectorParam');
  29. }
  30. /**
  31. * Test generation of a test referencing an action group with passed arguments
  32. *
  33. * @throws \Exception
  34. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  35. */
  36. public function testActionGroupWithPassedArgumentAndStringSelectorParam()
  37. {
  38. $this->generateAndCompareTest('ActionGroupWithPassedArgumentAndStringSelectorParam');
  39. }
  40. /**
  41. * Test generation of a test referencing an action group with single parameter selector and default arguments
  42. *
  43. * @throws \Exception
  44. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  45. */
  46. public function testActionGroupWithSingleParameterSelectorFromDefaultArgument()
  47. {
  48. $this->generateAndCompareTest('ActionGroupWithSingleParameterSelectorFromDefaultArgument');
  49. }
  50. /**
  51. * Test generation of test referencing an action group with single parameter from a passed arguemnt
  52. *
  53. * @throws \Exception
  54. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  55. */
  56. public function testActionGroupWithSingleParameterSelectorFromPassedArgument()
  57. {
  58. $this->generateAndCompareTest('ActionGroupWithSingleParameterSelectorFromPassedArgument');
  59. }
  60. /**
  61. * Test generation of a test referencing an action group with multiple parameter selectors and default arguments
  62. *
  63. * @throws \Exception
  64. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  65. */
  66. public function testActionGroupWithMultipleParameterSelectorsFromDefaultArgument()
  67. {
  68. $this->generateAndCompareTest('ActionGroupWithMultipleParameterSelectorsFromDefaultArgument');
  69. }
  70. /**
  71. * Test generation of a test referencing an action group with simple passed data.
  72. *
  73. * @throws \Exception
  74. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  75. */
  76. public function testActionGroupWithSimpleDataUsageFromPassedArgument()
  77. {
  78. $this->generateAndCompareTest('ActionGroupWithSimpleDataUsageFromPassedArgument');
  79. }
  80. /**
  81. * Test generation of a test referencing an action group with default data.
  82. *
  83. * @throws \Exception
  84. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  85. */
  86. public function testActionGroupWithSimpleDataUsageFromDefaultArgument()
  87. {
  88. $this->generateAndCompareTest('ActionGroupWithSimpleDataUsageFromDefaultArgument');
  89. }
  90. /**
  91. * Test generation of a test referencing an action group that uses stepKey references (grabFrom/CreateData)
  92. *
  93. * @throws \Exception
  94. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  95. */
  96. public function testActionGroupWithStepKeyReferences()
  97. {
  98. $this->generateAndCompareTest('ActionGroupWithStepKeyReferences');
  99. }
  100. /**
  101. * Test generation of a test referencing an action group that uses stepKey references (grabFrom/CreateData)
  102. *
  103. * @throws \Exception
  104. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  105. */
  106. public function testActionGroupWithNestedArgument()
  107. {
  108. $this->generateAndCompareTest('ActionGroupUsingNestedArgument');
  109. }
  110. /**
  111. * Test generation of a test referencing an action group that uses stepKey references (grabFrom/CreateData)
  112. *
  113. * @throws \Exception
  114. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  115. */
  116. public function testActionGroupWithPersistedAndXmlEntityArguments()
  117. {
  118. $this->generateAndCompareTest('PersistedAndXmlEntityArguments');
  119. }
  120. /**
  121. * Test generation of a test referencing an action group which is referenced by another action group
  122. *
  123. * @throws \Exception
  124. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  125. */
  126. public function testActionGroupToExtend()
  127. {
  128. $this->generateAndCompareTest('ActionGroupToExtend');
  129. }
  130. /**
  131. * Test generation of a test referencing an action group that references another action group
  132. *
  133. * @throws \Exception
  134. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  135. */
  136. public function testExtendedActionGroup()
  137. {
  138. $this->generateAndCompareTest('ExtendedActionGroup');
  139. }
  140. /**
  141. * Test generation of a test referencing an action group that references another action group but removes an action
  142. *
  143. * @throws \Exception
  144. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  145. */
  146. public function testExtendedRemoveActionGroup()
  147. {
  148. $this->generateAndCompareTest('ExtendedRemoveActionGroup');
  149. }
  150. /**
  151. * Test generation of a test referencing an action group that uses stepKey references within the action group
  152. *
  153. * @throws \Exception
  154. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  155. */
  156. public function testActionGroupWithCreateData()
  157. {
  158. $this->generateAndCompareTest('ActionGroupUsingCreateData');
  159. }
  160. /**
  161. * Test an action group with an arg containing stepKey text
  162. *
  163. * @throws \Exception
  164. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  165. */
  166. public function testActionGroupWithArgContainingStepKey()
  167. {
  168. $this->generateAndCompareTest('ActionGroupContainsStepKeyInArgText');
  169. }
  170. /**
  171. * Test an action group with an arg containing stepKey text
  172. *
  173. * @throws \Exception
  174. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  175. */
  176. public function testActionGroupWithSkipReadiness()
  177. {
  178. $this->generateAndCompareTest('ActionGroupSkipReadiness');
  179. }
  180. /**
  181. * Test an action group with an arg containing stepKey text
  182. *
  183. * @throws \Exception
  184. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  185. */
  186. public function testActionGroupWithSectionAndDataArguments()
  187. {
  188. $this->generateAndCompareTest('ActionGroupWithSectionAndDataAsArguments');
  189. }
  190. /**
  191. * Test an action group with an arg that resolves into section.element with a hyphen in the parameter
  192. *
  193. * @throws \Exception
  194. * @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
  195. */
  196. public function testActionGroupWithHyphen()
  197. {
  198. $this->generateAndCompareTest('ActionGroupWithParameterizedElementWithHyphen');
  199. }
  200. }