@orion-qa/orion 3.0.0 → 3.2.0
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/.claude/agents/automation-strategist.md +1 -0
- package/.claude/agents/change-agent.md +1 -0
- package/.claude/agents/codebase-analyst.md +2 -1
- package/.claude/agents/environment-discovery.md +1 -0
- package/.claude/agents/evidence-validator.md +1 -0
- package/.claude/agents/executor.md +1 -0
- package/.claude/agents/failure-analyst.md +2 -1
- package/.claude/agents/implementer.md +2 -1
- package/.claude/agents/requirement-analyst.md +1 -0
- package/.claude/agents/reviewer.md +1 -0
- package/.claude/agents/test-reporter.md +1 -0
- package/.claude/settings.json +25 -0
- package/.claude/skills/appium/SKILL.md +1 -1
- package/.claude/skills/appium/templates/README.md +6 -9
- package/.claude/skills/appium/templates/ci/github-actions-android.yml +8 -2
- package/.claude/skills/appium/templates/ci/github-actions-ios.yml +8 -2
- package/.claude/skills/appium/templates/ci/github-actions-windows.yml +9 -2
- package/.claude/skills/appium/templates/project-java/.env.example +4 -0
- package/.claude/skills/appium/templates/project-java/pom.xml +2 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework/Config.java → config/Env.java} +43 -52
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/config/Flags.java +45 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/config/Paths.java +14 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/desc/SignInDesc.java +30 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → driver}/DriverFactory.java +19 -13
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → driver}/DriverManager.java +12 -9
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/fixtures/BaseTest.java +75 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{screens → pageObjects}/BaseScreen.java +12 -12
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/HomeScreen.java +26 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/LoginScreen.java +63 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/ShellScreen.java +26 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/setup/AuthSetup.java +49 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/testData/TestData.java +78 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/ui/SignInTest.java +45 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → utils}/AutomationError.java +4 -4
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Case.java +20 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/CaseTransformer.java +54 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Dates.java +42 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Log.java +45 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/MissingSettingError.java +13 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/RandomData.java +41 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Redact.java +33 -0
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/TestDescription.java +25 -0
- package/.claude/skills/appium/templates/project-java/src/test/resources/testData/testData.properties +7 -0
- package/.claude/skills/appium/templates/project-java/testng.xml +11 -4
- package/.claude/skills/architecture-analysis/SKILL.md +3 -2
- package/.claude/skills/automation-implementation/SKILL.md +8 -5
- package/.claude/skills/automation-implementation/references/patterns.md +46 -24
- package/.claude/skills/automation-review/references/assertion-guard.md +1 -1
- package/.claude/skills/code-review/SKILL.md +5 -2
- package/.claude/skills/code-review/references/pattern-rules.md +12 -7
- package/.claude/skills/documentation/SKILL.md +23 -18
- package/.claude/skills/execution/SKILL.md +7 -3
- package/.claude/skills/httpclient/templates/README.md +6 -7
- package/.claude/skills/httpclient/templates/csharp-nunit/.env.example +4 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Automation.csproj +7 -3
- package/.claude/skills/httpclient/templates/csharp-nunit/Config/Env.cs +62 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Config/Flags.cs +35 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Config/Paths.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Fixtures/BaseTest.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Resources/Desc/ProductsDesc.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Resources/TestData/TestData.cs +61 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Resources/TestData/testData.json +9 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Services/ApiClient.cs +48 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Services/HealthApi.cs +11 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/{Api → Services}/ProductsApi.cs +8 -5
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/Api/ProductsTests.cs +61 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/Unit/UtilsTests.cs +40 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/AutomationError.cs +15 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Dates.cs +18 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Log.cs +37 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/RandomData.cs +26 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Redact.cs +22 -0
- package/.claude/skills/httpclient/templates/csharp-nunit/Utils/TestDescription.cs +55 -0
- package/.claude/skills/javascript/references/sources.md +1 -1
- package/.claude/skills/k6/SKILL.md +1 -1
- package/.claude/skills/k6/templates/README.md +5 -3
- package/.claude/skills/k6/templates/project/{data/cases.js → resources/desc/products.desc.js} +1 -1
- package/.claude/skills/k6/templates/project/resources/testData/testData.js +32 -0
- package/.claude/skills/k6/templates/project/{lib/config.js → src/config/env.js} +10 -5
- package/.claude/skills/k6/templates/project/{lib → src/services}/products-api.js +7 -5
- package/.claude/skills/k6/templates/project/{load → tests/load}/products.js +8 -8
- package/.claude/skills/karate/templates/README.md +4 -5
- package/.claude/skills/karate/templates/java-junit5/.env.example +2 -0
- package/.claude/skills/karate/templates/java-junit5/pom.xml +4 -0
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{support → config}/EnvSettings.java +1 -1
- package/.claude/skills/karate/templates/java-junit5/src/test/java/karate-config.js +13 -6
- package/.claude/skills/karate/templates/java-junit5/src/test/java/logback-test.xml +1 -1
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests}/ApiTest.java +7 -4
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests/api}/health.feature +3 -3
- package/.claude/skills/karate/templates/java-junit5/src/test/java/tests/api/products.feature +29 -0
- package/.claude/skills/karate/templates/java-junit5/src/test/java/{support → utils}/MaskingLogModifier.java +1 -1
- package/.claude/skills/karate/templates/java-junit5/src/test/resources/testData/newProduct.js +7 -0
- package/.claude/skills/karate/templates/java-junit5/src/test/resources/testData/testData.json +6 -0
- package/.claude/skills/newman/templates/README.md +4 -5
- package/.claude/skills/newman/templates/collection/.env.example +2 -0
- package/.claude/skills/newman/templates/collection/collections/api.postman_collection.json +165 -145
- package/.claude/skills/newman/templates/collection/package.json +2 -1
- package/.claude/skills/newman/templates/collection/resources/desc/products.desc.json +53 -0
- package/.claude/skills/newman/templates/collection/resources/testData/testData.json +10 -0
- package/.claude/skills/newman/templates/collection/run.js +41 -31
- package/.claude/skills/newman/templates/collection/src/config/env.js +37 -0
- package/.claude/skills/orion/SKILL.md +19 -12
- package/.claude/skills/orion/references/assess-fix.md +35 -0
- package/.claude/skills/orion/references/batch.md +64 -0
- package/.claude/skills/orion/references/blockers.md +1 -1
- package/.claude/skills/orion/references/capabilities.md +1 -1
- package/.claude/skills/orion/references/conversation.md +65 -20
- package/.claude/skills/orion/references/delivery-formats.md +24 -36
- package/.claude/skills/orion/references/doctor.md +1 -1
- package/.claude/skills/orion/references/hosts.md +1 -0
- package/.claude/skills/orion/references/modes.md +7 -3
- package/.claude/skills/orion/references/plain-language.md +55 -0
- package/.claude/skills/orion/references/project-context-files.md +8 -2
- package/.claude/skills/orion/references/recovery-loop.md +8 -0
- package/.claude/skills/orion/references/setup-card.md +29 -8
- package/.claude/skills/orion/references/status-lines.md +9 -4
- package/.claude/skills/orion/references/task-brief.md +1 -0
- package/.claude/skills/orion/references/work-branch.md +3 -1
- package/.claude/skills/orion/scripts/batch_detect.mjs +98 -0
- package/.claude/skills/orion/scripts/batch_state.mjs +179 -0
- package/.claude/skills/orion/scripts/browser_setup.mjs +41 -21
- package/.claude/skills/orion/scripts/cases_export.py +724 -0
- package/.claude/skills/orion/scripts/codemap.mjs +116 -0
- package/.claude/skills/orion/scripts/done_check.mjs +195 -0
- package/.claude/skills/orion/scripts/env_check.mjs +8 -3
- package/.claude/skills/orion/scripts/env_check.py +12 -5
- package/.claude/skills/orion/scripts/fix_plan.mjs +170 -0
- package/.claude/skills/orion/scripts/graph.mjs +400 -0
- package/.claude/skills/orion/scripts/hooks/lean_guard.mjs +162 -0
- package/.claude/skills/orion/scripts/lib/inside.mjs +31 -0
- package/.claude/skills/orion/scripts/lib/scan.mjs +357 -0
- package/.claude/skills/orion/scripts/lib/table.mjs +116 -0
- package/.claude/skills/orion/scripts/parity_check.mjs +166 -0
- package/.claude/skills/orion/scripts/quiet.mjs +160 -0
- package/.claude/skills/orion/scripts/report_check.mjs +77 -0
- package/.claude/skills/orion/scripts/results_parse.mjs +209 -0
- package/.claude/skills/orion/scripts/reuse_check.mjs +251 -0
- package/.claude/skills/orion/scripts/rules.mjs +92 -0
- package/.claude/skills/orion/scripts/run_state.mjs +238 -0
- package/.claude/skills/orion/scripts/suite_check.mjs +267 -0
- package/.claude/skills/orion/scripts/timing_profile.mjs +128 -0
- package/.claude/skills/orion/scripts/usage_report.mjs +315 -0
- package/.claude/skills/orion/templates/project-context/assessment.md +45 -0
- package/.claude/skills/orion/templates/project-context/defects.md +5 -0
- package/.claude/skills/orion/templates/project-context/report.md +45 -0
- package/.claude/skills/orion/templates/project-context/retry-policy.md +6 -0
- package/.claude/skills/orion/templates/project-context/run.md +4 -1
- package/.claude/skills/orion/templates/project-context/test-case-map.md +5 -0
- package/.claude/skills/orion/templates/project-context/test-design.md +24 -0
- package/.claude/skills/pact/SKILL.md +2 -2
- package/.claude/skills/pact/templates/README.md +4 -2
- package/.claude/skills/pact/templates/project/package.json +2 -2
- package/.claude/skills/pact/templates/project/{data/cases.js → resources/desc/products.desc.js} +3 -3
- package/.claude/skills/pact/templates/project/resources/testData/testData.js +21 -0
- package/.claude/skills/pact/templates/project/src/config/env.js +32 -0
- package/.claude/skills/pact/templates/project/src/{products-client.js → services/products-client.js} +4 -2
- package/.claude/skills/pact/templates/project/tests/contract/products.contract.test.js +46 -0
- package/.claude/skills/pact/templates/project/{verify → tests/verify}/products.verify.js +7 -22
- package/.claude/skills/playwright/SKILL.md +6 -6
- package/.claude/skills/playwright/templates/README.md +29 -10
- package/.claude/skills/playwright/templates/ci/Jenkinsfile +1 -1
- package/.claude/skills/playwright/templates/ci/azure-pipelines.yml +1 -1
- package/.claude/skills/playwright/templates/ci/github-actions-javascript.yml +1 -1
- package/.claude/skills/playwright/templates/ci/github-actions.yml +1 -1
- package/.claude/skills/playwright/templates/ci/gitlab-ci.yml +1 -1
- package/.claude/skills/playwright/templates/dotnet/.env.example +7 -0
- package/.claude/skills/playwright/templates/dotnet/.runsettings +17 -0
- package/.claude/skills/playwright/templates/dotnet/Automation.csproj +8 -0
- package/.claude/skills/playwright/templates/dotnet/Config/Env.cs +89 -0
- package/.claude/skills/playwright/templates/dotnet/Config/Flags.cs +56 -0
- package/.claude/skills/playwright/templates/dotnet/Config/Paths.cs +31 -0
- package/.claude/skills/playwright/templates/dotnet/Fixtures/ApiBaseTest.cs +39 -0
- package/.claude/skills/playwright/templates/dotnet/Fixtures/BaseTest.cs +72 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/BasePage.cs +63 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/HomePage.cs +21 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/LoginPage.cs +54 -0
- package/.claude/skills/playwright/templates/dotnet/PageObjects/ShellPage.cs +29 -0
- package/.claude/skills/playwright/templates/dotnet/Resources/Desc/SignInDesc.cs +23 -0
- package/.claude/skills/playwright/templates/dotnet/Resources/TestData/TestData.cs +74 -0
- package/.claude/skills/playwright/templates/dotnet/Resources/TestData/testData.json +19 -0
- package/.claude/skills/playwright/templates/dotnet/Services/ApiClient.cs +51 -0
- package/.claude/skills/playwright/templates/dotnet/Setup/AuthSetup.cs +63 -0
- package/.claude/skills/playwright/templates/dotnet/Tests/Api/SessionTests.cs +18 -0
- package/.claude/skills/playwright/templates/dotnet/Tests/Ui/SignInTests.cs +48 -0
- package/.claude/skills/playwright/templates/dotnet/Tests/Unit/UtilsTests.cs +40 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/AutomationError.cs +15 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/Dates.cs +18 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/Log.cs +37 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/RandomData.cs +26 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/Redact.cs +22 -0
- package/.claude/skills/playwright/templates/dotnet/Utils/TestDescription.cs +55 -0
- package/.claude/skills/playwright/templates/dotnet/gitignore +6 -1
- package/.claude/skills/playwright/templates/javascript/.env.example +8 -0
- package/.claude/skills/playwright/templates/javascript/fixtures/index.js +85 -0
- package/.claude/skills/playwright/templates/javascript/fixtures/session.js +82 -0
- package/.claude/skills/playwright/templates/javascript/gitignore +7 -0
- package/.claude/skills/playwright/templates/javascript/jsconfig.json +12 -0
- package/.claude/skills/playwright/templates/javascript/package.json +7 -3
- package/.claude/skills/playwright/templates/javascript/pageObjects/basePage.js +62 -0
- package/.claude/skills/playwright/templates/javascript/pageObjects/homePage.js +19 -0
- package/.claude/skills/playwright/templates/javascript/pageObjects/loginPage.js +44 -0
- package/.claude/skills/playwright/templates/javascript/pageObjects/shellPage.js +26 -0
- package/.claude/skills/playwright/templates/javascript/playwright.config.js +45 -24
- package/.claude/skills/playwright/templates/javascript/reporters/summaryReporter.js +233 -0
- package/.claude/skills/playwright/templates/javascript/resources/desc/signIn.desc.js +33 -0
- package/.claude/skills/playwright/templates/javascript/resources/testData/testData.js +45 -0
- package/.claude/skills/playwright/templates/javascript/setup/auth.setup.js +17 -0
- package/.claude/skills/playwright/templates/javascript/setup/auth.teardown.js +16 -0
- package/.claude/skills/playwright/templates/javascript/src/config/env.js +107 -0
- package/.claude/skills/playwright/templates/javascript/src/config/flags.js +70 -0
- package/.claude/skills/playwright/templates/javascript/src/config/loadEnv.js +21 -0
- package/.claude/skills/playwright/templates/javascript/src/config/paths.js +22 -0
- package/.claude/skills/playwright/templates/javascript/src/services/apiClient.js +68 -0
- package/.claude/skills/playwright/templates/javascript/tests/api/session.spec.js +15 -0
- package/.claude/skills/playwright/templates/javascript/tests/ui/signIn.spec.js +35 -0
- package/.claude/skills/playwright/templates/javascript/tests/unit/summaryReporter.test.js +34 -0
- package/.claude/skills/playwright/templates/javascript/tests/unit/utils.test.js +31 -0
- package/.claude/skills/playwright/templates/javascript/utils/date.js +28 -0
- package/.claude/skills/playwright/templates/javascript/{src → utils}/errors.js +1 -0
- package/.claude/skills/playwright/templates/javascript/utils/formFill.js +29 -0
- package/.claude/skills/playwright/templates/javascript/utils/logger.js +33 -0
- package/.claude/skills/playwright/templates/javascript/utils/random.js +37 -0
- package/.claude/skills/playwright/templates/javascript/utils/redact.js +35 -0
- package/.claude/skills/playwright/templates/javascript/utils/titles.js +38 -0
- package/.claude/skills/playwright/templates/project/.env.example +8 -0
- package/.claude/skills/playwright/templates/project/fixtures/index.ts +86 -0
- package/.claude/skills/playwright/templates/project/fixtures/session.ts +78 -0
- package/.claude/skills/playwright/templates/project/gitignore +9 -2
- package/.claude/skills/playwright/templates/project/package.json +8 -6
- package/.claude/skills/playwright/templates/project/pageObjects/basePage.ts +57 -0
- package/.claude/skills/playwright/templates/project/pageObjects/homePage.ts +20 -0
- package/.claude/skills/playwright/templates/project/pageObjects/loginPage.ts +47 -0
- package/.claude/skills/playwright/templates/project/pageObjects/shellPage.ts +22 -0
- package/.claude/skills/playwright/templates/project/playwright.config.ts +49 -23
- package/.claude/skills/playwright/templates/project/reporters/summaryReporter.ts +241 -0
- package/.claude/skills/playwright/templates/project/resources/desc/signIn.desc.ts +32 -0
- package/.claude/skills/playwright/templates/project/resources/testData/testData.ts +42 -0
- package/.claude/skills/playwright/templates/project/setup/auth.setup.ts +16 -0
- package/.claude/skills/playwright/templates/project/setup/auth.teardown.ts +15 -0
- package/.claude/skills/playwright/templates/project/src/config/env.ts +109 -0
- package/.claude/skills/playwright/templates/project/src/config/flags.ts +70 -0
- package/.claude/skills/playwright/templates/project/src/config/loadEnv.ts +17 -0
- package/.claude/skills/playwright/templates/project/src/config/paths.ts +19 -0
- package/.claude/skills/playwright/templates/project/src/services/apiClient.ts +70 -0
- package/.claude/skills/playwright/templates/project/tests/api/session.spec.ts +14 -0
- package/.claude/skills/playwright/templates/project/tests/ui/signIn.spec.ts +34 -0
- package/.claude/skills/playwright/templates/project/tests/unit/summaryReporter.test.ts +33 -0
- package/.claude/skills/playwright/templates/project/tests/unit/utils.test.ts +30 -0
- package/.claude/skills/playwright/templates/project/tsconfig.json +3 -8
- package/.claude/skills/playwright/templates/project/utils/date.ts +25 -0
- package/.claude/skills/playwright/templates/project/utils/formFill.ts +27 -0
- package/.claude/skills/playwright/templates/project/utils/logger.ts +32 -0
- package/.claude/skills/playwright/templates/project/utils/random.ts +34 -0
- package/.claude/skills/playwright/templates/project/utils/redact.ts +32 -0
- package/.claude/skills/playwright/templates/project/utils/titles.ts +42 -0
- package/.claude/skills/playwright/templates/python/.env.example +8 -0
- package/.claude/skills/playwright/templates/python/conftest.py +91 -16
- package/.claude/skills/playwright/templates/python/gitignore +5 -0
- package/.claude/skills/playwright/templates/python/page_objects/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/page_objects/base_page.py +57 -0
- package/.claude/skills/playwright/templates/python/page_objects/home_page.py +22 -0
- package/.claude/skills/playwright/templates/python/page_objects/login_page.py +42 -0
- package/.claude/skills/playwright/templates/python/page_objects/shell_page.py +21 -0
- package/.claude/skills/playwright/templates/python/pytest.ini +5 -2
- package/.claude/skills/playwright/templates/python/requirements.txt +1 -0
- package/.claude/skills/playwright/templates/python/resources/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/resources/desc/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/resources/desc/sign_in_desc.py +27 -0
- package/.claude/skills/playwright/templates/python/resources/test_data/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/resources/test_data/test_data.py +41 -0
- package/.claude/skills/playwright/templates/python/setup/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/setup/auth.py +53 -0
- package/.claude/skills/playwright/templates/python/src/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/src/config/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/src/config/env.py +109 -0
- package/.claude/skills/playwright/templates/python/src/config/flags.py +63 -0
- package/.claude/skills/playwright/templates/python/src/config/load_env.py +16 -0
- package/.claude/skills/playwright/templates/python/src/config/paths.py +25 -0
- package/.claude/skills/playwright/templates/python/src/services/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/src/services/api_client.py +60 -0
- package/.claude/skills/playwright/templates/python/tests/api/test_session.py +14 -0
- package/.claude/skills/playwright/templates/python/tests/ui/test_sign_in.py +36 -0
- package/.claude/skills/playwright/templates/python/tests/unit/test_utils.py +32 -0
- package/.claude/skills/playwright/templates/python/utils/__init__.py +1 -0
- package/.claude/skills/playwright/templates/python/utils/dates.py +23 -0
- package/.claude/skills/playwright/templates/python/{framework → utils}/errors.py +3 -2
- package/.claude/skills/playwright/templates/python/utils/form_fill.py +26 -0
- package/.claude/skills/playwright/templates/python/utils/logger.py +40 -0
- package/.claude/skills/playwright/templates/python/utils/markers.py +6 -0
- package/.claude/skills/playwright/templates/python/utils/random_data.py +35 -0
- package/.claude/skills/playwright/templates/python/utils/redact.py +30 -0
- package/.claude/skills/playwright/templates/python/utils/titles.py +53 -0
- package/.claude/skills/quality-checks/SKILL.md +11 -11
- package/.claude/skills/quality-checks/templates/README.md +14 -12
- package/.claude/skills/quality-checks/templates/playwright-js/pageObjects/scannedPage.js +21 -0
- package/.claude/skills/quality-checks/templates/playwright-js/resources/desc/quality.desc.js +63 -0
- package/.claude/skills/quality-checks/templates/playwright-js/resources/testData/qualityData.js +32 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/checks/accessibility.js +50 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/checks/pageHealth.js +38 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/checks/performance.js +21 -0
- package/.claude/skills/quality-checks/templates/playwright-js/src/services/graphqlClient.js +28 -0
- package/.claude/skills/quality-checks/templates/playwright-js/tests/api/graphql.spec.js +23 -0
- package/.claude/skills/quality-checks/templates/playwright-js/tests/ui/quality.spec.js +50 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/pageObjects/scannedPage.ts +20 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/resources/desc/quality.desc.ts +59 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/{src/data/quality.data.ts → resources/testData/qualityData.ts} +3 -2
- package/.claude/skills/quality-checks/templates/playwright-ts/tests/api/graphql.spec.ts +22 -0
- package/.claude/skills/quality-checks/templates/playwright-ts/tests/ui/quality.spec.ts +49 -0
- package/.claude/skills/requests/templates/README.md +6 -7
- package/.claude/skills/requests/templates/python-pytest/.env.example +4 -0
- package/.claude/skills/requests/templates/python-pytest/conftest.py +24 -9
- package/.claude/skills/requests/templates/python-pytest/pytest.ini +6 -3
- package/.claude/skills/requests/templates/python-pytest/requirements.txt +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/desc/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/desc/products_desc.py +27 -0
- package/.claude/skills/requests/templates/python-pytest/resources/test_data/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/resources/test_data/test_data.py +27 -0
- package/.claude/skills/requests/templates/python-pytest/src/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/env.py +39 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/flags.py +35 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/load_env.py +16 -0
- package/.claude/skills/requests/templates/python-pytest/src/config/paths.py +16 -0
- package/.claude/skills/requests/templates/python-pytest/src/services/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/{api/client.py → src/services/api_client.py} +19 -10
- package/.claude/skills/requests/templates/python-pytest/{api → src/services}/products_api.py +3 -9
- package/.claude/skills/requests/templates/python-pytest/tests/api/test_products.py +35 -0
- package/.claude/skills/requests/templates/python-pytest/tests/unit/test_utils.py +32 -0
- package/.claude/skills/requests/templates/python-pytest/utils/__init__.py +1 -0
- package/.claude/skills/requests/templates/python-pytest/utils/dates.py +23 -0
- package/.claude/skills/{selenium/templates/python-pytest/framework → requests/templates/python-pytest/utils}/errors.py +4 -3
- package/.claude/skills/requests/templates/python-pytest/utils/logger.py +40 -0
- package/.claude/skills/requests/templates/python-pytest/utils/random_data.py +35 -0
- package/.claude/skills/requests/templates/python-pytest/utils/redact.py +30 -0
- package/.claude/skills/requests/templates/python-pytest/utils/titles.py +53 -0
- package/.claude/skills/requirement-analysis/SKILL.md +1 -1
- package/.claude/skills/rest-assured/SKILL.md +1 -1
- package/.claude/skills/rest-assured/templates/README.md +6 -7
- package/.claude/skills/rest-assured/templates/ci/github-actions.yml +5 -2
- package/.claude/skills/rest-assured/templates/java-testng/.env.example +3 -0
- package/.claude/skills/rest-assured/templates/java-testng/pom.xml +7 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{api/ApiConfig.java → config/Env.java} +35 -22
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Flags.java +17 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Paths.java +14 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/desc/ProductsDesc.java +26 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/fixtures/BaseTest.java +29 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/services/ApiSpec.java +31 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/services/HealthApi.java +17 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{api → services}/ProductsApi.java +19 -14
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{data → testData}/ProductBuilder.java +4 -8
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/testData/TestData.java +64 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/api/ProductsTest.java +49 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
- package/.claude/skills/{selenium/templates/java-testng/src/test/java/automation/framework → rest-assured/templates/java-testng/src/test/java/automation/utils}/AutomationError.java +4 -4
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Case.java +20 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/CaseTransformer.java +54 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Dates.java +42 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Log.java +45 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/MissingSettingError.java +13 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/RandomData.java +41 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Redact.java +33 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/TestDescription.java +25 -0
- package/.claude/skills/rest-assured/templates/java-testng/src/test/resources/testData/testData.properties +14 -0
- package/.claude/skills/rest-assured/templates/java-testng/testng.xml +14 -0
- package/.claude/skills/selenium/SKILL.md +1 -1
- package/.claude/skills/selenium/templates/README.md +25 -13
- package/.claude/skills/selenium/templates/ci/github-actions-java.yml +5 -2
- package/.claude/skills/selenium/templates/csharp-nunit/.env.example +15 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Automation.csproj +7 -0
- package/.claude/skills/selenium/templates/csharp-nunit/{Framework/Config.cs → Config/Env.cs} +33 -34
- package/.claude/skills/selenium/templates/csharp-nunit/Config/Flags.cs +39 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Config/Paths.cs +31 -0
- package/.claude/skills/selenium/templates/csharp-nunit/{Framework → Driver}/DriverFactory.cs +16 -13
- package/.claude/skills/selenium/templates/csharp-nunit/Driver/DriverManager.cs +27 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Fixtures/BaseTest.cs +56 -0
- package/.claude/skills/selenium/templates/csharp-nunit/{Pages → PageObjects}/BasePage.cs +44 -14
- package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/HomePage.cs +21 -0
- package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/LoginPage.cs +53 -0
- package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/ShellPage.cs +22 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Resources/Desc/SignInDesc.cs +23 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Resources/TestData/TestData.cs +74 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Resources/TestData/testData.json +14 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Services/ApiClient.cs +71 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Setup/AuthSetup.cs +104 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/Api/SessionTests.cs +23 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/Ui/SignInTests.cs +42 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/Unit/UtilsTests.cs +40 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/AutomationError.cs +15 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/Dates.cs +18 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/FormFill.cs +20 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/Log.cs +37 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/RandomData.cs +26 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/Redact.cs +22 -0
- package/.claude/skills/selenium/templates/csharp-nunit/Utils/TestDescription.cs +55 -0
- package/.claude/skills/selenium/templates/csharp-nunit/gitignore +6 -2
- package/.claude/skills/selenium/templates/java-testng/.env.example +12 -0
- package/.claude/skills/selenium/templates/java-testng/gitignore +5 -2
- package/.claude/skills/selenium/templates/java-testng/pom.xml +2 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework/Config.java → config/Env.java} +45 -55
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/config/Flags.java +50 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/config/Paths.java +20 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/desc/SignInDesc.java +30 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework → driver}/DriverFactory.java +15 -12
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework → driver}/DriverManager.java +4 -7
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/fixtures/BaseTest.java +87 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{pages → pageObjects}/BasePage.java +41 -17
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/HomePage.java +32 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/LoginPage.java +69 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/ShellPage.java +34 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/services/ApiClient.java +93 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/setup/AuthSetup.java +125 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/testData/TestData.java +88 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/api/SessionTest.java +23 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/ui/SignInTest.java +46 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/AutomationError.java +18 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Case.java +20 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/CaseTransformer.java +54 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Dates.java +42 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/FormFill.java +25 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Log.java +45 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/MissingSettingError.java +13 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/RandomData.java +41 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Redact.java +33 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/TestDescription.java +25 -0
- package/.claude/skills/selenium/templates/java-testng/src/test/resources/testData/testData.properties +11 -0
- package/.claude/skills/selenium/templates/java-testng/testng.xml +15 -5
- package/.claude/skills/selenium/templates/python-pytest/.env.example +12 -0
- package/.claude/skills/selenium/templates/python-pytest/conftest.py +63 -12
- package/.claude/skills/selenium/templates/python-pytest/gitignore +7 -2
- package/.claude/skills/selenium/templates/python-pytest/page_objects/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/{pages → page_objects}/base_page.py +20 -20
- package/.claude/skills/selenium/templates/python-pytest/page_objects/home_page.py +17 -0
- package/.claude/skills/selenium/templates/python-pytest/{pages → page_objects}/login_page.py +12 -14
- package/.claude/skills/selenium/templates/python-pytest/page_objects/shell_page.py +16 -0
- package/.claude/skills/selenium/templates/python-pytest/pytest.ini +6 -2
- package/.claude/skills/selenium/templates/python-pytest/requirements.txt +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/desc/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/desc/sign_in_desc.py +27 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/test_data/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/resources/test_data/test_data.py +25 -0
- package/.claude/skills/selenium/templates/python-pytest/setup/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/setup/auth.py +60 -0
- package/.claude/skills/selenium/templates/python-pytest/src/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/env.py +68 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/flags.py +40 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/load_env.py +16 -0
- package/.claude/skills/selenium/templates/python-pytest/src/config/paths.py +25 -0
- package/.claude/skills/selenium/templates/python-pytest/src/driver/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/{framework → src/driver}/driver_factory.py +11 -18
- package/.claude/skills/selenium/templates/python-pytest/{framework → src/driver}/driver_manager.py +3 -3
- package/.claude/skills/selenium/templates/python-pytest/src/services/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/src/services/api_client.py +89 -0
- package/.claude/skills/selenium/templates/python-pytest/tests/api/test_session.py +11 -0
- package/.claude/skills/selenium/templates/python-pytest/tests/ui/test_sign_in.py +34 -0
- package/.claude/skills/selenium/templates/python-pytest/tests/unit/test_utils.py +32 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/__init__.py +1 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/dates.py +23 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/errors.py +28 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/form_fill.py +29 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/logger.py +40 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/markers.py +6 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/random_data.py +35 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/redact.py +30 -0
- package/.claude/skills/selenium/templates/python-pytest/utils/titles.py +53 -0
- package/.claude/skills/self-healing/SKILL.md +2 -2
- package/.claude/skills/test-design/SKILL.md +1 -1
- package/.claude/skills/test-reporting/references/tool-mapping.md +13 -9
- package/.claude/skills/ui-observation/SKILL.md +8 -6
- package/.claude/skills/ui-observation/references/login-methods.md +1 -1
- package/.claude-plugin/plugin.json +15 -2
- package/.codex/agents/automation-strategist.toml +1 -0
- package/.codex/agents/change-agent.toml +1 -0
- package/.codex/agents/codebase-analyst.toml +1 -0
- package/.codex/agents/environment-discovery.toml +1 -0
- package/.codex/agents/evidence-validator.toml +1 -0
- package/.codex/agents/executor.toml +1 -0
- package/.codex/agents/failure-analyst.toml +1 -0
- package/.codex/agents/implementer.toml +2 -1
- package/.codex/agents/requirement-analyst.toml +1 -0
- package/.codex/agents/reviewer.toml +1 -0
- package/.codex/agents/test-reporter.toml +1 -0
- package/.codex/hooks.json +15 -0
- package/.cursor/commands/orion.md +1 -1
- package/.cursor/hooks.json +10 -0
- package/.devin/hooks.v1.json +13 -0
- package/.gemini/agents/automation-strategist.md +1 -0
- package/.gemini/agents/change-agent.md +1 -0
- package/.gemini/agents/codebase-analyst.md +1 -0
- package/.gemini/agents/environment-discovery.md +1 -0
- package/.gemini/agents/evidence-validator.md +1 -0
- package/.gemini/agents/executor.md +1 -0
- package/.gemini/agents/failure-analyst.md +1 -0
- package/.gemini/agents/implementer.md +2 -1
- package/.gemini/agents/requirement-analyst.md +1 -0
- package/.gemini/agents/reviewer.md +1 -0
- package/.gemini/agents/test-reporter.md +1 -0
- package/.gemini/commands/orion.toml +2 -2
- package/.github/hooks/orion-lean.json +13 -0
- package/.github/prompts/orion.prompt.md +2 -2
- package/.windsurf/workflows/orion.md +2 -2
- package/AGENTS.md +6 -6
- package/README.md +55 -140
- package/assets/architecture.svg +104 -0
- package/assets/run-flow.svg +1 -1
- package/bin/orion.mjs +6 -6
- package/hosts/gemini-extension/gemini-extension.json +1 -1
- package/hosts/gemini-extension/hooks/hooks.json +16 -0
- package/hosts/gemini-extension/policies/platform.toml +5 -0
- package/package.json +6 -1
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/data/Cases.java +0 -37
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/data/SignInData.java +0 -25
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/flows/SignInFlow.java +0 -34
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/framework/Account.java +0 -19
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/screens/HomeScreen.java +0 -36
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/screens/LoginScreen.java +0 -57
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/BaseTest.java +0 -33
- package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/SmokeTest.java +0 -17
- package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiClient.cs +0 -61
- package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiConfig.cs +0 -61
- package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiError.cs +0 -17
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/Cases.cs +0 -41
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/HealthData.cs +0 -11
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/ProductBuilder.cs +0 -16
- package/.claude/skills/httpclient/templates/csharp-nunit/Data/ProductsData.cs +0 -17
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/HealthTests.cs +0 -18
- package/.claude/skills/httpclient/templates/csharp-nunit/Tests/ProductsTests.cs +0 -48
- package/.claude/skills/k6/templates/project/data/builders.js +0 -8
- package/.claude/skills/karate/templates/java-junit5/src/test/java/api/products.feature +0 -33
- package/.claude/skills/pact/templates/project/test/contract/products.contract.test.js +0 -45
- package/.claude/skills/playwright/templates/dotnet/Components/AccountMenu.cs +0 -23
- package/.claude/skills/playwright/templates/dotnet/Data/Cases.cs +0 -43
- package/.claude/skills/playwright/templates/dotnet/Data/SignInData.cs +0 -24
- package/.claude/skills/playwright/templates/dotnet/Flows/SignInFlow.cs +0 -51
- package/.claude/skills/playwright/templates/dotnet/Framework/AutomationError.cs +0 -17
- package/.claude/skills/playwright/templates/dotnet/Framework/Config.cs +0 -91
- package/.claude/skills/playwright/templates/dotnet/Pages/BasePage.cs +0 -57
- package/.claude/skills/playwright/templates/dotnet/Pages/HomePage.cs +0 -26
- package/.claude/skills/playwright/templates/dotnet/Pages/LoginPage.cs +0 -45
- package/.claude/skills/playwright/templates/dotnet/Tests/SmokeTests.cs +0 -47
- package/.claude/skills/playwright/templates/javascript/src/components/account-menu.component.js +0 -30
- package/.claude/skills/playwright/templates/javascript/src/config.js +0 -53
- package/.claude/skills/playwright/templates/javascript/src/data/accounts.js +0 -23
- package/.claude/skills/playwright/templates/javascript/src/data/cases.js +0 -49
- package/.claude/skills/playwright/templates/javascript/src/data/sign-in.data.js +0 -12
- package/.claude/skills/playwright/templates/javascript/src/flows/sign-in.flow.js +0 -53
- package/.claude/skills/playwright/templates/javascript/src/pages/base.page.js +0 -59
- package/.claude/skills/playwright/templates/javascript/src/pages/home.page.js +0 -31
- package/.claude/skills/playwright/templates/javascript/src/pages/login.page.js +0 -56
- package/.claude/skills/playwright/templates/javascript/tests/fixtures.js +0 -20
- package/.claude/skills/playwright/templates/javascript/tests/smoke.spec.js +0 -22
- package/.claude/skills/playwright/templates/project/src/components/account-menu.component.ts +0 -27
- package/.claude/skills/playwright/templates/project/src/config.ts +0 -56
- package/.claude/skills/playwright/templates/project/src/data/accounts.ts +0 -21
- package/.claude/skills/playwright/templates/project/src/data/cases.ts +0 -55
- package/.claude/skills/playwright/templates/project/src/data/sign-in.data.ts +0 -10
- package/.claude/skills/playwright/templates/project/src/flows/sign-in.flow.ts +0 -51
- package/.claude/skills/playwright/templates/project/src/pages/base.page.ts +0 -52
- package/.claude/skills/playwright/templates/project/src/pages/home.page.ts +0 -30
- package/.claude/skills/playwright/templates/project/src/pages/login.page.ts +0 -53
- package/.claude/skills/playwright/templates/project/tests/fixtures.ts +0 -25
- package/.claude/skills/playwright/templates/project/tests/smoke.spec.ts +0 -22
- package/.claude/skills/playwright/templates/python/components/__init__.py +0 -1
- package/.claude/skills/playwright/templates/python/components/account_menu.py +0 -22
- package/.claude/skills/playwright/templates/python/data/accounts.py +0 -14
- package/.claude/skills/playwright/templates/python/data/cases.py +0 -33
- package/.claude/skills/playwright/templates/python/data/sign_in_data.py +0 -9
- package/.claude/skills/playwright/templates/python/flows/sign_in.py +0 -63
- package/.claude/skills/playwright/templates/python/framework/config.py +0 -86
- package/.claude/skills/playwright/templates/python/pages/base_page.py +0 -51
- package/.claude/skills/playwright/templates/python/pages/home_page.py +0 -21
- package/.claude/skills/playwright/templates/python/pages/login_page.py +0 -40
- package/.claude/skills/playwright/templates/python/tests/test_smoke.py +0 -26
- package/.claude/skills/quality-checks/templates/playwright-ts/src/pages/scanned.page.ts +0 -16
- package/.claude/skills/quality-checks/templates/playwright-ts/tests/quality.spec.ts +0 -58
- package/.claude/skills/requests/templates/python-pytest/api/config.py +0 -43
- package/.claude/skills/requests/templates/python-pytest/api/errors.py +0 -15
- package/.claude/skills/requests/templates/python-pytest/data/builders.py +0 -16
- package/.claude/skills/requests/templates/python-pytest/data/cases.py +0 -30
- package/.claude/skills/requests/templates/python-pytest/data/health_data.py +0 -6
- package/.claude/skills/requests/templates/python-pytest/data/products_data.py +0 -10
- package/.claude/skills/requests/templates/python-pytest/tests/test_health.py +0 -12
- package/.claude/skills/requests/templates/python-pytest/tests/test_products.py +0 -25
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/ApiError.java +0 -18
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/ApiSpec.java +0 -29
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/HealthApi.java +0 -21
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/Cases.java +0 -45
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/HealthData.java +0 -12
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/ProductsData.java +0 -16
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/HealthTest.java +0 -15
- package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/ProductsTest.java +0 -37
- package/.claude/skills/selenium/templates/csharp-nunit/Components/AccountMenu.cs +0 -26
- package/.claude/skills/selenium/templates/csharp-nunit/Data/Cases.cs +0 -43
- package/.claude/skills/selenium/templates/csharp-nunit/Data/SignInData.cs +0 -24
- package/.claude/skills/selenium/templates/csharp-nunit/Flows/SignInFlow.cs +0 -51
- package/.claude/skills/selenium/templates/csharp-nunit/Framework/AutomationError.cs +0 -17
- package/.claude/skills/selenium/templates/csharp-nunit/Framework/DriverManager.cs +0 -26
- package/.claude/skills/selenium/templates/csharp-nunit/Pages/HomePage.cs +0 -28
- package/.claude/skills/selenium/templates/csharp-nunit/Pages/LoginPage.cs +0 -58
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/BaseTest.cs +0 -22
- package/.claude/skills/selenium/templates/csharp-nunit/Tests/SmokeTests.cs +0 -37
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/components/AccountMenu.java +0 -37
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/data/Cases.java +0 -48
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/data/SignInData.java +0 -36
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/flows/SignInFlow.java +0 -60
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/framework/Account.java +0 -19
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pages/HomePage.java +0 -45
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pages/LoginPage.java +0 -78
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/BaseTest.java +0 -33
- package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/SmokeTest.java +0 -33
- package/.claude/skills/selenium/templates/python-pytest/components/__init__.py +0 -1
- package/.claude/skills/selenium/templates/python-pytest/components/account_menu.py +0 -19
- package/.claude/skills/selenium/templates/python-pytest/data/accounts.py +0 -14
- package/.claude/skills/selenium/templates/python-pytest/data/cases.py +0 -33
- package/.claude/skills/selenium/templates/python-pytest/data/sign_in_data.py +0 -9
- package/.claude/skills/selenium/templates/python-pytest/flows/__init__.py +0 -0
- package/.claude/skills/selenium/templates/python-pytest/flows/sign_in.py +0 -61
- package/.claude/skills/selenium/templates/python-pytest/framework/__init__.py +0 -0
- package/.claude/skills/selenium/templates/python-pytest/framework/config.py +0 -90
- package/.claude/skills/selenium/templates/python-pytest/pages/__init__.py +0 -0
- package/.claude/skills/selenium/templates/python-pytest/pages/home_page.py +0 -23
- package/.claude/skills/selenium/templates/python-pytest/tests/test_smoke.py +0 -25
- /package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests/api}/delete-product.feature +0 -0
- /package/.claude/skills/playwright/templates/{python/data/__init__.py → dotnet/auth/.gitkeep} +0 -0
- /package/.claude/skills/playwright/templates/{python/flows/__init__.py → javascript/auth/.gitkeep} +0 -0
- /package/.claude/skills/playwright/templates/{python/framework/__init__.py → project/auth/.gitkeep} +0 -0
- /package/.claude/skills/playwright/templates/project/{src → utils}/errors.ts +0 -0
- /package/.claude/skills/playwright/templates/python/{pages/__init__.py → auth/.gitkeep} +0 -0
- /package/.claude/skills/quality-checks/templates/playwright-ts/src/checks/{page-health.ts → pageHealth.ts} +0 -0
- /package/.claude/skills/quality-checks/templates/playwright-ts/src/{api/graphql.ts → services/graphqlClient.ts} +0 -0
- /package/.claude/skills/{requests/templates/python-pytest/api/__init__.py → selenium/templates/csharp-nunit/auth/.gitkeep} +0 -0
- /package/.claude/skills/{requests/templates/python-pytest/data/__init__.py → selenium/templates/java-testng/auth/.gitkeep} +0 -0
- /package/.claude/skills/selenium/templates/python-pytest/{data/__init__.py → auth/.gitkeep} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import type { Account } from '../src/config/env';
|
|
3
|
+
import { labels, ROUTES } from '../resources/testData/testData';
|
|
4
|
+
import { BasePage } from './basePage';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The app's sign-in page. Its locators live here, built from the screen's labels (role and label first).
|
|
8
|
+
* A two-step form (identifier, Continue, then password) gets a second action here, not a second page class.
|
|
9
|
+
*/
|
|
10
|
+
export class LoginPage extends BasePage {
|
|
11
|
+
protected readonly path = ROUTES.login;
|
|
12
|
+
readonly usernameInput: Locator;
|
|
13
|
+
readonly passwordInput: Locator;
|
|
14
|
+
readonly signInButton: Locator;
|
|
15
|
+
/** The message the form shows when sign-in fails, for negative tests to assert on. */
|
|
16
|
+
readonly errorMessage: Locator;
|
|
17
|
+
protected readonly readyMarker: Locator;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param page The Playwright page this object drives.
|
|
21
|
+
*/
|
|
22
|
+
constructor(page: Page) {
|
|
23
|
+
super(page);
|
|
24
|
+
this.usernameInput = page.getByLabel(labels.username);
|
|
25
|
+
this.passwordInput = page.getByLabel(labels.password);
|
|
26
|
+
this.signInButton = page.getByRole('button', { name: labels.signIn });
|
|
27
|
+
this.errorMessage = page.getByRole('alert');
|
|
28
|
+
this.readyMarker = this.usernameInput;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Fills the form with an account and submits it (no waiting for a result: tests decide what comes next).
|
|
33
|
+
* @param account The account, from `src/config/env` or the test data.
|
|
34
|
+
*/
|
|
35
|
+
async signIn(account: Account): Promise<void> {
|
|
36
|
+
await this.usernameInput.fill(account.user);
|
|
37
|
+
await this.passwordInput.fill(account.password);
|
|
38
|
+
await this.signInButton.click();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Waits until the sign-in form is gone, i.e. the app accepted the account and moved on (readiness, not an assertion).
|
|
43
|
+
*/
|
|
44
|
+
async waitUntilLeft(): Promise<void> {
|
|
45
|
+
await this.usernameInput.waitFor({ state: 'hidden' });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { labels } from '../resources/testData/testData';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The app's shell: header, navigation and account menu, shared by every signed-in page (it has no path of its
|
|
6
|
+
* own). Pages and tests use its actions instead of repeating these locators.
|
|
7
|
+
*/
|
|
8
|
+
export class ShellPage {
|
|
9
|
+
readonly signOutButton: Locator;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param page The Playwright page the shell is on.
|
|
13
|
+
*/
|
|
14
|
+
constructor(private readonly page: Page) {
|
|
15
|
+
this.signOutButton = page.getByRole('button', { name: labels.signOut });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Signs the user out. */
|
|
19
|
+
async signOut(): Promise<void> {
|
|
20
|
+
await this.signOutButton.click();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
1
2
|
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
-
|
|
3
|
+
// First: loads the project's one `.env`, so every setting below sees it (imports run in this order).
|
|
4
|
+
import './src/config/loadEnv';
|
|
5
|
+
import { env } from './src/config/env';
|
|
6
|
+
import { flags } from './src/config/flags';
|
|
7
|
+
import { paths } from './src/config/paths';
|
|
3
8
|
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
* reads it; CI passes the same names as secrets instead.
|
|
7
|
-
*/
|
|
8
|
-
function loadEnvFile(): void {
|
|
9
|
-
try {
|
|
10
|
-
process.loadEnvFile('.env');
|
|
11
|
-
} catch {
|
|
12
|
-
// No .env: the values come from the environment (CI secrets).
|
|
13
|
-
}
|
|
14
|
-
}
|
|
9
|
+
/** The browser every UI project runs in: device first, so it can't overwrite the settings after it. */
|
|
10
|
+
const desktop = { ...devices['Desktop Chrome'], channel: env.browserChannel() };
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
/** UI projects start signed in, from the session `setup/auth.setup.ts` saved once per run. */
|
|
13
|
+
const signedIn = { ...desktop, storageState: paths.userSession };
|
|
17
14
|
|
|
18
15
|
export default defineConfig({
|
|
19
16
|
testDir: './tests',
|
|
@@ -23,19 +20,48 @@ export default defineConfig({
|
|
|
23
20
|
forbidOnly: !!process.env.CI,
|
|
24
21
|
// New tests are accepted only after 3 runs with retries off.
|
|
25
22
|
retries: 0,
|
|
26
|
-
// A missing screenshot baseline fails instead of being saved unseen; a person approves it first
|
|
27
|
-
// `npx playwright test --update-snapshots=missing` writes it.
|
|
23
|
+
// A missing screenshot baseline fails instead of being saved unseen; a person approves it first.
|
|
28
24
|
updateSnapshots: 'none',
|
|
29
|
-
|
|
25
|
+
timeout: flags.testTimeout,
|
|
26
|
+
expect: { timeout: flags.expectTimeout },
|
|
27
|
+
// list while it runs; the one-page summary to read and share (test-summary/index.html); Playwright's report for traces.
|
|
28
|
+
reporter: [
|
|
29
|
+
['list'],
|
|
30
|
+
[path.join(__dirname, 'reporters', 'summaryReporter.ts'), { outputFile: paths.summaryReport }],
|
|
31
|
+
['html', { open: 'never', outputFolder: paths.htmlReport }],
|
|
32
|
+
...(process.env.CI ? [['junit', { outputFile: 'test-results/junit.xml' }] as ['junit', { outputFile: string }]] : []),
|
|
33
|
+
],
|
|
30
34
|
use: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
channel:
|
|
35
|
-
|
|
36
|
-
httpCredentials: httpCredentials(),
|
|
35
|
+
baseURL: env.baseUrl(),
|
|
36
|
+
// The installed Chrome or Edge for every project, not only the UI ones: the session fixture may start a browser in
|
|
37
|
+
// any signed-in project (api too), and a project without a channel would need Playwright's own browser download.
|
|
38
|
+
channel: env.browserChannel(),
|
|
39
|
+
httpCredentials: env.httpCredentials(),
|
|
37
40
|
trace: 'retain-on-failure',
|
|
38
41
|
screenshot: 'only-on-failure',
|
|
42
|
+
video: 'off',
|
|
43
|
+
actionTimeout: flags.actionTimeout,
|
|
44
|
+
navigationTimeout: flags.navigationTimeout,
|
|
39
45
|
},
|
|
40
|
-
projects
|
|
46
|
+
// The tests' projects come first: UI mode (`--ui`) opens with only the first project ticked. A run without setup
|
|
47
|
+
// (UI mode, one spec from the editor, --no-deps) still starts signed in: the `session` fixture signs in when needed.
|
|
48
|
+
projects: [
|
|
49
|
+
// Everything in tests/ui; tests that change data (@write) only when RUN_WRITE_TESTS=1.
|
|
50
|
+
{
|
|
51
|
+
name: 'regression',
|
|
52
|
+
testDir: './tests/ui',
|
|
53
|
+
...(flags.runWriteTests ? {} : { grepInvert: /@write/ }),
|
|
54
|
+
dependencies: ['setup'],
|
|
55
|
+
use: signedIn,
|
|
56
|
+
},
|
|
57
|
+
// The quick check: tests tagged @smoke.
|
|
58
|
+
{ name: 'smoke', testDir: './tests/ui', grep: /@smoke/, dependencies: ['setup'], use: signedIn },
|
|
59
|
+
// API tests share the signed-in session's cookies.
|
|
60
|
+
{ name: 'api', testDir: './tests/api', dependencies: ['setup'], use: { storageState: paths.userSession } },
|
|
61
|
+
// Unit tests of the suite's own helpers: no browser, no app.
|
|
62
|
+
{ name: 'unit', testDir: './tests/unit', testMatch: /.*\.test\.ts/ },
|
|
63
|
+
// Signs in once and saves the session; its teardown removes the session after every dependent project.
|
|
64
|
+
{ name: 'setup', testDir: './setup', testMatch: /auth\.setup\.ts/, teardown: 'teardown', use: desktop },
|
|
65
|
+
{ name: 'teardown', testDir: './setup', testMatch: /auth\.teardown\.ts/ },
|
|
66
|
+
],
|
|
41
67
|
});
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The run summary: one self-contained page (`test-summary/index.html`, opens offline) that says first whether the
|
|
3
|
+
* run passed, then each test by story with its case id, acceptance criterion, result and time; a failed test shows
|
|
4
|
+
* its error (secrets masked) and links to its screenshot and trace. Playwright's own HTML report stays the place to
|
|
5
|
+
* dig into a trace; this page is the one to read and share.
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import type { FullConfig, FullResult, Reporter, TestCase, TestResult } from '@playwright/test/reporter';
|
|
10
|
+
import { redact } from '../utils/redact';
|
|
11
|
+
import { paths } from '../src/config/paths';
|
|
12
|
+
|
|
13
|
+
/** Projects that prepare or clean up, listed apart from the tests. */
|
|
14
|
+
const SUPPORT_PROJECTS = new Set(['setup', 'teardown']);
|
|
15
|
+
|
|
16
|
+
/** One test's result, as the page shows it. */
|
|
17
|
+
export interface Row {
|
|
18
|
+
/** Case id from the title (`TS-3`), or ''. */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Story key from the title, or ''. */
|
|
21
|
+
story: string;
|
|
22
|
+
/** The behaviour, without the id and story. */
|
|
23
|
+
title: string;
|
|
24
|
+
/** Acceptance criteria from the tags (`@AC-1` → `AC-1`). */
|
|
25
|
+
acs: string[];
|
|
26
|
+
/** The Playwright project. */
|
|
27
|
+
project: string;
|
|
28
|
+
/** `file:line`, relative to the project root. */
|
|
29
|
+
file: string;
|
|
30
|
+
/** The final outcome over all attempts. */
|
|
31
|
+
outcome: 'passed' | 'failed' | 'flaky' | 'skipped';
|
|
32
|
+
/** Duration of the last attempt. */
|
|
33
|
+
durationMs: number;
|
|
34
|
+
/** How many times it ran. */
|
|
35
|
+
attempts: number;
|
|
36
|
+
/** The first lines of the error, secrets masked; '' when none. */
|
|
37
|
+
error: string;
|
|
38
|
+
/** Screenshot and trace of a failed test, relative to the page. */
|
|
39
|
+
links: { name: string; href: string }[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** One run, as the page shows it. */
|
|
43
|
+
export interface Run {
|
|
44
|
+
rows: Row[];
|
|
45
|
+
support: Row[];
|
|
46
|
+
startedAt: Date;
|
|
47
|
+
durationMs: number;
|
|
48
|
+
baseUrl: string;
|
|
49
|
+
projects: string[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** What the page says first. */
|
|
53
|
+
interface Verdict { mark: string; label: string; sentence: string; tone: 'good' | 'warn' | 'bad' }
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Escapes text for HTML.
|
|
57
|
+
* @param s The text.
|
|
58
|
+
* @returns Safe HTML text.
|
|
59
|
+
*/
|
|
60
|
+
function esc(s: unknown): string {
|
|
61
|
+
return String(s).replace(/[&<>"']/g, (c) => (({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }) as Record<string, string>)[c] || c);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A duration as people read it.
|
|
66
|
+
* @param ms Milliseconds.
|
|
67
|
+
* @returns e.g. `850 ms`, `4.2 s`, `2 min 5 s`.
|
|
68
|
+
*/
|
|
69
|
+
function duration(ms: number): string {
|
|
70
|
+
if (ms < 1000) return `${Math.round(ms)} ms`;
|
|
71
|
+
if (ms < 60000) return `${(ms / 1000).toFixed(1)} s`;
|
|
72
|
+
return `${Math.floor(ms / 60000)} min ${Math.round((ms % 60000) / 1000)} s`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Splits a registered title (`TS-3 [EA-10] wrong password shows an error`) into id, story and behaviour.
|
|
77
|
+
* @param title The test's title.
|
|
78
|
+
* @returns Its parts; a title without an id keeps all of it.
|
|
79
|
+
*/
|
|
80
|
+
export function parseTitle(title: string): { id: string; story: string; title: string } {
|
|
81
|
+
const m = title.match(/^(TS-\d+)(?:\s+\[([^\]]+)\])?\s+(.*)$/);
|
|
82
|
+
return m ? { id: m[1], story: m[2] || '', title: m[3] } : { id: '', story: '', title };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The verdict line for a set of rows. A failed setup (sign-in) fails the run: the tests that depend on it never ran,
|
|
87
|
+
* so Playwright reports nothing for them.
|
|
88
|
+
* @param rows The test rows (setup and teardown excluded).
|
|
89
|
+
* @param support The setup and teardown rows.
|
|
90
|
+
* @returns What the page says first.
|
|
91
|
+
*/
|
|
92
|
+
export function verdictOf(rows: Row[], support: Row[] = []): Verdict {
|
|
93
|
+
/** How many rows have an outcome. */
|
|
94
|
+
const n = (o: Row['outcome']) => rows.filter((r) => r.outcome === o).length;
|
|
95
|
+
const [failed, flaky, skipped, passed] = [n('failed'), n('flaky'), n('skipped'), n('passed')];
|
|
96
|
+
const setup = support.find((r) => r.outcome === 'failed');
|
|
97
|
+
if (setup) return { mark: '❌', label: 'Setup failed', sentence: `${setup.title || 'The setup'} failed, so the tests that need it didn't run; ${passed} other tests passed.`, tone: 'bad' };
|
|
98
|
+
if (!rows.length) return { mark: '⚠️', label: 'Nothing ran', sentence: 'No tests matched this run.', tone: 'warn' };
|
|
99
|
+
if (failed) return { mark: '❌', label: 'Failed', sentence: `${failed} of ${rows.length} tests failed; ${passed} passed.`, tone: 'bad' };
|
|
100
|
+
if (flaky || skipped) {
|
|
101
|
+
const parts = [flaky && `${flaky} passed only on a retry`, skipped && `${skipped} skipped`].filter(Boolean).join(', ');
|
|
102
|
+
return { mark: '⚠️', label: 'Passed, with notes', sentence: `${passed} of ${rows.length} tests passed; ${parts}.`, tone: 'warn' };
|
|
103
|
+
}
|
|
104
|
+
return { mark: '✅', label: 'All passed', sentence: `All ${rows.length} tests passed.`, tone: 'good' };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The page for one run.
|
|
109
|
+
* @param run The rows, setup rows, start, duration, base URL and projects.
|
|
110
|
+
* @returns The HTML page.
|
|
111
|
+
*/
|
|
112
|
+
export function renderSummary(run: Run): string {
|
|
113
|
+
const v = verdictOf(run.rows, run.support);
|
|
114
|
+
const order: Record<Row['outcome'], number> = { failed: 0, flaky: 1, skipped: 2, passed: 3 };
|
|
115
|
+
const MARK: Record<Row['outcome'], string> = { passed: '✅', failed: '❌', flaky: '⚠️', skipped: '⏭' };
|
|
116
|
+
const groups = new Map<string, Row[]>();
|
|
117
|
+
for (const r of [...run.rows].sort((a, b) => order[a.outcome] - order[b.outcome] || a.id.localeCompare(b.id, 'en', { numeric: true }))) {
|
|
118
|
+
const key = r.story || r.file.split(':')[0];
|
|
119
|
+
if (!groups.has(key)) groups.set(key, []);
|
|
120
|
+
groups.get(key)!.push(r);
|
|
121
|
+
}
|
|
122
|
+
/** How many test rows have an outcome. */
|
|
123
|
+
const count = (o: Row['outcome']) => run.rows.filter((r) => r.outcome === o).length;
|
|
124
|
+
const supportFailed = run.support.filter((r) => r.outcome === 'failed');
|
|
125
|
+
/** One table row: mark, id, behaviour, ACs, the failure folded under it, project, time. */
|
|
126
|
+
const row = (r: Row) => `
|
|
127
|
+
<tr class="${r.outcome}">
|
|
128
|
+
<td class="mark" title="${r.outcome}">${MARK[r.outcome]}</td>
|
|
129
|
+
<td><span class="id">${esc(r.id)}</span> ${esc(r.title)}${r.acs.length ? ` <span class="ac">${r.acs.map(esc).join(' · ')}</span>` : ''}
|
|
130
|
+
${r.error ? `<details><summary>Why it failed</summary><pre>${esc(r.error)}</pre>${r.links.map((l) => `<a href="${esc(l.href)}">${esc(l.name)}</a>`).join(' · ')}</details>` : ''}</td>
|
|
131
|
+
<td class="muted">${esc(r.project)}</td>
|
|
132
|
+
<td class="num">${duration(r.durationMs)}${r.attempts > 1 ? ` <span class="muted">· ${r.attempts} tries</span>` : ''}</td>
|
|
133
|
+
</tr>`;
|
|
134
|
+
// Story cases first, then framework and unit checks (grouped by file).
|
|
135
|
+
const sections = [...groups].sort(([, a], [, b]) => Number(!a[0].story) - Number(!b[0].story)).map(([key, rows]) => `
|
|
136
|
+
<section>
|
|
137
|
+
<h2>${esc(key)} <span class="muted">${rows.filter((r) => r.outcome === 'passed').length}/${rows.length} passed</span></h2>
|
|
138
|
+
<div class="scroll"><table><thead><tr><th></th><th>Test</th><th>Project</th><th class="num">Time</th></tr></thead><tbody>${rows.map(row).join('')}
|
|
139
|
+
</tbody></table></div>
|
|
140
|
+
</section>`).join('');
|
|
141
|
+
return `<!doctype html>
|
|
142
|
+
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
|
143
|
+
<title>Test run · ${esc(run.startedAt.toISOString().slice(0, 10))}</title>
|
|
144
|
+
<style>
|
|
145
|
+
:root{--bg:#f7f8fa;--card:#fff;--fg:#14181f;--muted:#5d6675;--line:#e3e6eb;--good:#127a3e;--warn:#9a6200;--bad:#b42318;--goodbg:#e8f6ee;--warnbg:#fdf3e1;--badbg:#fdecea;--id:#3b4a6b}
|
|
146
|
+
@media (prefers-color-scheme:dark){:root{--bg:#111418;--card:#181c22;--fg:#e8eaee;--muted:#9aa3b2;--line:#2a3039;--good:#5cc98a;--warn:#e7b04d;--bad:#f2766b;--goodbg:#13281d;--warnbg:#2c2414;--badbg:#2e1716;--id:#a9b8d8;color-scheme:dark}}
|
|
147
|
+
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
|
|
148
|
+
main{max-width:960px;margin:0 auto;padding:32px 16px 48px}
|
|
149
|
+
.verdict{border-radius:12px;padding:20px 22px;margin-bottom:16px}.verdict.good{background:var(--goodbg)}.verdict.warn{background:var(--warnbg)}.verdict.bad{background:var(--badbg)}
|
|
150
|
+
.verdict h1{margin:0;font-size:24px}.verdict p{margin:4px 0 0}
|
|
151
|
+
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 24px}
|
|
152
|
+
.fact{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:12px 14px}.fact b{display:block;font-size:20px;font-variant-numeric:tabular-nums}.fact span{color:var(--muted);font-size:13px}
|
|
153
|
+
section{margin-top:24px}h2{font-size:17px;margin:0 0 8px}
|
|
154
|
+
.scroll{overflow-x:auto;background:var(--card);border:1px solid var(--line);border-radius:10px}
|
|
155
|
+
table{width:100%;border-collapse:collapse}th{text-align:left;font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:10px 12px;border-bottom:1px solid var(--line)}
|
|
156
|
+
td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}tr:last-child td{border-bottom:0}
|
|
157
|
+
.mark{width:28px}.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.muted{color:var(--muted);font-weight:400;font-size:13px}
|
|
158
|
+
.id{font-weight:600;color:var(--id);font-variant-numeric:tabular-nums}.ac{color:var(--muted);font-size:13px}
|
|
159
|
+
tr.failed td{background:var(--badbg)}details{margin-top:6px}summary{cursor:pointer;color:var(--bad);font-size:13px}
|
|
160
|
+
pre{white-space:pre-wrap;word-break:break-word;font-size:12.5px;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:8px;margin:6px 0}
|
|
161
|
+
.setup{padding:12px 14px;background:var(--badbg)}a{color:inherit}footer{margin-top:32px;color:var(--muted);font-size:13px}
|
|
162
|
+
</style></head><body><main>
|
|
163
|
+
<div class="verdict ${v.tone}"><h1>${v.mark} ${esc(v.label)}</h1><p>${esc(v.sentence)}</p></div>
|
|
164
|
+
<div class="facts">
|
|
165
|
+
<div class="fact"><b>${count('passed')}/${run.rows.length}</b><span>passed</span></div>
|
|
166
|
+
<div class="fact"><b>${count('failed')}</b><span>failed</span></div>
|
|
167
|
+
<div class="fact"><b>${count('flaky')}</b><span>passed on a retry</span></div>
|
|
168
|
+
<div class="fact"><b>${duration(run.durationMs)}</b><span>${esc(run.startedAt.toLocaleString('en-GB', { dateStyle: 'medium', timeStyle: 'short' }))}</span></div>
|
|
169
|
+
</div>
|
|
170
|
+
<p class="muted">App: ${esc(run.baseUrl || 'not set')} · projects: ${esc(run.projects.join(', '))}</p>
|
|
171
|
+
${supportFailed.map((r) => `<div class="scroll setup"><strong>${esc(r.title)}</strong> failed <span class="muted">(${esc(r.file)})</span><pre>${esc(r.error)}</pre>${r.links.map((l) => `<a href="${esc(l.href)}">${esc(l.name)}</a>`).join(' · ')}</div>`).join('')}
|
|
172
|
+
${sections}
|
|
173
|
+
<footer>Details, traces and step-by-step logs: Playwright's report (<code>npx playwright show-report</code>).</footer>
|
|
174
|
+
</main></body></html>
|
|
175
|
+
`;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** Playwright reporter that writes the summary page at the end of the run. */
|
|
179
|
+
export default class SummaryReporter implements Reporter {
|
|
180
|
+
private outputFile: string;
|
|
181
|
+
private results = new Map<TestCase, TestResult[]>();
|
|
182
|
+
private startedAt = new Date();
|
|
183
|
+
private baseUrl = '';
|
|
184
|
+
|
|
185
|
+
/** @param options Where to write the page (default `test-summary/index.html`). */
|
|
186
|
+
constructor(options: { outputFile?: string } = {}) {
|
|
187
|
+
this.outputFile = options.outputFile || path.join(paths.root, 'test-summary', 'index.html');
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Notes the start time and the base URL the projects use. */
|
|
191
|
+
onBegin(config: FullConfig): void {
|
|
192
|
+
this.startedAt = new Date();
|
|
193
|
+
this.baseUrl = String(config.projects.find((p) => p.use && p.use.baseURL)?.use.baseURL || '');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** Keeps every attempt of a test, so retries and flaky outcomes are known at the end. */
|
|
197
|
+
onTestEnd(test: TestCase, result: TestResult): void {
|
|
198
|
+
if (!this.results.has(test)) this.results.set(test, []);
|
|
199
|
+
this.results.get(test)!.push(result);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** Builds the rows and writes the page. */
|
|
203
|
+
async onEnd(full: FullResult): Promise<void> {
|
|
204
|
+
// `--list` and runs where no test ran leave the last summary as it was.
|
|
205
|
+
if (!this.results.size) return;
|
|
206
|
+
const dir = path.dirname(this.outputFile);
|
|
207
|
+
const all: Row[] = [...this.results].map(([test, results]) => {
|
|
208
|
+
const last = results[results.length - 1];
|
|
209
|
+
const outcome = test.outcome();
|
|
210
|
+
const parts = parseTitle(test.title);
|
|
211
|
+
const failedRun = [...results].reverse().find((r) => r.status !== 'passed' && r.status !== 'skipped');
|
|
212
|
+
const message = failedRun && failedRun.error ? (failedRun.error.message || failedRun.error.value || '') : '';
|
|
213
|
+
const links = outcome === 'unexpected' && failedRun
|
|
214
|
+
? failedRun.attachments.filter((a) => a.path && /screenshot|trace/.test(a.name)).map((a) => ({ name: a.name, href: path.relative(dir, a.path as string).split(path.sep).join('/') }))
|
|
215
|
+
: [];
|
|
216
|
+
return {
|
|
217
|
+
...parts,
|
|
218
|
+
acs: test.tags.filter((t) => /^@AC-/.test(t)).map((t) => t.slice(1)),
|
|
219
|
+
project: test.parent.project()?.name || '',
|
|
220
|
+
file: `${path.relative(paths.root, test.location.file).split(path.sep).join('/')}:${test.location.line}`,
|
|
221
|
+
outcome: ({ expected: 'passed', unexpected: 'failed', flaky: 'flaky', skipped: 'skipped' } as const)[outcome],
|
|
222
|
+
durationMs: last ? last.duration : 0,
|
|
223
|
+
attempts: results.length,
|
|
224
|
+
// eslint-disable-next-line no-control-regex
|
|
225
|
+
error: outcome === 'unexpected' ? redact(message.replace(/\u001b\[[0-9;]*m/g, '')).split('\n').slice(0, 12).join('\n') : '',
|
|
226
|
+
links,
|
|
227
|
+
};
|
|
228
|
+
});
|
|
229
|
+
const rows = all.filter((r) => !SUPPORT_PROJECTS.has(r.project));
|
|
230
|
+
const support = all.filter((r) => SUPPORT_PROJECTS.has(r.project));
|
|
231
|
+
const projects = [...new Set(rows.map((r) => r.project))];
|
|
232
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
233
|
+
fs.writeFileSync(this.outputFile, renderSummary({ rows, support, startedAt: this.startedAt, durationMs: full.duration, baseUrl: this.baseUrl, projects }));
|
|
234
|
+
console.log(`Summary: ${path.relative(process.cwd(), this.outputFile)}`);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** The summary adds no lines of its own during the run. */
|
|
238
|
+
printsToStdio(): boolean {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { TestDescription } from '../../utils/titles';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Test descriptions of the sign-in feature: one per behaviour, keyed by case id. Specs take their titles and tags
|
|
5
|
+
* from here (`utils/titles.ts`), so a result traces to its case and acceptance criterion. Replace these with the
|
|
6
|
+
* story's approved test cases; one file per feature.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** The sign-in feature's test cases. */
|
|
10
|
+
export const SIGN_IN = {
|
|
11
|
+
'TS-0': {
|
|
12
|
+
id: 'TS-0', ac: 'AC-0', story: '{{STORY_KEY}}', tags: ['@smoke'],
|
|
13
|
+
title: 'the test account signs in and the app greets the user',
|
|
14
|
+
preconditions: ['Signed in (the session the setup project saved)'],
|
|
15
|
+
steps: ['Open the home page'],
|
|
16
|
+
expected: 'The home page greets the user',
|
|
17
|
+
},
|
|
18
|
+
'TS-1': {
|
|
19
|
+
id: 'TS-1', ac: 'AC-0', story: '{{STORY_KEY}}',
|
|
20
|
+
title: 'a wrong password is refused with a message',
|
|
21
|
+
preconditions: ['Signed out'],
|
|
22
|
+
steps: ['Open the sign-in page', 'Enter the user name and a wrong password', 'Submit'],
|
|
23
|
+
expected: 'The form shows the wrong-password message',
|
|
24
|
+
},
|
|
25
|
+
'TS-2': {
|
|
26
|
+
id: 'TS-2', ac: 'AC-0', story: '{{STORY_KEY}}',
|
|
27
|
+
title: 'signing out returns to the sign-in page',
|
|
28
|
+
preconditions: ['Signed out (signs in on its own, so the shared session stays valid)'],
|
|
29
|
+
steps: ['Sign in', 'Open the account menu', 'Sign out'],
|
|
30
|
+
expected: 'The sign-in page shows again',
|
|
31
|
+
},
|
|
32
|
+
} satisfies Record<string, TestDescription>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { env } from '../../src/config/env';
|
|
2
|
+
import { uniqueSuffix } from '../../utils/random';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* The suite's test data, in one place: the labels the screens show (pages build their locators from them), the
|
|
6
|
+
* paths of the pages, and the values and expected results of each feature. Values you give replace the defaults
|
|
7
|
+
* here; data a test creates gets a run-unique suffix. Secrets are never here: they stay in `.env` by name.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** Labels the screens show, by app language (`APP_LANGUAGE`). Add a language as one more block. */
|
|
11
|
+
export const LABELS = {
|
|
12
|
+
en: {
|
|
13
|
+
username: '{{USERNAME_LABEL}}',
|
|
14
|
+
password: '{{PASSWORD_LABEL}}',
|
|
15
|
+
signIn: '{{SUBMIT_LABEL}}',
|
|
16
|
+
signOut: '{{SIGN_OUT_LABEL}}',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Paths of the pages, relative to `BASE_URL`. */
|
|
21
|
+
export const ROUTES = {
|
|
22
|
+
login: '{{LOGIN_PATH}}',
|
|
23
|
+
home: '{{HOME_PATH}}',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** Values and expected results per feature, from the requirement (never copied from what the page showed). */
|
|
27
|
+
export const DATA = {
|
|
28
|
+
signIn: {
|
|
29
|
+
/** What the app greets the signed-in test account with. */
|
|
30
|
+
greeting: '{{SIGNED_IN_TEXT}}',
|
|
31
|
+
/** The message for a wrong password. */
|
|
32
|
+
wrongPasswordMessage: '{{LOGIN_ERROR_TEXT}}',
|
|
33
|
+
/**
|
|
34
|
+
* A synthetic wrong password, unique per run.
|
|
35
|
+
* @returns The password.
|
|
36
|
+
*/
|
|
37
|
+
wrongPassword: (): string => `wrong-${uniqueSuffix()}`,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** The labels of the language this run uses. */
|
|
42
|
+
export const labels = LABELS[env.language() as keyof typeof LABELS] ?? LABELS.en;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { signInAndSave } from '../fixtures/session';
|
|
2
|
+
import { logger } from '../utils/logger';
|
|
3
|
+
import { test as setup } from '../fixtures';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Signs in once per run and saves the session (cookies and storage) to `auth/user.json`; the smoke, regression
|
|
7
|
+
* and api projects start from it, so no test signs in again. If the app has no sign-in, delete this project and
|
|
8
|
+
* the `storageState` lines in `playwright.config.ts`.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
setup('authenticate', async ({ page }) => {
|
|
12
|
+
await setup.step('Sign in and save the session', async () => {
|
|
13
|
+
await signInAndSave(page);
|
|
14
|
+
logger.info(`Session saved (${page.url()})`);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import { paths } from '../src/config/paths';
|
|
3
|
+
import { logger } from '../utils/logger';
|
|
4
|
+
import { test as teardown } from '../fixtures';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Runs after every project that depends on `setup`: removes the saved session, so a signed-in state never
|
|
8
|
+
* outlives the run or lands in a commit.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
teardown('remove saved session', async () => {
|
|
12
|
+
fs.rmSync(paths.userSession, { force: true });
|
|
13
|
+
fs.rmSync(paths.sessionStorage, { force: true });
|
|
14
|
+
logger.info('Session removed');
|
|
15
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import { MissingSettingError } from '../../utils/errors';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Settings of the suite, read in this one place. `src/config/loadEnv.ts` loads the project's one `.env` into the
|
|
7
|
+
* environment; this module only reads `process.env`, and only when a value is used, so importing it never throws.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** An account to sign in with. */
|
|
11
|
+
export interface Account {
|
|
12
|
+
user: string;
|
|
13
|
+
password: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns the value of a required setting.
|
|
18
|
+
* @param name Environment variable name, e.g. `E2E_USER`.
|
|
19
|
+
* @returns The value.
|
|
20
|
+
* @throws MissingSettingError when it isn't set.
|
|
21
|
+
*/
|
|
22
|
+
export function required(name: string): string {
|
|
23
|
+
const value = process.env[name];
|
|
24
|
+
if (!value) throw new MissingSettingError(name);
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Returns the value of an optional setting.
|
|
30
|
+
* @param name Environment variable name.
|
|
31
|
+
* @returns The value, or `undefined` when it isn't set.
|
|
32
|
+
*/
|
|
33
|
+
export function optional(name: string): string | undefined {
|
|
34
|
+
return process.env[name] || undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Every setting the suite reads, each read when it is used. */
|
|
38
|
+
/**
|
|
39
|
+
* The Chrome or Edge installed on this machine, so a run (CLI, UI mode, the editor's test explorer) needs no browser
|
|
40
|
+
* download. Checks the standard install places only; nothing is started.
|
|
41
|
+
* @returns The channel, or `undefined` when neither is installed.
|
|
42
|
+
*/
|
|
43
|
+
function installedChannel(): 'chrome' | 'msedge' | undefined {
|
|
44
|
+
/** Whether a file or folder exists. */
|
|
45
|
+
const exists = (p: string): boolean => { try { return fs.statSync(p).isFile() || fs.statSync(p).isDirectory(); } catch { return false; } };
|
|
46
|
+
/** Whether one of the commands is on the PATH. */
|
|
47
|
+
const onPath = (names: string[]): boolean => (process.env.PATH || '').split(path.delimiter).some((d) => names.some((n) => exists(path.join(d, n))));
|
|
48
|
+
if (process.platform === 'win32') {
|
|
49
|
+
const roots = ['ProgramFiles', 'ProgramFiles(x86)', 'LOCALAPPDATA'].map((v) => process.env[v]).filter((r): r is string => Boolean(r));
|
|
50
|
+
if (roots.some((r) => exists(path.join(r, 'Google', 'Chrome', 'Application', 'chrome.exe')))) return 'chrome';
|
|
51
|
+
if (roots.some((r) => exists(path.join(r, 'Microsoft', 'Edge', 'Application', 'msedge.exe')))) return 'msedge';
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (process.platform === 'darwin') {
|
|
55
|
+
if (exists('/Applications/Google Chrome.app')) return 'chrome';
|
|
56
|
+
return exists('/Applications/Microsoft Edge.app') ? 'msedge' : undefined;
|
|
57
|
+
}
|
|
58
|
+
if (exists('/opt/google/chrome/chrome') || onPath(['google-chrome', 'google-chrome-stable'])) return 'chrome';
|
|
59
|
+
return exists('/opt/microsoft/msedge/msedge') || onPath(['microsoft-edge', 'microsoft-edge-stable']) ? 'msedge' : undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const env = {
|
|
63
|
+
/**
|
|
64
|
+
* The app under test (`BASE_URL`); pages open paths relative to it.
|
|
65
|
+
* @returns The URL, or `undefined` for the unit project, which needs no app.
|
|
66
|
+
*/
|
|
67
|
+
baseUrl(): string | undefined {
|
|
68
|
+
return optional('BASE_URL');
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The test account the user gave (`E2E_USER`, `E2E_PASSWORD`). Never logged or written to a file.
|
|
73
|
+
* @returns The account; throws MissingSettingError naming a missing variable.
|
|
74
|
+
*/
|
|
75
|
+
testAccount(): Account {
|
|
76
|
+
return { user: required('E2E_USER'), password: required('E2E_PASSWORD') };
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Login for the browser's own prompt (HTTP Basic or Digest), sent only to `BASE_URL`'s origin. Only
|
|
81
|
+
* `HTTP_USER`/`HTTP_PASSWORD`, never the test account: Playwright writes these into every failure trace.
|
|
82
|
+
* @returns Playwright's `httpCredentials`, or `undefined` when the app has no prompt.
|
|
83
|
+
*/
|
|
84
|
+
httpCredentials(): { username: string; password: string; origin: string } | undefined {
|
|
85
|
+
const base = optional('BASE_URL');
|
|
86
|
+
const username = optional('HTTP_USER');
|
|
87
|
+
const password = optional('HTTP_PASSWORD');
|
|
88
|
+
if (!base || !username || !password) return undefined;
|
|
89
|
+
return { username, password, origin: new URL(base).origin };
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The installed browser to use when Playwright's own can't be downloaded (`PW_CHANNEL=chrome` or `msedge`).
|
|
94
|
+
* @returns The channel, or `undefined` for Playwright's bundled browser.
|
|
95
|
+
*/
|
|
96
|
+
browserChannel(): string | undefined {
|
|
97
|
+
const set = optional('PW_CHANNEL');
|
|
98
|
+
if (set) return set === 'chromium' ? undefined : set;
|
|
99
|
+
return installedChannel();
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The app language the labels in `resources/testData` are taken from (`APP_LANGUAGE`, default `en`).
|
|
104
|
+
* @returns The language key.
|
|
105
|
+
*/
|
|
106
|
+
language(): string {
|
|
107
|
+
return optional('APP_LANGUAGE') || 'en';
|
|
108
|
+
},
|
|
109
|
+
};
|