@testspectra/cli 1.0.59 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/bin/testspectra-runner +0 -0
  2. package/dist/commands/add.js +3 -9
  3. package/dist/commands/init.js +15 -15
  4. package/dist/commands/run.d.ts +1 -0
  5. package/dist/commands/run.js +22 -13
  6. package/dist/index.js +1 -0
  7. package/dist/server/demo.d.ts +8 -0
  8. package/dist/server/demo.js +104 -0
  9. package/dist/types/generator.d.ts +1 -1
  10. package/dist/types/generator.js +50 -15
  11. package/package.json +2 -2
  12. package/templates/default/.cursorrules +18 -0
  13. package/templates/default/CLAUDE.md +10 -0
  14. package/templates/default/fixtures/playgroundData.json +7 -0
  15. package/templates/default/global-hooks/after/mobile.hook.ts +3 -0
  16. package/templates/default/global-hooks/after/web.hook.ts +3 -0
  17. package/templates/default/global-hooks/before/mobile.hook.ts +3 -0
  18. package/templates/default/global-hooks/before/web.hook.ts +3 -0
  19. package/templates/default/package.json +5 -1
  20. package/templates/default/page-objects/MatchersPage/mobile.ts +21 -0
  21. package/templates/default/page-objects/MatchersPage/web.ts +23 -0
  22. package/templates/default/page-objects/NavigationPage/mobile.ts +5 -0
  23. package/templates/default/page-objects/NavigationPage/web.ts +8 -0
  24. package/templates/default/page-objects/PlaygroundPage/mobile.ts +26 -0
  25. package/templates/default/page-objects/PlaygroundPage/web.ts +29 -0
  26. package/templates/default/specs/BrowserContext/TC-0007-title-and-navigation/mobile.test.ts +3 -0
  27. package/templates/default/specs/BrowserContext/TC-0007-title-and-navigation/spec.md +12 -0
  28. package/templates/default/specs/BrowserContext/TC-0007-title-and-navigation/web.test.ts +5 -0
  29. package/templates/default/specs/BrowserContext/hooks/after/mobile.hook.ts +1 -0
  30. package/templates/default/specs/BrowserContext/hooks/after/web.hook.ts +1 -0
  31. package/templates/default/specs/BrowserContext/hooks/afterEach/mobile.hook.ts +1 -0
  32. package/templates/default/specs/BrowserContext/hooks/afterEach/web.hook.ts +1 -0
  33. package/templates/default/specs/BrowserContext/hooks/before/mobile.hook.ts +1 -0
  34. package/templates/default/specs/BrowserContext/hooks/before/web.hook.ts +1 -0
  35. package/templates/default/specs/BrowserContext/hooks/beforeEach/mobile.hook.ts +1 -0
  36. package/templates/default/specs/BrowserContext/hooks/beforeEach/web.hook.ts +1 -0
  37. package/templates/default/specs/BrowserContext/suite.md +9 -0
  38. package/templates/default/specs/ContentMatchers/TC-0005-text-and-values/mobile.test.ts +3 -0
  39. package/templates/default/specs/ContentMatchers/TC-0005-text-and-values/spec.md +12 -0
  40. package/templates/default/specs/ContentMatchers/TC-0005-text-and-values/web.test.ts +7 -0
  41. package/templates/default/specs/ContentMatchers/TC-0006-collections-and-empty/mobile.test.ts +3 -0
  42. package/templates/default/specs/ContentMatchers/TC-0006-collections-and-empty/spec.md +12 -0
  43. package/templates/default/specs/ContentMatchers/TC-0006-collections-and-empty/web.test.ts +6 -0
  44. package/templates/default/specs/ContentMatchers/hooks/after/mobile.hook.ts +1 -0
  45. package/templates/default/specs/ContentMatchers/hooks/after/web.hook.ts +1 -0
  46. package/templates/default/specs/ContentMatchers/hooks/afterEach/mobile.hook.ts +1 -0
  47. package/templates/default/specs/ContentMatchers/hooks/afterEach/web.hook.ts +1 -0
  48. package/templates/default/specs/ContentMatchers/hooks/before/mobile.hook.ts +1 -0
  49. package/templates/default/specs/ContentMatchers/hooks/before/web.hook.ts +1 -0
  50. package/templates/default/specs/ContentMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
  51. package/templates/default/specs/ContentMatchers/hooks/beforeEach/web.hook.ts +1 -0
  52. package/templates/default/specs/ContentMatchers/suite.md +9 -0
  53. package/templates/default/specs/ElementMatchers/TC-0003-visibility-and-dom/mobile.test.ts +3 -0
  54. package/templates/default/specs/ElementMatchers/TC-0003-visibility-and-dom/spec.md +12 -0
  55. package/templates/default/specs/ElementMatchers/TC-0003-visibility-and-dom/web.test.ts +5 -0
  56. package/templates/default/specs/ElementMatchers/TC-0004-states-and-attributes/mobile.test.ts +3 -0
  57. package/templates/default/specs/ElementMatchers/TC-0004-states-and-attributes/spec.md +12 -0
  58. package/templates/default/specs/ElementMatchers/TC-0004-states-and-attributes/web.test.ts +8 -0
  59. package/templates/default/specs/ElementMatchers/hooks/after/mobile.hook.ts +1 -0
  60. package/templates/default/specs/ElementMatchers/hooks/after/web.hook.ts +1 -0
  61. package/templates/default/specs/ElementMatchers/hooks/afterEach/mobile.hook.ts +1 -0
  62. package/templates/default/specs/ElementMatchers/hooks/afterEach/web.hook.ts +1 -0
  63. package/templates/default/specs/ElementMatchers/hooks/before/mobile.hook.ts +1 -0
  64. package/templates/default/specs/ElementMatchers/hooks/before/web.hook.ts +1 -0
  65. package/templates/default/specs/ElementMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
  66. package/templates/default/specs/ElementMatchers/hooks/beforeEach/web.hook.ts +1 -0
  67. package/templates/default/specs/ElementMatchers/suite.md +9 -0
  68. package/templates/default/specs/Playground/TC-0001-form-controls/mobile.test.ts +3 -0
  69. package/templates/default/specs/Playground/TC-0001-form-controls/spec.md +12 -0
  70. package/templates/default/specs/Playground/TC-0001-form-controls/web.test.ts +6 -0
  71. package/templates/default/specs/Playground/TC-0002-toggle-elements/mobile.test.ts +3 -0
  72. package/templates/default/specs/Playground/TC-0002-toggle-elements/spec.md +12 -0
  73. package/templates/default/specs/Playground/TC-0002-toggle-elements/web.test.ts +6 -0
  74. package/templates/default/specs/Playground/hooks/after/mobile.hook.ts +1 -0
  75. package/templates/default/specs/Playground/hooks/after/web.hook.ts +1 -0
  76. package/templates/default/specs/Playground/hooks/afterEach/mobile.hook.ts +1 -0
  77. package/templates/default/specs/Playground/hooks/afterEach/web.hook.ts +1 -0
  78. package/templates/default/specs/Playground/hooks/before/mobile.hook.ts +1 -0
  79. package/templates/default/specs/Playground/hooks/before/web.hook.ts +1 -0
  80. package/templates/default/specs/Playground/hooks/beforeEach/mobile.hook.ts +1 -0
  81. package/templates/default/specs/Playground/hooks/beforeEach/web.hook.ts +1 -0
  82. package/templates/default/specs/Playground/suite.md +9 -0
  83. package/templates/default/spectra.config.ts +1 -1
  84. package/templates/default/support/actions/fillCredentials/mobile.action.ts +4 -0
  85. package/templates/default/support/actions/fillCredentials/web.action.ts +4 -0
  86. package/templates/default/support/steps/togglePlaygroundStates/mobile.step.ts +3 -0
  87. package/templates/default/support/steps/togglePlaygroundStates/step.md +7 -0
  88. package/templates/default/support/steps/togglePlaygroundStates/web.step.ts +5 -0
  89. package/templates/default/support/steps/verifyPlaygroundState/mobile.step.ts +4 -0
  90. package/templates/default/support/steps/verifyPlaygroundState/step.md +7 -0
  91. package/templates/default/support/steps/verifyPlaygroundState/web.step.ts +6 -0
  92. package/templates/default/tsconfig.spectra.android.json +7 -4
  93. package/templates/default/tsconfig.spectra.ios.json +7 -4
  94. package/templates/default/tsconfig.spectra.web.json +10 -6
  95. package/templates/nx/.cursorrules +18 -0
  96. package/templates/nx/CLAUDE.md +10 -0
  97. package/templates/nx/fixtures/playgroundData.json +7 -0
  98. package/templates/nx/global-hooks/after/mobile.hook.ts +3 -0
  99. package/templates/nx/global-hooks/after/web.hook.ts +3 -0
  100. package/templates/nx/global-hooks/before/mobile.hook.ts +3 -0
  101. package/templates/nx/global-hooks/before/web.hook.ts +3 -0
  102. package/templates/nx/package.json +1 -1
  103. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/TC-0007-title-and-navigation/mobile.test.ts +3 -0
  104. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/TC-0007-title-and-navigation/spec.md +12 -0
  105. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/TC-0007-title-and-navigation/web.test.ts +5 -0
  106. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/after/mobile.hook.ts +1 -0
  107. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/after/web.hook.ts +1 -0
  108. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/afterEach/mobile.hook.ts +1 -0
  109. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/afterEach/web.hook.ts +1 -0
  110. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/before/mobile.hook.ts +1 -0
  111. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/before/web.hook.ts +1 -0
  112. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/beforeEach/mobile.hook.ts +1 -0
  113. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/beforeEach/web.hook.ts +1 -0
  114. package/templates/nx/packages/matchers/e2e/specs/BrowserContext/suite.md +9 -0
  115. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0005-text-and-values/mobile.test.ts +3 -0
  116. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0005-text-and-values/spec.md +12 -0
  117. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0005-text-and-values/web.test.ts +7 -0
  118. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0006-collections-and-empty/mobile.test.ts +3 -0
  119. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0006-collections-and-empty/spec.md +12 -0
  120. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0006-collections-and-empty/web.test.ts +6 -0
  121. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/after/mobile.hook.ts +1 -0
  122. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/after/web.hook.ts +1 -0
  123. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/afterEach/mobile.hook.ts +1 -0
  124. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/afterEach/web.hook.ts +1 -0
  125. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/before/mobile.hook.ts +1 -0
  126. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/before/web.hook.ts +1 -0
  127. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
  128. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/beforeEach/web.hook.ts +1 -0
  129. package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/suite.md +9 -0
  130. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0003-visibility-and-dom/mobile.test.ts +3 -0
  131. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0003-visibility-and-dom/spec.md +12 -0
  132. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0003-visibility-and-dom/web.test.ts +5 -0
  133. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0004-states-and-attributes/mobile.test.ts +3 -0
  134. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0004-states-and-attributes/spec.md +12 -0
  135. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0004-states-and-attributes/web.test.ts +8 -0
  136. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/after/mobile.hook.ts +1 -0
  137. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/after/web.hook.ts +1 -0
  138. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/afterEach/mobile.hook.ts +1 -0
  139. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/afterEach/web.hook.ts +1 -0
  140. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/before/mobile.hook.ts +1 -0
  141. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/before/web.hook.ts +1 -0
  142. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
  143. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/beforeEach/web.hook.ts +1 -0
  144. package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/suite.md +9 -0
  145. package/templates/nx/packages/playground/e2e/specs/Playground/TC-0001-form-controls/mobile.test.ts +3 -0
  146. package/templates/nx/packages/playground/e2e/specs/Playground/TC-0001-form-controls/spec.md +12 -0
  147. package/templates/nx/packages/playground/e2e/specs/Playground/TC-0001-form-controls/web.test.ts +6 -0
  148. package/templates/nx/packages/playground/e2e/specs/Playground/TC-0002-toggle-elements/mobile.test.ts +3 -0
  149. package/templates/nx/packages/playground/e2e/specs/Playground/TC-0002-toggle-elements/spec.md +12 -0
  150. package/templates/nx/packages/playground/e2e/specs/Playground/TC-0002-toggle-elements/web.test.ts +6 -0
  151. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/after/mobile.hook.ts +1 -0
  152. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/after/web.hook.ts +1 -0
  153. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/afterEach/mobile.hook.ts +1 -0
  154. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/afterEach/web.hook.ts +1 -0
  155. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/before/mobile.hook.ts +1 -0
  156. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/before/web.hook.ts +1 -0
  157. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/beforeEach/mobile.hook.ts +1 -0
  158. package/templates/nx/packages/playground/e2e/specs/Playground/hooks/beforeEach/web.hook.ts +1 -0
  159. package/templates/nx/packages/playground/e2e/specs/Playground/suite.md +9 -0
  160. package/templates/nx/page-objects/MatchersPage/mobile.ts +21 -0
  161. package/templates/nx/page-objects/MatchersPage/web.ts +23 -0
  162. package/templates/nx/page-objects/NavigationPage/mobile.ts +5 -0
  163. package/templates/nx/page-objects/NavigationPage/web.ts +8 -0
  164. package/templates/nx/page-objects/PlaygroundPage/mobile.ts +26 -0
  165. package/templates/nx/page-objects/PlaygroundPage/web.ts +29 -0
  166. package/templates/nx/shared/testing/fixtures/playgroundData.json +7 -0
  167. package/templates/nx/shared/testing/global-hooks/after/mobile.hook.ts +3 -0
  168. package/templates/nx/shared/testing/global-hooks/after/web.hook.ts +3 -0
  169. package/templates/nx/shared/testing/global-hooks/before/mobile.hook.ts +3 -0
  170. package/templates/nx/shared/testing/global-hooks/before/web.hook.ts +3 -0
  171. package/templates/nx/shared/testing/page-objects/MatchersPage/mobile.ts +21 -0
  172. package/templates/nx/shared/testing/page-objects/MatchersPage/web.ts +23 -0
  173. package/templates/nx/shared/testing/page-objects/NavigationPage/mobile.ts +5 -0
  174. package/templates/nx/shared/testing/page-objects/NavigationPage/web.ts +8 -0
  175. package/templates/nx/shared/testing/page-objects/PlaygroundPage/mobile.ts +26 -0
  176. package/templates/nx/shared/testing/page-objects/PlaygroundPage/web.ts +29 -0
  177. package/templates/nx/shared/testing/support/actions/fillCredentials/mobile.action.ts +4 -0
  178. package/templates/nx/shared/testing/support/actions/fillCredentials/web.action.ts +4 -0
  179. package/templates/nx/shared/testing/support/steps/togglePlaygroundStates/mobile.step.ts +3 -0
  180. package/templates/nx/shared/testing/support/steps/togglePlaygroundStates/step.md +7 -0
  181. package/templates/nx/shared/testing/support/steps/togglePlaygroundStates/web.step.ts +5 -0
  182. package/templates/nx/shared/testing/support/steps/verifyPlaygroundState/mobile.step.ts +4 -0
  183. package/templates/nx/shared/testing/support/steps/verifyPlaygroundState/step.md +7 -0
  184. package/templates/nx/shared/testing/support/steps/verifyPlaygroundState/web.step.ts +6 -0
  185. package/templates/nx/specs/BrowserContext/TC-0007-title-and-navigation/mobile.test.ts +3 -0
  186. package/templates/nx/specs/BrowserContext/TC-0007-title-and-navigation/spec.md +12 -0
  187. package/templates/nx/specs/BrowserContext/TC-0007-title-and-navigation/web.test.ts +5 -0
  188. package/templates/nx/specs/BrowserContext/hooks/after/mobile.hook.ts +1 -0
  189. package/templates/nx/specs/BrowserContext/hooks/after/web.hook.ts +1 -0
  190. package/templates/nx/specs/BrowserContext/hooks/afterEach/mobile.hook.ts +1 -0
  191. package/templates/nx/specs/BrowserContext/hooks/afterEach/web.hook.ts +1 -0
  192. package/templates/nx/specs/BrowserContext/hooks/before/mobile.hook.ts +1 -0
  193. package/templates/nx/specs/BrowserContext/hooks/before/web.hook.ts +1 -0
  194. package/templates/nx/specs/BrowserContext/hooks/beforeEach/mobile.hook.ts +1 -0
  195. package/templates/nx/specs/BrowserContext/hooks/beforeEach/web.hook.ts +1 -0
  196. package/templates/nx/specs/BrowserContext/suite.md +9 -0
  197. package/templates/nx/specs/ContentMatchers/TC-0005-text-and-values/mobile.test.ts +3 -0
  198. package/templates/nx/specs/ContentMatchers/TC-0005-text-and-values/spec.md +12 -0
  199. package/templates/nx/specs/ContentMatchers/TC-0005-text-and-values/web.test.ts +7 -0
  200. package/templates/nx/specs/ContentMatchers/TC-0006-collections-and-empty/mobile.test.ts +3 -0
  201. package/templates/nx/specs/ContentMatchers/TC-0006-collections-and-empty/spec.md +12 -0
  202. package/templates/nx/specs/ContentMatchers/TC-0006-collections-and-empty/web.test.ts +6 -0
  203. package/templates/nx/specs/ContentMatchers/hooks/after/mobile.hook.ts +1 -0
  204. package/templates/nx/specs/ContentMatchers/hooks/after/web.hook.ts +1 -0
  205. package/templates/nx/specs/ContentMatchers/hooks/afterEach/mobile.hook.ts +1 -0
  206. package/templates/nx/specs/ContentMatchers/hooks/afterEach/web.hook.ts +1 -0
  207. package/templates/nx/specs/ContentMatchers/hooks/before/mobile.hook.ts +1 -0
  208. package/templates/nx/specs/ContentMatchers/hooks/before/web.hook.ts +1 -0
  209. package/templates/nx/specs/ContentMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
  210. package/templates/nx/specs/ContentMatchers/hooks/beforeEach/web.hook.ts +1 -0
  211. package/templates/nx/specs/ContentMatchers/suite.md +9 -0
  212. package/templates/nx/specs/ElementMatchers/TC-0003-visibility-and-dom/mobile.test.ts +3 -0
  213. package/templates/nx/specs/ElementMatchers/TC-0003-visibility-and-dom/spec.md +12 -0
  214. package/templates/nx/specs/ElementMatchers/TC-0003-visibility-and-dom/web.test.ts +5 -0
  215. package/templates/nx/specs/ElementMatchers/TC-0004-states-and-attributes/mobile.test.ts +3 -0
  216. package/templates/nx/specs/ElementMatchers/TC-0004-states-and-attributes/spec.md +12 -0
  217. package/templates/nx/specs/ElementMatchers/TC-0004-states-and-attributes/web.test.ts +8 -0
  218. package/templates/nx/specs/ElementMatchers/hooks/after/mobile.hook.ts +1 -0
  219. package/templates/nx/specs/ElementMatchers/hooks/after/web.hook.ts +1 -0
  220. package/templates/nx/specs/ElementMatchers/hooks/afterEach/mobile.hook.ts +1 -0
  221. package/templates/nx/specs/ElementMatchers/hooks/afterEach/web.hook.ts +1 -0
  222. package/templates/nx/specs/ElementMatchers/hooks/before/mobile.hook.ts +1 -0
  223. package/templates/nx/specs/ElementMatchers/hooks/before/web.hook.ts +1 -0
  224. package/templates/nx/specs/ElementMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
  225. package/templates/nx/specs/ElementMatchers/hooks/beforeEach/web.hook.ts +1 -0
  226. package/templates/nx/specs/ElementMatchers/suite.md +9 -0
  227. package/templates/nx/specs/Playground/TC-0001-form-controls/mobile.test.ts +3 -0
  228. package/templates/nx/specs/Playground/TC-0001-form-controls/spec.md +12 -0
  229. package/templates/nx/specs/Playground/TC-0001-form-controls/web.test.ts +6 -0
  230. package/templates/nx/specs/Playground/TC-0002-toggle-elements/mobile.test.ts +3 -0
  231. package/templates/nx/specs/Playground/TC-0002-toggle-elements/spec.md +12 -0
  232. package/templates/nx/specs/Playground/TC-0002-toggle-elements/web.test.ts +6 -0
  233. package/templates/nx/specs/Playground/hooks/after/mobile.hook.ts +1 -0
  234. package/templates/nx/specs/Playground/hooks/after/web.hook.ts +1 -0
  235. package/templates/nx/specs/Playground/hooks/afterEach/mobile.hook.ts +1 -0
  236. package/templates/nx/specs/Playground/hooks/afterEach/web.hook.ts +1 -0
  237. package/templates/nx/specs/Playground/hooks/before/mobile.hook.ts +1 -0
  238. package/templates/nx/specs/Playground/hooks/before/web.hook.ts +1 -0
  239. package/templates/nx/specs/Playground/hooks/beforeEach/mobile.hook.ts +1 -0
  240. package/templates/nx/specs/Playground/hooks/beforeEach/web.hook.ts +1 -0
  241. package/templates/nx/specs/Playground/suite.md +9 -0
  242. package/templates/nx/spectra.config.ts +1 -1
  243. package/templates/nx/support/actions/fillCredentials/mobile.action.ts +4 -0
  244. package/templates/nx/support/actions/fillCredentials/web.action.ts +4 -0
  245. package/templates/nx/support/steps/togglePlaygroundStates/mobile.step.ts +3 -0
  246. package/templates/nx/support/steps/togglePlaygroundStates/step.md +7 -0
  247. package/templates/nx/support/steps/togglePlaygroundStates/web.step.ts +5 -0
  248. package/templates/nx/support/steps/verifyPlaygroundState/mobile.step.ts +4 -0
  249. package/templates/nx/support/steps/verifyPlaygroundState/step.md +7 -0
  250. package/templates/nx/support/steps/verifyPlaygroundState/web.step.ts +6 -0
  251. package/templates/default/actions/applyDiscount/mobile.action.ts +0 -6
  252. package/templates/default/actions/applyDiscount/web.action.ts +0 -6
  253. package/templates/default/actions/verifyOtp/mobile.action.ts +0 -6
  254. package/templates/default/actions/verifyOtp/web.action.ts +0 -6
  255. package/templates/default/fixtures/couponCode.json +0 -1
  256. package/templates/default/fixtures/searchQuery.json +0 -1
  257. package/templates/default/fixtures/userData.json +0 -1
  258. package/templates/default/global-hooks/before.web.hook.ts +0 -4
  259. package/templates/default/page-objects/LoginPage/mobile.ts +0 -32
  260. package/templates/default/page-objects/LoginPage/web.ts +0 -32
  261. package/templates/default/page-objects/ProductPage/mobile.ts +0 -39
  262. package/templates/default/page-objects/ProductPage/web.ts +0 -38
  263. package/templates/default/page-objects/SettingsPage/common.ts +0 -26
  264. package/templates/default/specs/Auth/TC-AUTH-01/android.test.ts +0 -6
  265. package/templates/default/specs/Auth/TC-AUTH-01/ios.test.ts +0 -6
  266. package/templates/default/specs/Auth/TC-AUTH-01/web.test.ts +0 -13
  267. package/templates/default/specs/Auth/TC-AUTH-02/android.test.ts +0 -5
  268. package/templates/default/specs/Auth/TC-AUTH-02/web.test.ts +0 -5
  269. package/templates/default/specs/Auth/hooks/before.android.hook.ts +0 -3
  270. package/templates/default/specs/Auth/hooks/before.ios.hook.ts +0 -3
  271. package/templates/default/specs/Auth/hooks/before.web.hook.ts +0 -3
  272. package/templates/default/specs/Product/TC-PROD-01/mobile.test.ts +0 -8
  273. package/templates/default/specs/Product/TC-PROD-01/web.test.ts +0 -8
  274. package/templates/default/specs/Product/TC-PROD-02/mobile.test.ts +0 -6
  275. package/templates/default/specs/Product/TC-PROD-02/web.test.ts +0 -6
  276. package/templates/default/specs/Product/hooks/before.web.hook.ts +0 -3
  277. package/templates/default/specs/Settings/TC-SET-01/common.test.ts +0 -8
  278. package/templates/default/steps/loginUser/mobile.step.ts +0 -4
  279. package/templates/default/steps/loginUser/web.step.ts +0 -4
  280. package/templates/default/steps/searchProduct/mobile.step.ts +0 -5
  281. package/templates/default/steps/searchProduct/web.step.ts +0 -5
  282. package/templates/nx/modules/auth/e2e/actions/verifyOtp/mobile.action.ts +0 -6
  283. package/templates/nx/modules/auth/e2e/actions/verifyOtp/web.action.ts +0 -6
  284. package/templates/nx/modules/auth/e2e/fixtures/userData.json +0 -1
  285. package/templates/nx/modules/auth/e2e/global-hooks/before.web.hook.ts +0 -4
  286. package/templates/nx/modules/auth/e2e/package.json +0 -19
  287. package/templates/nx/modules/auth/e2e/page-objects/LoginPage/mobile.ts +0 -32
  288. package/templates/nx/modules/auth/e2e/page-objects/LoginPage/web.ts +0 -32
  289. package/templates/nx/modules/auth/e2e/page-objects/SettingsPage/common.ts +0 -26
  290. package/templates/nx/modules/auth/e2e/project.json +0 -34
  291. package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-01/android.test.ts +0 -6
  292. package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-01/ios.test.ts +0 -6
  293. package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-01/web.test.ts +0 -19
  294. package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-02/android.test.ts +0 -5
  295. package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-02/web.test.ts +0 -5
  296. package/templates/nx/modules/auth/e2e/specs/Auth/hooks/before.android.hook.ts +0 -3
  297. package/templates/nx/modules/auth/e2e/specs/Auth/hooks/before.ios.hook.ts +0 -3
  298. package/templates/nx/modules/auth/e2e/specs/Auth/hooks/before.web.hook.ts +0 -3
  299. package/templates/nx/modules/auth/e2e/specs/Settings/TC-SET-01/common.test.ts +0 -8
  300. package/templates/nx/modules/auth/e2e/steps/loginUser/mobile.step.ts +0 -4
  301. package/templates/nx/modules/auth/e2e/steps/loginUser/web.step.ts +0 -4
  302. package/templates/nx/modules/auth/package.json +0 -7
  303. package/templates/nx/modules/auth/src/index.ts +0 -3
  304. package/templates/nx/modules/catalog/package.json +0 -7
  305. package/templates/nx/modules/catalog/src/index.ts +0 -6
  306. package/templates/nx/shared/testing/actions/dismissBanner/common.action.ts +0 -6
  307. package/templates/nx/shared/testing/fixtures/appConfig.json +0 -4
  308. package/templates/nx/shared/testing/package.json +0 -8
  309. package/templates/nx/shared/testing/page-objects/NavigationBar/common.ts +0 -13
  310. package/templates/nx/shared/testing/steps/loginAsAdmin/common.step.ts +0 -4
