@testspectra/cli 1.0.11 → 1.0.12

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 (97) hide show
  1. package/dist/commands/init.d.ts +4 -2
  2. package/dist/commands/init.js +38 -5
  3. package/dist/commands/run.js +24 -17
  4. package/dist/index.js +1 -0
  5. package/package.json +1 -1
  6. package/templates/default/tsconfig.android.json +6 -6
  7. package/templates/default/tsconfig.ios.json +6 -6
  8. package/templates/default/tsconfig.web.json +8 -8
  9. package/templates/nx/actions/applyDiscount/mobile.action.ts +6 -0
  10. package/templates/nx/actions/applyDiscount/web.action.ts +6 -0
  11. package/templates/nx/actions/verifyOtp/mobile.action.ts +6 -0
  12. package/templates/nx/actions/verifyOtp/web.action.ts +6 -0
  13. package/templates/nx/default/actions/applyDiscount/mobile.action.ts +6 -0
  14. package/templates/nx/default/actions/applyDiscount/web.action.ts +6 -0
  15. package/templates/nx/default/actions/verifyOtp/mobile.action.ts +6 -0
  16. package/templates/nx/default/actions/verifyOtp/web.action.ts +6 -0
  17. package/templates/nx/default/fixtures/couponCode.json +1 -0
  18. package/templates/nx/default/fixtures/searchQuery.json +1 -0
  19. package/templates/nx/default/fixtures/userData.json +1 -0
  20. package/templates/nx/default/global-hooks/before.web.hook.ts +4 -0
  21. package/templates/nx/default/package.json +18 -0
  22. package/templates/nx/default/page-objects/LoginPage/mobile.ts +32 -0
  23. package/templates/nx/default/page-objects/LoginPage/web.ts +32 -0
  24. package/templates/nx/default/page-objects/ProductPage/mobile.ts +39 -0
  25. package/templates/nx/default/page-objects/ProductPage/web.ts +38 -0
  26. package/templates/nx/default/page-objects/SettingsPage/common.ts +26 -0
  27. package/templates/nx/default/specs/Auth/TC-AUTH-01/android.test.ts +6 -0
  28. package/templates/nx/default/specs/Auth/TC-AUTH-01/ios.test.ts +6 -0
  29. package/templates/nx/default/specs/Auth/TC-AUTH-01/web.test.ts +13 -0
  30. package/templates/nx/default/specs/Auth/TC-AUTH-02/android.test.ts +5 -0
  31. package/templates/nx/default/specs/Auth/TC-AUTH-02/web.test.ts +5 -0
  32. package/templates/nx/default/specs/Auth/hooks/before.android.hook.ts +3 -0
  33. package/templates/nx/default/specs/Auth/hooks/before.ios.hook.ts +3 -0
  34. package/templates/nx/default/specs/Auth/hooks/before.web.hook.ts +3 -0
  35. package/templates/nx/default/specs/Product/TC-PROD-01/mobile.test.ts +8 -0
  36. package/templates/nx/default/specs/Product/TC-PROD-01/web.test.ts +8 -0
  37. package/templates/nx/default/specs/Product/TC-PROD-02/mobile.test.ts +6 -0
  38. package/templates/nx/default/specs/Product/TC-PROD-02/web.test.ts +6 -0
  39. package/templates/nx/default/specs/Product/hooks/before.web.hook.ts +3 -0
  40. package/templates/nx/default/specs/Settings/TC-SET-01/common.test.ts +8 -0
  41. package/templates/nx/default/spectra.config.ts +61 -0
  42. package/templates/nx/default/steps/loginUser/mobile.step.ts +4 -0
  43. package/templates/nx/default/steps/loginUser/web.step.ts +4 -0
  44. package/templates/nx/default/steps/searchProduct/mobile.step.ts +5 -0
  45. package/templates/nx/default/steps/searchProduct/web.step.ts +5 -0
  46. package/templates/nx/default/tsconfig.android.json +39 -0
  47. package/templates/nx/default/tsconfig.ios.json +39 -0
  48. package/templates/nx/default/tsconfig.json +20 -0
  49. package/templates/nx/default/tsconfig.web.json +45 -0
  50. package/templates/nx/fixtures/couponCode.json +1 -0
  51. package/templates/nx/fixtures/searchQuery.json +1 -0
  52. package/templates/nx/fixtures/userData.json +1 -0
  53. package/templates/nx/global-hooks/before.web.hook.ts +4 -0
  54. package/templates/nx/package.json +18 -0
  55. package/templates/nx/page-objects/LoginPage/mobile.ts +32 -0
  56. package/templates/nx/page-objects/LoginPage/web.ts +32 -0
  57. package/templates/nx/page-objects/ProductPage/mobile.ts +39 -0
  58. package/templates/nx/page-objects/ProductPage/web.ts +38 -0
  59. package/templates/nx/page-objects/SettingsPage/common.ts +26 -0
  60. package/templates/nx/project.json +34 -0
  61. package/templates/nx/specs/Auth/TC-AUTH-01/android.test.ts +6 -0
  62. package/templates/nx/specs/Auth/TC-AUTH-01/ios.test.ts +6 -0
  63. package/templates/nx/specs/Auth/TC-AUTH-01/web.test.ts +13 -0
  64. package/templates/nx/specs/Auth/TC-AUTH-02/android.test.ts +5 -0
  65. package/templates/nx/specs/Auth/TC-AUTH-02/web.test.ts +5 -0
  66. package/templates/nx/specs/Auth/hooks/before.android.hook.ts +3 -0
  67. package/templates/nx/specs/Auth/hooks/before.ios.hook.ts +3 -0
  68. package/templates/nx/specs/Auth/hooks/before.web.hook.ts +3 -0
  69. package/templates/nx/specs/Product/TC-PROD-01/mobile.test.ts +8 -0
  70. package/templates/nx/specs/Product/TC-PROD-01/web.test.ts +8 -0
  71. package/templates/nx/specs/Product/TC-PROD-02/mobile.test.ts +6 -0
  72. package/templates/nx/specs/Product/TC-PROD-02/web.test.ts +6 -0
  73. package/templates/nx/specs/Product/hooks/before.web.hook.ts +3 -0
  74. package/templates/nx/specs/Settings/TC-SET-01/common.test.ts +8 -0
  75. package/templates/nx/spectra.config.ts +61 -0
  76. package/templates/nx/steps/loginUser/mobile.step.ts +4 -0
  77. package/templates/nx/steps/loginUser/web.step.ts +4 -0
  78. package/templates/nx/steps/searchProduct/mobile.step.ts +5 -0
  79. package/templates/nx/steps/searchProduct/web.step.ts +5 -0
  80. package/templates/nx/tsconfig.android.json +39 -0
  81. package/templates/nx/tsconfig.ios.json +39 -0
  82. package/templates/nx/tsconfig.json +20 -0
  83. package/templates/nx/tsconfig.web.json +45 -0
  84. /package/templates/default/{suites → specs}/Auth/TC-AUTH-01/android.test.ts +0 -0
  85. /package/templates/default/{suites → specs}/Auth/TC-AUTH-01/ios.test.ts +0 -0
  86. /package/templates/default/{suites → specs}/Auth/TC-AUTH-01/web.test.ts +0 -0
  87. /package/templates/default/{suites → specs}/Auth/TC-AUTH-02/android.test.ts +0 -0
  88. /package/templates/default/{suites → specs}/Auth/TC-AUTH-02/web.test.ts +0 -0
  89. /package/templates/default/{suites → specs}/Auth/hooks/before.android.hook.ts +0 -0
  90. /package/templates/default/{suites → specs}/Auth/hooks/before.ios.hook.ts +0 -0
  91. /package/templates/default/{suites → specs}/Auth/hooks/before.web.hook.ts +0 -0
  92. /package/templates/default/{suites → specs}/Product/TC-PROD-01/mobile.test.ts +0 -0
  93. /package/templates/default/{suites → specs}/Product/TC-PROD-01/web.test.ts +0 -0
  94. /package/templates/default/{suites → specs}/Product/TC-PROD-02/mobile.test.ts +0 -0
  95. /package/templates/default/{suites → specs}/Product/TC-PROD-02/web.test.ts +0 -0
  96. /package/templates/default/{suites → specs}/Product/hooks/before.web.hook.ts +0 -0
  97. /package/templates/default/{suites → specs}/Settings/TC-SET-01/common.test.ts +0 -0
