@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.
- package/bin/testspectra-runner +0 -0
- package/dist/commands/add.js +3 -9
- package/dist/commands/init.js +15 -15
- package/dist/commands/run.d.ts +1 -0
- package/dist/commands/run.js +22 -13
- package/dist/index.js +1 -0
- package/dist/server/demo.d.ts +8 -0
- package/dist/server/demo.js +104 -0
- package/dist/types/generator.d.ts +1 -1
- package/dist/types/generator.js +50 -15
- package/package.json +2 -2
- package/templates/default/.cursorrules +18 -0
- package/templates/default/CLAUDE.md +10 -0
- package/templates/default/fixtures/playgroundData.json +7 -0
- package/templates/default/global-hooks/after/mobile.hook.ts +3 -0
- package/templates/default/global-hooks/after/web.hook.ts +3 -0
- package/templates/default/global-hooks/before/mobile.hook.ts +3 -0
- package/templates/default/global-hooks/before/web.hook.ts +3 -0
- package/templates/default/package.json +5 -1
- package/templates/default/page-objects/MatchersPage/mobile.ts +21 -0
- package/templates/default/page-objects/MatchersPage/web.ts +23 -0
- package/templates/default/page-objects/NavigationPage/mobile.ts +5 -0
- package/templates/default/page-objects/NavigationPage/web.ts +8 -0
- package/templates/default/page-objects/PlaygroundPage/mobile.ts +26 -0
- package/templates/default/page-objects/PlaygroundPage/web.ts +29 -0
- package/templates/default/specs/BrowserContext/TC-0007-title-and-navigation/mobile.test.ts +3 -0
- package/templates/default/specs/BrowserContext/TC-0007-title-and-navigation/spec.md +12 -0
- package/templates/default/specs/BrowserContext/TC-0007-title-and-navigation/web.test.ts +5 -0
- package/templates/default/specs/BrowserContext/hooks/after/mobile.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/hooks/after/web.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/hooks/afterEach/web.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/hooks/before/mobile.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/hooks/before/web.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/default/specs/BrowserContext/suite.md +9 -0
- package/templates/default/specs/ContentMatchers/TC-0005-text-and-values/mobile.test.ts +3 -0
- package/templates/default/specs/ContentMatchers/TC-0005-text-and-values/spec.md +12 -0
- package/templates/default/specs/ContentMatchers/TC-0005-text-and-values/web.test.ts +7 -0
- package/templates/default/specs/ContentMatchers/TC-0006-collections-and-empty/mobile.test.ts +3 -0
- package/templates/default/specs/ContentMatchers/TC-0006-collections-and-empty/spec.md +12 -0
- package/templates/default/specs/ContentMatchers/TC-0006-collections-and-empty/web.test.ts +6 -0
- package/templates/default/specs/ContentMatchers/hooks/after/mobile.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/hooks/after/web.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/hooks/afterEach/web.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/hooks/before/mobile.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/hooks/before/web.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/default/specs/ContentMatchers/suite.md +9 -0
- package/templates/default/specs/ElementMatchers/TC-0003-visibility-and-dom/mobile.test.ts +3 -0
- package/templates/default/specs/ElementMatchers/TC-0003-visibility-and-dom/spec.md +12 -0
- package/templates/default/specs/ElementMatchers/TC-0003-visibility-and-dom/web.test.ts +5 -0
- package/templates/default/specs/ElementMatchers/TC-0004-states-and-attributes/mobile.test.ts +3 -0
- package/templates/default/specs/ElementMatchers/TC-0004-states-and-attributes/spec.md +12 -0
- package/templates/default/specs/ElementMatchers/TC-0004-states-and-attributes/web.test.ts +8 -0
- package/templates/default/specs/ElementMatchers/hooks/after/mobile.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/hooks/after/web.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/hooks/afterEach/web.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/hooks/before/mobile.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/hooks/before/web.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/default/specs/ElementMatchers/suite.md +9 -0
- package/templates/default/specs/Playground/TC-0001-form-controls/mobile.test.ts +3 -0
- package/templates/default/specs/Playground/TC-0001-form-controls/spec.md +12 -0
- package/templates/default/specs/Playground/TC-0001-form-controls/web.test.ts +6 -0
- package/templates/default/specs/Playground/TC-0002-toggle-elements/mobile.test.ts +3 -0
- package/templates/default/specs/Playground/TC-0002-toggle-elements/spec.md +12 -0
- package/templates/default/specs/Playground/TC-0002-toggle-elements/web.test.ts +6 -0
- package/templates/default/specs/Playground/hooks/after/mobile.hook.ts +1 -0
- package/templates/default/specs/Playground/hooks/after/web.hook.ts +1 -0
- package/templates/default/specs/Playground/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/default/specs/Playground/hooks/afterEach/web.hook.ts +1 -0
- package/templates/default/specs/Playground/hooks/before/mobile.hook.ts +1 -0
- package/templates/default/specs/Playground/hooks/before/web.hook.ts +1 -0
- package/templates/default/specs/Playground/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/default/specs/Playground/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/default/specs/Playground/suite.md +9 -0
- package/templates/default/spectra.config.ts +1 -1
- package/templates/default/support/actions/fillCredentials/mobile.action.ts +4 -0
- package/templates/default/support/actions/fillCredentials/web.action.ts +4 -0
- package/templates/default/support/steps/togglePlaygroundStates/mobile.step.ts +3 -0
- package/templates/default/support/steps/togglePlaygroundStates/step.md +7 -0
- package/templates/default/support/steps/togglePlaygroundStates/web.step.ts +5 -0
- package/templates/default/support/steps/verifyPlaygroundState/mobile.step.ts +4 -0
- package/templates/default/support/steps/verifyPlaygroundState/step.md +7 -0
- package/templates/default/support/steps/verifyPlaygroundState/web.step.ts +6 -0
- package/templates/default/tsconfig.spectra.android.json +7 -4
- package/templates/default/tsconfig.spectra.ios.json +7 -4
- package/templates/default/tsconfig.spectra.web.json +10 -6
- package/templates/nx/.cursorrules +18 -0
- package/templates/nx/CLAUDE.md +10 -0
- package/templates/nx/fixtures/playgroundData.json +7 -0
- package/templates/nx/global-hooks/after/mobile.hook.ts +3 -0
- package/templates/nx/global-hooks/after/web.hook.ts +3 -0
- package/templates/nx/global-hooks/before/mobile.hook.ts +3 -0
- package/templates/nx/global-hooks/before/web.hook.ts +3 -0
- package/templates/nx/package.json +1 -1
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/TC-0007-title-and-navigation/mobile.test.ts +3 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/TC-0007-title-and-navigation/spec.md +12 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/TC-0007-title-and-navigation/web.test.ts +5 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/after/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/before/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/BrowserContext/suite.md +9 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0005-text-and-values/mobile.test.ts +3 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0005-text-and-values/spec.md +12 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0005-text-and-values/web.test.ts +7 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0006-collections-and-empty/mobile.test.ts +3 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0006-collections-and-empty/spec.md +12 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/TC-0006-collections-and-empty/web.test.ts +6 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/after/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/before/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ContentMatchers/suite.md +9 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0003-visibility-and-dom/mobile.test.ts +3 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0003-visibility-and-dom/spec.md +12 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0003-visibility-and-dom/web.test.ts +5 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0004-states-and-attributes/mobile.test.ts +3 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0004-states-and-attributes/spec.md +12 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/TC-0004-states-and-attributes/web.test.ts +8 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/after/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/before/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/packages/matchers/e2e/specs/ElementMatchers/suite.md +9 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/TC-0001-form-controls/mobile.test.ts +3 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/TC-0001-form-controls/spec.md +12 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/TC-0001-form-controls/web.test.ts +6 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/TC-0002-toggle-elements/mobile.test.ts +3 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/TC-0002-toggle-elements/spec.md +12 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/TC-0002-toggle-elements/web.test.ts +6 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/after/web.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/before/web.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/packages/playground/e2e/specs/Playground/suite.md +9 -0
- package/templates/nx/page-objects/MatchersPage/mobile.ts +21 -0
- package/templates/nx/page-objects/MatchersPage/web.ts +23 -0
- package/templates/nx/page-objects/NavigationPage/mobile.ts +5 -0
- package/templates/nx/page-objects/NavigationPage/web.ts +8 -0
- package/templates/nx/page-objects/PlaygroundPage/mobile.ts +26 -0
- package/templates/nx/page-objects/PlaygroundPage/web.ts +29 -0
- package/templates/nx/shared/testing/fixtures/playgroundData.json +7 -0
- package/templates/nx/shared/testing/global-hooks/after/mobile.hook.ts +3 -0
- package/templates/nx/shared/testing/global-hooks/after/web.hook.ts +3 -0
- package/templates/nx/shared/testing/global-hooks/before/mobile.hook.ts +3 -0
- package/templates/nx/shared/testing/global-hooks/before/web.hook.ts +3 -0
- package/templates/nx/shared/testing/page-objects/MatchersPage/mobile.ts +21 -0
- package/templates/nx/shared/testing/page-objects/MatchersPage/web.ts +23 -0
- package/templates/nx/shared/testing/page-objects/NavigationPage/mobile.ts +5 -0
- package/templates/nx/shared/testing/page-objects/NavigationPage/web.ts +8 -0
- package/templates/nx/shared/testing/page-objects/PlaygroundPage/mobile.ts +26 -0
- package/templates/nx/shared/testing/page-objects/PlaygroundPage/web.ts +29 -0
- package/templates/nx/shared/testing/support/actions/fillCredentials/mobile.action.ts +4 -0
- package/templates/nx/shared/testing/support/actions/fillCredentials/web.action.ts +4 -0
- package/templates/nx/shared/testing/support/steps/togglePlaygroundStates/mobile.step.ts +3 -0
- package/templates/nx/shared/testing/support/steps/togglePlaygroundStates/step.md +7 -0
- package/templates/nx/shared/testing/support/steps/togglePlaygroundStates/web.step.ts +5 -0
- package/templates/nx/shared/testing/support/steps/verifyPlaygroundState/mobile.step.ts +4 -0
- package/templates/nx/shared/testing/support/steps/verifyPlaygroundState/step.md +7 -0
- package/templates/nx/shared/testing/support/steps/verifyPlaygroundState/web.step.ts +6 -0
- package/templates/nx/specs/BrowserContext/TC-0007-title-and-navigation/mobile.test.ts +3 -0
- package/templates/nx/specs/BrowserContext/TC-0007-title-and-navigation/spec.md +12 -0
- package/templates/nx/specs/BrowserContext/TC-0007-title-and-navigation/web.test.ts +5 -0
- package/templates/nx/specs/BrowserContext/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/hooks/after/web.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/hooks/before/web.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/specs/BrowserContext/suite.md +9 -0
- package/templates/nx/specs/ContentMatchers/TC-0005-text-and-values/mobile.test.ts +3 -0
- package/templates/nx/specs/ContentMatchers/TC-0005-text-and-values/spec.md +12 -0
- package/templates/nx/specs/ContentMatchers/TC-0005-text-and-values/web.test.ts +7 -0
- package/templates/nx/specs/ContentMatchers/TC-0006-collections-and-empty/mobile.test.ts +3 -0
- package/templates/nx/specs/ContentMatchers/TC-0006-collections-and-empty/spec.md +12 -0
- package/templates/nx/specs/ContentMatchers/TC-0006-collections-and-empty/web.test.ts +6 -0
- package/templates/nx/specs/ContentMatchers/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/hooks/after/web.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/hooks/before/web.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/specs/ContentMatchers/suite.md +9 -0
- package/templates/nx/specs/ElementMatchers/TC-0003-visibility-and-dom/mobile.test.ts +3 -0
- package/templates/nx/specs/ElementMatchers/TC-0003-visibility-and-dom/spec.md +12 -0
- package/templates/nx/specs/ElementMatchers/TC-0003-visibility-and-dom/web.test.ts +5 -0
- package/templates/nx/specs/ElementMatchers/TC-0004-states-and-attributes/mobile.test.ts +3 -0
- package/templates/nx/specs/ElementMatchers/TC-0004-states-and-attributes/spec.md +12 -0
- package/templates/nx/specs/ElementMatchers/TC-0004-states-and-attributes/web.test.ts +8 -0
- package/templates/nx/specs/ElementMatchers/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/hooks/after/web.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/hooks/before/web.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/specs/ElementMatchers/suite.md +9 -0
- package/templates/nx/specs/Playground/TC-0001-form-controls/mobile.test.ts +3 -0
- package/templates/nx/specs/Playground/TC-0001-form-controls/spec.md +12 -0
- package/templates/nx/specs/Playground/TC-0001-form-controls/web.test.ts +6 -0
- package/templates/nx/specs/Playground/TC-0002-toggle-elements/mobile.test.ts +3 -0
- package/templates/nx/specs/Playground/TC-0002-toggle-elements/spec.md +12 -0
- package/templates/nx/specs/Playground/TC-0002-toggle-elements/web.test.ts +6 -0
- package/templates/nx/specs/Playground/hooks/after/mobile.hook.ts +1 -0
- package/templates/nx/specs/Playground/hooks/after/web.hook.ts +1 -0
- package/templates/nx/specs/Playground/hooks/afterEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/Playground/hooks/afterEach/web.hook.ts +1 -0
- package/templates/nx/specs/Playground/hooks/before/mobile.hook.ts +1 -0
- package/templates/nx/specs/Playground/hooks/before/web.hook.ts +1 -0
- package/templates/nx/specs/Playground/hooks/beforeEach/mobile.hook.ts +1 -0
- package/templates/nx/specs/Playground/hooks/beforeEach/web.hook.ts +1 -0
- package/templates/nx/specs/Playground/suite.md +9 -0
- package/templates/nx/spectra.config.ts +1 -1
- package/templates/nx/support/actions/fillCredentials/mobile.action.ts +4 -0
- package/templates/nx/support/actions/fillCredentials/web.action.ts +4 -0
- package/templates/nx/support/steps/togglePlaygroundStates/mobile.step.ts +3 -0
- package/templates/nx/support/steps/togglePlaygroundStates/step.md +7 -0
- package/templates/nx/support/steps/togglePlaygroundStates/web.step.ts +5 -0
- package/templates/nx/support/steps/verifyPlaygroundState/mobile.step.ts +4 -0
- package/templates/nx/support/steps/verifyPlaygroundState/step.md +7 -0
- package/templates/nx/support/steps/verifyPlaygroundState/web.step.ts +6 -0
- package/templates/default/actions/applyDiscount/mobile.action.ts +0 -6
- package/templates/default/actions/applyDiscount/web.action.ts +0 -6
- package/templates/default/actions/verifyOtp/mobile.action.ts +0 -6
- package/templates/default/actions/verifyOtp/web.action.ts +0 -6
- package/templates/default/fixtures/couponCode.json +0 -1
- package/templates/default/fixtures/searchQuery.json +0 -1
- package/templates/default/fixtures/userData.json +0 -1
- package/templates/default/global-hooks/before.web.hook.ts +0 -4
- package/templates/default/page-objects/LoginPage/mobile.ts +0 -32
- package/templates/default/page-objects/LoginPage/web.ts +0 -32
- package/templates/default/page-objects/ProductPage/mobile.ts +0 -39
- package/templates/default/page-objects/ProductPage/web.ts +0 -38
- package/templates/default/page-objects/SettingsPage/common.ts +0 -26
- package/templates/default/specs/Auth/TC-AUTH-01/android.test.ts +0 -6
- package/templates/default/specs/Auth/TC-AUTH-01/ios.test.ts +0 -6
- package/templates/default/specs/Auth/TC-AUTH-01/web.test.ts +0 -13
- package/templates/default/specs/Auth/TC-AUTH-02/android.test.ts +0 -5
- package/templates/default/specs/Auth/TC-AUTH-02/web.test.ts +0 -5
- package/templates/default/specs/Auth/hooks/before.android.hook.ts +0 -3
- package/templates/default/specs/Auth/hooks/before.ios.hook.ts +0 -3
- package/templates/default/specs/Auth/hooks/before.web.hook.ts +0 -3
- package/templates/default/specs/Product/TC-PROD-01/mobile.test.ts +0 -8
- package/templates/default/specs/Product/TC-PROD-01/web.test.ts +0 -8
- package/templates/default/specs/Product/TC-PROD-02/mobile.test.ts +0 -6
- package/templates/default/specs/Product/TC-PROD-02/web.test.ts +0 -6
- package/templates/default/specs/Product/hooks/before.web.hook.ts +0 -3
- package/templates/default/specs/Settings/TC-SET-01/common.test.ts +0 -8
- package/templates/default/steps/loginUser/mobile.step.ts +0 -4
- package/templates/default/steps/loginUser/web.step.ts +0 -4
- package/templates/default/steps/searchProduct/mobile.step.ts +0 -5
- package/templates/default/steps/searchProduct/web.step.ts +0 -5
- package/templates/nx/modules/auth/e2e/actions/verifyOtp/mobile.action.ts +0 -6
- package/templates/nx/modules/auth/e2e/actions/verifyOtp/web.action.ts +0 -6
- package/templates/nx/modules/auth/e2e/fixtures/userData.json +0 -1
- package/templates/nx/modules/auth/e2e/global-hooks/before.web.hook.ts +0 -4
- package/templates/nx/modules/auth/e2e/package.json +0 -19
- package/templates/nx/modules/auth/e2e/page-objects/LoginPage/mobile.ts +0 -32
- package/templates/nx/modules/auth/e2e/page-objects/LoginPage/web.ts +0 -32
- package/templates/nx/modules/auth/e2e/page-objects/SettingsPage/common.ts +0 -26
- package/templates/nx/modules/auth/e2e/project.json +0 -34
- package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-01/android.test.ts +0 -6
- package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-01/ios.test.ts +0 -6
- package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-01/web.test.ts +0 -19
- package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-02/android.test.ts +0 -5
- package/templates/nx/modules/auth/e2e/specs/Auth/TC-AUTH-02/web.test.ts +0 -5
- package/templates/nx/modules/auth/e2e/specs/Auth/hooks/before.android.hook.ts +0 -3
- package/templates/nx/modules/auth/e2e/specs/Auth/hooks/before.ios.hook.ts +0 -3
- package/templates/nx/modules/auth/e2e/specs/Auth/hooks/before.web.hook.ts +0 -3
- package/templates/nx/modules/auth/e2e/specs/Settings/TC-SET-01/common.test.ts +0 -8
- package/templates/nx/modules/auth/e2e/steps/loginUser/mobile.step.ts +0 -4
- package/templates/nx/modules/auth/e2e/steps/loginUser/web.step.ts +0 -4
- package/templates/nx/modules/auth/package.json +0 -7
- package/templates/nx/modules/auth/src/index.ts +0 -3
- package/templates/nx/modules/catalog/package.json +0 -7
- package/templates/nx/modules/catalog/src/index.ts +0 -6
- package/templates/nx/shared/testing/actions/dismissBanner/common.action.ts +0 -6
- package/templates/nx/shared/testing/fixtures/appConfig.json +0 -4
- package/templates/nx/shared/testing/package.json +0 -8
- package/templates/nx/shared/testing/page-objects/NavigationBar/common.ts +0 -13
- package/templates/nx/shared/testing/steps/loginAsAdmin/common.step.ts +0 -4
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export default class ProductPage {
|
|
2
|
-
static get searchInput(): ChainablePromiseElement {
|
|
3
|
-
return $('~search_input');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
static get categorySelect(): ChainablePromiseElement {
|
|
7
|
-
return $('~category_picker');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static get productList(): ChainablePromiseElement {
|
|
11
|
-
return $('~product_list');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static get firstProductCard(): ChainablePromiseElement {
|
|
15
|
-
return $('~product_item_0');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static get addToCartButton(): ChainablePromiseElement {
|
|
19
|
-
return $('~btn_add_to_cart');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static get cartBadge(): ChainablePromiseElement {
|
|
23
|
-
return $('~cart_badge');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static async open() {
|
|
27
|
-
// Mobile in-app navigation to products tab
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static async filterByCategory(category: string) {
|
|
31
|
-
await Spectra.click(this.categorySelect);
|
|
32
|
-
await Spectra.click(`~option_${category}`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static async addFirstProductToCart() {
|
|
36
|
-
await Spectra.swipe({ direction: "down", distance: 400 });
|
|
37
|
-
await Spectra.click(this.addToCartButton);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export default class ProductPage {
|
|
2
|
-
static get searchInput(): ChainablePromiseElement {
|
|
3
|
-
return $('#search-input');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
static get categorySelect(): ChainablePromiseElement {
|
|
7
|
-
return $('#category-select');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static get productList(): ChainablePromiseElement {
|
|
11
|
-
return $('#product-grid');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static get firstProductCard(): ChainablePromiseElement {
|
|
15
|
-
return $('.product-card');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static get addToCartButton(): ChainablePromiseElement {
|
|
19
|
-
return $('#add-to-cart');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static get cartBadge(): ChainablePromiseElement {
|
|
23
|
-
return $('#cart-count');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static async open() {
|
|
27
|
-
await Spectra.navigate('/products');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static async filterByCategory(category: string) {
|
|
31
|
-
await Spectra.select(this.categorySelect, category);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
static async addFirstProductToCart() {
|
|
35
|
-
await Spectra.scroll({ selector: this.firstProductCard });
|
|
36
|
-
await Spectra.click(this.addToCartButton);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default class SettingsPage {
|
|
2
|
-
static get darkModeToggle(): ChainablePromiseElement {
|
|
3
|
-
return $('[data-testid="dark-mode-toggle"]');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
static get languageDropdown(): ChainablePromiseElement {
|
|
7
|
-
return $('[data-testid="language-select"]');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static get saveButton(): ChainablePromiseElement {
|
|
11
|
-
return $('[data-testid="save-settings"]');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static get statusMessage(): ChainablePromiseElement {
|
|
15
|
-
return $('[data-testid="status-message"]');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static async open() {
|
|
19
|
-
await Spectra.navigate('/settings');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static async toggleDarkMode() {
|
|
23
|
-
await Spectra.click(this.darkModeToggle);
|
|
24
|
-
await Spectra.click(this.saveButton);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
it("should authenticate user and verify flash message across specific platforms", async () => {
|
|
2
|
-
await browser.intercept("/api/status", "GET", Fixture.userData);
|
|
3
|
-
|
|
4
|
-
// 1. Navigation via Page Object
|
|
5
|
-
await LoginPage.open();
|
|
6
|
-
|
|
7
|
-
// 2. High-level business flow via Shared Step & Page Object
|
|
8
|
-
await Step.loginUser("tomsmith", "SuperSecretPassword!");
|
|
9
|
-
|
|
10
|
-
// 3. Direct callable assertion on Page Object element
|
|
11
|
-
await LoginPage.flashAlert.shouldBeVisible();
|
|
12
|
-
await LoginPage.flashAlert.shouldContainText("You logged into a secure area!");
|
|
13
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
it("should filter products by category and add to cart on Mobile (Android & iOS)", async () => {
|
|
2
|
-
await ProductPage.open();
|
|
3
|
-
await ProductPage.filterByCategory("Electronics");
|
|
4
|
-
await ProductPage.addFirstProductToCart();
|
|
5
|
-
|
|
6
|
-
await ProductPage.cartBadge.shouldBeVisible();
|
|
7
|
-
await ProductPage.cartBadge.shouldHaveText("1");
|
|
8
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
it("should filter products by category and add to cart on Web", async () => {
|
|
2
|
-
await ProductPage.open();
|
|
3
|
-
await ProductPage.filterByCategory("Electronics");
|
|
4
|
-
await ProductPage.addFirstProductToCart();
|
|
5
|
-
|
|
6
|
-
await ProductPage.cartBadge.shouldBeVisible();
|
|
7
|
-
await ProductPage.cartBadge.shouldHaveText("1");
|
|
8
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
it("should toggle dark mode setting across all platforms (Common)", async () => {
|
|
2
|
-
await SettingsPage.open();
|
|
3
|
-
await SettingsPage.darkModeToggle.shouldBeVisible();
|
|
4
|
-
await SettingsPage.toggleDarkMode();
|
|
5
|
-
|
|
6
|
-
await SettingsPage.statusMessage.shouldBeVisible();
|
|
7
|
-
await SettingsPage.statusMessage.shouldContainText("Settings saved");
|
|
8
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"username": "tomsmith", "role": "admin"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auth-e2e",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "spectra run",
|
|
8
|
-
"type-check": "tsc -b"
|
|
9
|
-
},
|
|
10
|
-
"devDependencies": {
|
|
11
|
-
"@testspectra/cli": "workspace:*",
|
|
12
|
-
"@testspectra/shared-testing": "workspace:*",
|
|
13
|
-
"@types/node": "^20.14.0",
|
|
14
|
-
"@wdio/globals": "^9.2.8",
|
|
15
|
-
"@wdio/mocha-framework": "^9.2.8",
|
|
16
|
-
"webdriverio": "^9.2.8",
|
|
17
|
-
"typescript": "^5.4.5"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -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
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default class SettingsPage {
|
|
2
|
-
static get darkModeToggle(): ChainablePromiseElement {
|
|
3
|
-
return $('[data-testid="dark-mode-toggle"]');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
static get languageDropdown(): ChainablePromiseElement {
|
|
7
|
-
return $('[data-testid="language-select"]');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static get saveButton(): ChainablePromiseElement {
|
|
11
|
-
return $('[data-testid="save-settings"]');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static get statusMessage(): ChainablePromiseElement {
|
|
15
|
-
return $('[data-testid="status-message"]');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static async open() {
|
|
19
|
-
await Spectra.navigate('/settings');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static async toggleDarkMode() {
|
|
23
|
-
await Spectra.click(this.darkModeToggle);
|
|
24
|
-
await Spectra.click(this.saveButton);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auth-e2e",
|
|
3
|
-
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"projectType": "application",
|
|
5
|
-
"sourceRoot": "modules/auth/e2e",
|
|
6
|
-
"targets": {
|
|
7
|
-
"e2e": {
|
|
8
|
-
"executor": "nx:run-commands",
|
|
9
|
-
"options": {
|
|
10
|
-
"command": "spectra run",
|
|
11
|
-
"cwd": "modules/auth/e2e"
|
|
12
|
-
},
|
|
13
|
-
"configurations": {
|
|
14
|
-
"android": {
|
|
15
|
-
"command": "spectra run --target android"
|
|
16
|
-
},
|
|
17
|
-
"ios": {
|
|
18
|
-
"command": "spectra run --target ios"
|
|
19
|
-
},
|
|
20
|
-
"headless": {
|
|
21
|
-
"command": "spectra run --headless"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"type-check": {
|
|
26
|
-
"executor": "nx:run-commands",
|
|
27
|
-
"options": {
|
|
28
|
-
"command": "tsc -b tsconfig.spectra.json",
|
|
29
|
-
"cwd": "."
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"tags": ["scope:auth", "type:e2e"]
|
|
34
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
it("should authenticate user and verify flash message across specific platforms", async () => {
|
|
2
|
-
// 1. Global Fixtures (Module Fixture + Shared Workspace Fixture)
|
|
3
|
-
await browser.intercept("/api/status", "GET", Fixture.userData);
|
|
4
|
-
|
|
5
|
-
// 2. Global Shared Action from shared/testing (dismiss global banner if present)
|
|
6
|
-
await Spectra.dismissBanner();
|
|
7
|
-
|
|
8
|
-
// 3. Navigation via Module Page Object & Shared Page Object
|
|
9
|
-
await LoginPage.open();
|
|
10
|
-
await NavigationBar.goToHome();
|
|
11
|
-
await LoginPage.open();
|
|
12
|
-
|
|
13
|
-
// 4. High-level business flow via Shared Step from shared/testing
|
|
14
|
-
await Step.loginAsAdmin();
|
|
15
|
-
|
|
16
|
-
// 5. Direct callable assertion on Page Object element
|
|
17
|
-
await LoginPage.flashAlert.shouldBeVisible();
|
|
18
|
-
await LoginPage.flashAlert.shouldContainText("You logged into a secure area!");
|
|
19
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
it("should toggle dark mode setting across all platforms (Common)", async () => {
|
|
2
|
-
await SettingsPage.open();
|
|
3
|
-
await SettingsPage.darkModeToggle.shouldBeVisible();
|
|
4
|
-
await SettingsPage.toggleDarkMode();
|
|
5
|
-
|
|
6
|
-
await SettingsPage.statusMessage.shouldBeVisible();
|
|
7
|
-
await SettingsPage.statusMessage.shouldContainText("Settings saved");
|
|
8
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default class NavigationBar {
|
|
2
|
-
static get logo(): ChainablePromiseElement {
|
|
3
|
-
return $('header .logo');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
static get profileMenu(): ChainablePromiseElement {
|
|
7
|
-
return $('header .user-profile');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static async goToHome() {
|
|
11
|
-
await this.logo.click();
|
|
12
|
-
}
|
|
13
|
-
}
|