@@ -0,0 +1,29 @@
1
+ export class PlaygroundPage {
2
+ get visibleElement() { return Spectra.get("#demo-visible-el-pg"); }
3
+ get hiddenElement() { return Spectra.get("#demo-hidden-el-pg"); }
4
+ get existingElement() { return Spectra.get("#demo-existing-el-pg"); }
5
+ get removedElement() { return Spectra.get("#demo-removed-el-pg"); }
6
+ get enabledButton() { return Spectra.get("#demo-enabled-btn"); }
7
+ get disabledButton() { return Spectra.get("#demo-disabled-btn-pg"); }
8
+ get termsCheckbox() { return Spectra.get("#demo-terms-checkbox"); }
9
+ get modeRadio() { return Spectra.get("#demo-mode-radio"); }
10
+ get emailInput() { return Spectra.get("#demo-email-input-pg"); }
11
+ get tokenInput() { return Spectra.get("#demo-token-input-pg"); }
12
+ get exactText() { return Spectra.get("#demo-exact-text-pg"); }
13
+ get partialText() { return Spectra.get("#demo-partial-text-pg"); }
14
+ get activeTab() { return Spectra.get("#demo-active-tab-pg"); }
15
+ get navLink() { return Spectra.get("#demo-nav-link-pg"); }
16
+ get productItems() { return Spectra.getAll(".demo-product-item"); }
17
+ get emptyList() { return Spectra.getAll("#demo-empty-list-pg > *"); }
18
+
19
+ async open() {
20
+ await browser.url("/#playground");
21
+ }
22
+
23
+ async fillCredentials(email = Fixture.playgroundData.defaultEmail, token = Fixture.playgroundData.defaultToken) {
24
+ await this.emailInput.type(email);
25
+ await this.tokenInput.type(token);
26
+ }
27
+ }
28
+
29
+ export default new PlaygroundPage();
@@ -0,0 +1,4 @@
1
+ export default async function fillCredentials(this: any, email: string, token: string) {
2
+ await this.get("~email_input").type(email);
3
+ await this.get("~token_input").type(token);
4
+ }
@@ -0,0 +1,4 @@
1
+ export default async function fillCredentials(this: any, email: string, token: string) {
2
+ await this.get("#demo-email-input-pg").type(email);
3
+ await this.get("#demo-token-input-pg").type(token);
4
+ }
@@ -0,0 +1,3 @@
1
+ export default async function togglePlaygroundStates() {
2
+ await PlaygroundPage.open();
3
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: step-togglePlaygroundStates
3
+ name: Toggle Playground States
4
+ description: Toggles hidden/removed elements and verifies dynamic states
5
+ ---
6
+
7
+ # Step: Toggle Playground States
@@ -0,0 +1,5 @@
1
+ export default async function togglePlaygroundStates() {
2
+ await PlaygroundPage.open();
3
+ await PlaygroundPage.hiddenElement.should("be.visible");
4
+ await PlaygroundPage.existingElement.should("exist");
5
+ }
@@ -0,0 +1,4 @@
1
+ export default async function verifyPlaygroundState() {
2
+ await PlaygroundPage.open();
3
+ await PlaygroundPage.visibleElement.should("be.visible");
4
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: step-verifyPlaygroundState
3
+ name: Verify Playground State
4
+ description: Verifies default form values and matcher element states on demo web app
5
+ ---
6
+
7
+ # Step: Verify Playground State
@@ -0,0 +1,6 @@
1
+ export default async function verifyPlaygroundState() {
2
+ await PlaygroundPage.open();
3
+ await PlaygroundPage.visibleElement.should("be.visible");
4
+ await PlaygroundPage.enabledButton.should("be.enabled");
5
+ await PlaygroundPage.termsCheckbox.should("be.checked");
6
+ }
@@ -0,0 +1,3 @@
1
+ it("should verify title on Mobile", async () => {
2
+ await MatchersPage.open();
3
+ });
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: TC-0007-title-and-navigation
3
+ title: Verify page title and sidebar navigation links
4
+ priority: High
5
+ caseType: Positive
6
+ status: ready-for-automation
7
+ coverage:
8
+ web: automated
9
+ mobile: automated
10
+ ---
11
+
12
+ # Verify page title and sidebar navigation links
@@ -0,0 +1,5 @@
1
+ it("should verify browser page title and navigation links on Web", async () => {
2
+ await MatchersPage.open();
3
+ await browser.shouldContainTitle("TestSpectra");
4
+ await NavigationPage.sidebarLinks.should("have.length.greaterThan", 0);
5
+ });
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: suite-browser-context
3
+ name: BrowserContext
4
+ description: Browser page title, current URL, and navigation
5
+ executionOrder: 1.0
6
+ parallel: true
7
+ ---
8
+
9
+ # Suite: BrowserContext
@@ -0,0 +1,3 @@
1
+ it("should verify text on Mobile", async () => {
2
+ await MatchersPage.open("text");
3
+ });
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: TC-0005-text-and-values
3
+ title: Verify exact text, substring text, and input values
4
+ priority: High
5
+ caseType: Positive
6
+ status: ready-for-automation
7
+ coverage:
8
+ web: automated
9
+ mobile: automated
10
+ ---
11
+
12
+ # Verify exact text, substring text, and input values
@@ -0,0 +1,7 @@
1
+ it("should verify text and value matchers on Web", async () => {
2
+ await MatchersPage.open("text");
3
+ await MatchersPage.exactText.should("have.text", Fixture.playgroundData.welcomeText);
4
+ await MatchersPage.partialText.should("contain.text", "Welcome");
5
+ await MatchersPage.emailInput.should("have.value", Fixture.playgroundData.defaultEmail);
6
+ await MatchersPage.tokenInput.should("contain.value", "JWT_");
7
+ });
@@ -0,0 +1,3 @@
1
+ it("should verify collection length on Mobile", async () => {
2
+ await MatchersPage.open("length");
3
+ });
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: TC-0006-collections-and-empty
3
+ title: Verify collection lengths, counts, and empty lists
4
+ priority: High
5
+ caseType: Positive
6
+ status: ready-for-automation
7
+ coverage:
8
+ web: automated
9
+ mobile: automated
10
+ ---
11
+
12
+ # Verify collection lengths, counts, and empty lists
@@ -0,0 +1,6 @@
1
+ it("should verify collection lengths and empty lists on Web", async () => {
2
+ await MatchersPage.open("length");
3
+ await MatchersPage.productCards.should("have.length", 4);
4
+ await MatchersPage.productCards.should("have.length.greaterThan", 0);
5
+ await MatchersPage.emptyList.should("be.empty");
6
+ });
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: suite-content-matchers
3
+ name: ContentMatchers
4
+ description: Text content, substring matching, values and collections
5
+ executionOrder: 1.0
6
+ parallel: true
7
+ ---
8
+
9
+ # Suite: ContentMatchers
@@ -0,0 +1,3 @@
1
+ it("should verify visibility on Mobile", async () => {
2
+ await MatchersPage.open("visibility");
3
+ });
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: TC-0003-visibility-and-dom
3
+ title: Verify element visibility and existence matchers
4
+ priority: High
5
+ caseType: Positive
6
+ status: ready-for-automation
7
+ coverage:
8
+ web: automated
9
+ mobile: automated
10
+ ---
11
+
12
+ # Verify element visibility and existence matchers
@@ -0,0 +1,5 @@
1
+ it("should verify be.visible and exist matchers on Web", async () => {
2
+ await MatchersPage.open("visibility");
3
+ await MatchersPage.visibleElement.should("be.visible");
4
+ await MatchersPage.existingElement.should("exist");
5
+ });
@@ -0,0 +1,3 @@
1
+ it("should verify button state on Mobile", async () => {
2
+ await MatchersPage.open("state");
3
+ });
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: TC-0004-states-and-attributes
3
+ title: Verify button state, checkbox, radio and attributes
4
+ priority: High
5
+ caseType: Positive
6
+ status: ready-for-automation
7
+ coverage:
8
+ web: automated
9
+ mobile: automated
10
+ ---
11
+
12
+ # Verify button state, checkbox, radio and attributes
@@ -0,0 +1,8 @@
1
+ it("should verify enabled/disabled states and HTML attributes on Web", async () => {
2
+ await MatchersPage.open("state");
3
+ await MatchersPage.submitButton.should("be.enabled");
4
+ await MatchersPage.disabledButton.should("be.disabled");
5
+ await MatchersPage.checkbox.should("not.be.checked");
6
+ await MatchersPage.activeTab.should("have.class", "is-active");
7
+ await MatchersPage.navLink.should("have.attr", "href", Fixture.playgroundData.dashboardHref);
8
+ });
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: suite-element-matchers
3
+ name: ElementMatchers
4
+ description: Element visibility, existence, form states and attributes
5
+ executionOrder: 1.0
6
+ parallel: true
7
+ ---
8
+
9
+ # Suite: ElementMatchers
@@ -0,0 +1,3 @@
1
+ it("should verify playground states (Mobile)", async () => {
2
+ await Step.verifyPlaygroundState();
3
+ });
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: TC-0001-form-controls
3
+ title: Verify playground form inputs and default states
4
+ priority: High
5
+ caseType: Positive
6
+ status: ready-for-automation
7
+ coverage:
8
+ web: automated
9
+ mobile: automated
10
+ ---
11
+
12
+ # Verify playground form inputs and default states
@@ -0,0 +1,6 @@
1
+ it("should verify live playground form inputs and default states (Web)", async () => {
2
+ await Step.verifyPlaygroundState();
3
+ await PlaygroundPage.emailInput.should("have.value", Fixture.playgroundData.defaultEmail);
4
+ await PlaygroundPage.tokenInput.should("contain.value", "JWT_");
5
+ await PlaygroundPage.exactText.should("have.text", Fixture.playgroundData.welcomeText);
6
+ });
@@ -0,0 +1,3 @@
1
+ it("should fill credentials (Mobile)", async () => {
2
+ await PlaygroundPage.open();
3
+ });
@@ -0,0 +1,12 @@
1
+ ---
2
+ id: TC-0002-toggle-elements
3
+ title: Verify typing credentials and updating playground inputs
4
+ priority: High
5
+ caseType: Positive
6
+ status: ready-for-automation
7
+ coverage:
8
+ web: automated
9
+ mobile: automated
10
+ ---
11
+
12
+ # Verify typing credentials and updating playground inputs
@@ -0,0 +1,6 @@
1
+ it("should update input values and verify updated state (Web)", async () => {
2
+ await PlaygroundPage.open();
3
+ await PlaygroundPage.fillCredentials("qa.expert@testspectra.dev", "JWT_custom_session_token");
4
+ await PlaygroundPage.emailInput.should("have.value", "qa.expert@testspectra.dev");
5
+ await PlaygroundPage.tokenInput.should("contain.value", "JWT_custom_session_token");
6
+ });
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1 @@
1
+ export default async function () {}
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: suite-playground
3
+ name: Playground
4
+ description: Live Playground form controls and interactive toggles
5
+ executionOrder: 1.0
6
+ parallel: true
7
+ ---
8
+
9
+ # Suite: Playground
@@ -2,7 +2,7 @@ import { defineConfig } from "@testspectra/cli";
2
2
 
3
3
  export default defineConfig({
4
4
  webConfig: {
5
- baseUrl: "https://the-internet.herokuapp.com",
5
+ baseUrl: "http://localhost:5173",
6
6
  maxConcurrentSessions: "1",
7
7
  headlessMode: true,
8
8
  implicitWait: "5000",
@@ -0,0 +1,4 @@
1
+ export default async function fillCredentials(this: any, email: string, token: string) {
2
+ await this.get("~email_input").type(email);
3
+ await this.get("~token_input").type(token);
4
+ }
@@ -0,0 +1,4 @@
1
+ export default async function fillCredentials(this: any, email: string, token: string) {
2
+ await this.get("#demo-email-input-pg").type(email);
3
+ await this.get("#demo-token-input-pg").type(token);
4
+ }
@@ -0,0 +1,3 @@
1
+ export default async function togglePlaygroundStates() {
2
+ await PlaygroundPage.open();
3
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: step-togglePlaygroundStates
3
+ name: Toggle Playground States
4
+ description: Toggles hidden/removed elements and verifies dynamic states
5
+ ---
6
+
7
+ # Step: Toggle Playground States
@@ -0,0 +1,5 @@
1
+ export default async function togglePlaygroundStates() {
2
+ await PlaygroundPage.open();
3
+ await PlaygroundPage.hiddenElement.should("be.visible");
4
+ await PlaygroundPage.existingElement.should("exist");
5
+ }
@@ -0,0 +1,4 @@
1
+ export default async function verifyPlaygroundState() {
2
+ await PlaygroundPage.open();
3
+ await PlaygroundPage.visibleElement.should("be.visible");
4
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: step-verifyPlaygroundState
3
+ name: Verify Playground State
4
+ description: Verifies default form values and matcher element states on demo web app
5
+ ---
6
+
7
+ # Step: Verify Playground State
@@ -0,0 +1,6 @@
1
+ export default async function verifyPlaygroundState() {
2
+ await PlaygroundPage.open();
3
+ await PlaygroundPage.visibleElement.should("be.visible");
4
+ await PlaygroundPage.enabledButton.should("be.enabled");
5
+ await PlaygroundPage.termsCheckbox.should("be.checked");
6
+ }
@@ -1,6 +0,0 @@
1
- export default async function applyDiscount(couponCode: string): Promise<void> {
2
- const couponInput = await $('~coupon_input');
3
- await couponInput.setValue(couponCode);
4
- const applyBtn = await $('~btn_apply');
5
- await applyBtn.click();
6
- }
@@ -1,6 +0,0 @@
1
- export default async function applyDiscount(couponCode: string): Promise<void> {
2
- const couponInput = await $('#coupon-code');
3
- await couponInput.setValue(couponCode);
4
- const applyBtn = await $('#apply-coupon-btn');
5
- await applyBtn.click();
6
- }
@@ -1,6 +0,0 @@
1
- export default async function verifyOtp(otp: string): Promise<void> {
2
- const otpInput = await $('~otp_input');
3
- await otpInput.setValue(otp);
4
- const verifyBtn = await $('~verify_btn');
5
- await verifyBtn.click();
6
- }
@@ -1,6 +0,0 @@
1
- export default async function verifyOtp(otp: string): Promise<void> {
2
- const otpInput = await $('#otp');
3
- await otpInput.setValue(otp);
4
- const verifyBtn = await $('#verify-btn');
5
- await verifyBtn.click();
6
- }
@@ -1 +0,0 @@
1
- "DISCOUNT50"
@@ -1 +0,0 @@
1
- "Laptop Gaming"
@@ -1 +0,0 @@
1
- {"username": "tomsmith", "role": "admin"}
@@ -1,4 +0,0 @@
1
- export default async function (): Promise<void> {
2
- // Global before setup (executed once before all suites)
3
- await browser.maximizeWindow();
4
- }
@@ -1,32 +0,0 @@
1
- export default class LoginPage {
2
- static get usernameInput(): ChainablePromiseElement {
3
- return $('~username_input');
4
- }
5
-
6
- static get passwordInput(): ChainablePromiseElement {
7
- return $('~password_input');
8
- }
9
-
10
- static get rememberMeCheckbox(): ChainablePromiseElement {
11
- return $('~remember_me_checkbox');
12
- }
13
-
14
- static get submitButton(): ChainablePromiseElement {
15
- return $('~login_button');
16
- }
17
-
18
- static get welcomeText(): ChainablePromiseElement {
19
- return $('~welcome_text');
20
- }
21
-
22
- static async open() {
23
- // Mobile app launch handled by Appium capabilities
24
- }
25
-
26
- static async login(username: string, pass: string) {
27
- await Spectra.waitForElement(this.usernameInput);
28
- await Spectra.type(this.usernameInput, username, { clearFirst: true });
29
- await Spectra.type(this.passwordInput, pass, { clearFirst: true });
30
- await Spectra.click(this.submitButton);
31
- }
32
- }
@@ -1,32 +0,0 @@
1
- export default class LoginPage {
2
- static get usernameInput(): ChainablePromiseElement {
3
- return $('#username');
4
- }
5
-
6
- static get passwordInput(): ChainablePromiseElement {
7
- return $('#password');
8
- }
9
-
10
- static get rememberMeCheckbox(): ChainablePromiseElement {
11
- return $('#remember-me');
12
- }
13
-
14
- static get submitButton(): ChainablePromiseElement {
15
- return $('button[type="submit"]');
16
- }
17
-
18
- static get flashAlert(): ChainablePromiseElement {
19
- return $('#flash');
20
- }
21
-
22
- static async open() {
23
- await Spectra.navigate('/login');
24
- }
25
-
26
- static async login(username: string, pass: string) {
27
- await Spectra.waitForElement(this.usernameInput);
28
- await Spectra.type(this.usernameInput, username, { clearFirst: true });
29
- await Spectra.type(this.passwordInput, pass, { clearFirst: true });
30
- await Spectra.click(this.submitButton);
31
- }
32
- }