@@ -0,0 +1,5 @@
1
+ export default async function searchProduct(query: string): Promise<void> {
2
+ await ProductPage.open();
3
+ await Spectra.type(ProductPage.searchInput, query);
4
+ await Spectra.pressKey("Enter");
5
+ }
@@ -0,0 +1,5 @@
1
+ export default async function searchProduct(query: string): Promise<void> {
2
+ await ProductPage.open();
3
+ await Spectra.type(ProductPage.searchInput, query);
4
+ await Spectra.pressKey("Enter");
5
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "composite": true,
7
+ "noEmit": true,
8
+ "skipLibCheck": true,
9
+ "strict": true,
10
+ "types": ["node", "@wdio/globals/types", "@wdio/mocha-framework"]
11
+ },
12
+ "include": [
13
+ ".testspectra/types/android.d.ts",
14
+ ".testspectra/types/fixtures.d.ts",
15
+ "page-objects/**/*.ts",
16
+ "steps/**/*.ts",
17
+ "actions/**/*.ts",
18
+ "global-hooks/**/*.ts",
19
+ "specs/**/hooks/**/*.ts",
20
+ "specs/**/*.ts",
21
+ "spectra.config.ts"
22
+ ],
23
+ "exclude": [
24
+ "node_modules",
25
+ "dist",
26
+ "page-objects/**/web.ts",
27
+ "page-objects/**/ios.ts",
28
+ "steps/**/web.step.ts",
29
+ "steps/**/ios.step.ts",
30
+ "actions/**/web.action.ts",
31
+ "actions/**/ios.action.ts",
32
+ "global-hooks/**/web.hook.ts",
33
+ "global-hooks/**/ios.hook.ts",
34
+ "specs/**/hooks/**/web.hook.ts",
35
+ "specs/**/hooks/**/ios.hook.ts",
36
+ "specs/**/web.test.ts",
37
+ "specs/**/ios.test.ts"
38
+ ]
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "composite": true,
7
+ "noEmit": true,
8
+ "skipLibCheck": true,
9
+ "strict": true,
10
+ "types": ["node", "@wdio/globals/types", "@wdio/mocha-framework"]
11
+ },
12
+ "include": [
13
+ ".testspectra/types/ios.d.ts",
14
+ ".testspectra/types/fixtures.d.ts",
15
+ "page-objects/**/*.ts",
16
+ "steps/**/*.ts",
17
+ "actions/**/*.ts",
18
+ "global-hooks/**/*.ts",
19
+ "specs/**/hooks/**/*.ts",
20
+ "specs/**/*.ts",
21
+ "spectra.config.ts"
22
+ ],
23
+ "exclude": [
24
+ "node_modules",
25
+ "dist",
26
+ "page-objects/**/web.ts",
27
+ "page-objects/**/android.ts",
28
+ "steps/**/web.step.ts",
29
+ "steps/**/android.step.ts",
30
+ "actions/**/web.action.ts",
31
+ "actions/**/android.action.ts",
32
+ "global-hooks/**/web.hook.ts",
33
+ "global-hooks/**/android.hook.ts",
34
+ "specs/**/hooks/**/web.hook.ts",
35
+ "specs/**/hooks/**/android.hook.ts",
36
+ "specs/**/web.test.ts",
37
+ "specs/**/android.test.ts"
38
+ ]
39
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "types": ["node", "@wdio/globals/types", "@wdio/mocha-framework"],
7
+ "plugins": [
8
+ { "name": "@testspectra/cli" }
9
+ ],
10
+ "skipLibCheck": true,
11
+ "strict": true,
12
+ "noEmit": true
13
+ },
14
+ "files": [],
15
+ "references": [
16
+ { "path": "./tsconfig.web.json" },
17
+ { "path": "./tsconfig.android.json" },
18
+ { "path": "./tsconfig.ios.json" }
19
+ ]
20
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "composite": true,
7
+ "noEmit": true,
8
+ "skipLibCheck": true,
9
+ "strict": true,
10
+ "types": ["node", "@wdio/globals/types", "@wdio/mocha-framework"]
11
+ },
12
+ "include": [
13
+ ".testspectra/types/web.d.ts",
14
+ ".testspectra/types/fixtures.d.ts",
15
+ "page-objects/**/*.ts",
16
+ "steps/**/*.ts",
17
+ "actions/**/*.ts",
18
+ "global-hooks/**/*.ts",
19
+ "specs/**/hooks/**/*.ts",
20
+ "specs/**/*.ts",
21
+ "spectra.config.ts"
22
+ ],
23
+ "exclude": [
24
+ "node_modules",
25
+ "dist",
26
+ "page-objects/**/android.ts",
27
+ "page-objects/**/ios.ts",
28
+ "page-objects/**/mobile.ts",
29
+ "steps/**/android.step.ts",
30
+ "steps/**/ios.step.ts",
31
+ "steps/**/mobile.step.ts",
32
+ "actions/**/android.action.ts",
33
+ "actions/**/ios.action.ts",
34
+ "actions/**/mobile.action.ts",
35
+ "global-hooks/**/android.hook.ts",
36
+ "global-hooks/**/ios.hook.ts",
37
+ "global-hooks/**/mobile.hook.ts",
38
+ "specs/**/hooks/**/android.hook.ts",
39
+ "specs/**/hooks/**/ios.hook.ts",
40
+ "specs/**/hooks/**/mobile.hook.ts",
41
+ "specs/**/android.test.ts",
42
+ "specs/**/ios.test.ts",
43
+ "specs/**/mobile.test.ts"
44
+ ]
45
+ }