From 53f19f7935c280f3661ed0838883f1737cc70bb1 Mon Sep 17 00:00:00 2001 From: Akash Rathod <41251473+akashrathod28@users.noreply.github.com> Date: Tue, 23 Dec 2025 12:48:17 +0100 Subject: [PATCH] [ACS-10876] ACA e2e playwright automated test for Firefox Edge and Safari (#4952) * [ACS-10876] playwright config changes to support multi browser * [ACS-10876]workflow temp changes to enable all browser run * [ACS-10876]workflow issue fix * [ACS-10876]workflow issue fix * [ACS-10876]workflow issue fix * [ACS-10876]workflow issue fix * [ACS-10876]fix report issue and webkit dep issue * [ACS-10876]fix report issue and exclude test logic * [ACS-10876]playwright browser setup change * [ACS-10876]small fixes * [ACS-10876]restore only run on pull request schedule job * [ACS-10876]sonar cloud issue fix * [ACS-10876]make chromium for pr run and chrome browser for scheduled run * [ACS-10876]sonar cloud issue fix * [ACS-10876]sonar cloud issue fix and small improvement --- .github/actions/run-e2e-playwright/action.yml | 3 +- .github/workflows/pull-request.yml | 23 +- e2e/playwright/README.md | 328 ++++++++++++++++++ .../authentication/exclude.tests.json | 7 +- .../authentication/playwright.config.ts | 10 +- .../copy-move-actions/exclude.tests.json | 4 +- .../copy-move-actions/playwright.config.ts | 11 +- .../create-actions/exclude.tests.json | 4 +- .../create-actions/playwright.config.ts | 10 +- .../delete-actions/exclude.tests.json | 4 +- .../delete-actions/playwright.config.ts | 10 +- .../edit-actions/exclude.tests.json | 4 +- .../edit-actions/playwright.config.ts | 10 +- .../favorite-actions/exclude.tests.json | 4 +- .../favorite-actions/playwright.config.ts | 10 +- .../exclude.tests.json | 4 +- .../playwright.config.ts | 10 +- .../folder-rules/exclude.tests.json | 9 +- .../folder-rules/playwright.config.ts | 10 +- e2e/playwright/info-drawer/exclude.tests.json | 8 +- .../info-drawer/playwright.config.ts | 10 +- .../library-actions/exclude.tests.json | 4 +- .../library-actions/playwright.config.ts | 10 +- e2e/playwright/list-views/exclude.tests.json | 27 +- .../list-views/playwright.config.ts | 12 +- e2e/playwright/navigation/exclude.tests.json | 11 +- .../navigation/playwright.config.ts | 10 +- e2e/playwright/pagination/exclude.tests.json | 4 +- .../pagination/playwright.config.ts | 10 +- e2e/playwright/search/exclude.tests.json | 8 +- e2e/playwright/search/playwright.config.ts | 10 +- .../share-action/exclude.tests.json | 4 +- .../share-action/playwright.config.ts | 10 +- e2e/playwright/smoke-test/exclude.tests.json | 4 +- .../smoke-test/playwright.config.ts | 10 +- .../exclude.tests.json | 4 +- .../playwright.config.ts | 10 +- .../exclude.tests.json | 4 +- .../playwright.config.ts | 10 +- e2e/playwright/viewer/exclude.tests.json | 50 ++- e2e/playwright/viewer/playwright.config.ts | 12 +- package-lock.json | 156 ++++----- package.json | 1 + .../src/base-config/playwright.config.ts | 126 ++++++- .../src/base-config/report-portal.config.ts | 18 +- .../src/utils/exclude-tests.ts | 36 +- 46 files changed, 742 insertions(+), 312 deletions(-) create mode 100644 e2e/playwright/README.md diff --git a/.github/actions/run-e2e-playwright/action.yml b/.github/actions/run-e2e-playwright/action.yml index 0b35580fb..efd534467 100644 --- a/.github/actions/run-e2e-playwright/action.yml +++ b/.github/actions/run-e2e-playwright/action.yml @@ -21,6 +21,7 @@ runs: shell: bash env: OPTIONS: ${{ inputs.options }} + PLAYWRIGHT_BROWSER: ${{ env.PLAYWRIGHT_BROWSER || 'chromium' }} run: | npm start > /dev/null &\ @@ -31,5 +32,5 @@ runs: done printf "\nApplication is ready.\n" - echo "Running playwright tests with options $OPTIONS" + echo "Running playwright tests with options $OPTIONS on browser ${PLAYWRIGHT_BROWSER}" E2E_TARGET=$OPTIONS npm run ci:e2e diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 121976a5d..67d9eaee6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -123,13 +123,16 @@ jobs: e2es-playwright: needs: [lint, build, unit-tests] - name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}' + name: E2E | ${{ matrix.browser || 'chromium' }} | ${{ matrix.e2e-suites.name }} | Playwright runs-on: ubuntu-24.04 env: NODE_OPTIONS: --dns-result-order=ipv4first + PLAYWRIGHT_BROWSER: ${{ matrix.browser }} strategy: fail-fast: false matrix: + # For scheduled runs, include all browsers; for PR runs, only Chromium + browser: ${{ github.event_name != 'pull_request' && fromJSON('["chrome", "firefox", "webkit", "msedge"]') || fromJSON('["chromium"]') }} e2e-suites: - name: "create-actions" id: 1 @@ -199,7 +202,7 @@ jobs: uses: Alfresco/alfresco-build-tools/.github/actions/kubectl-keep-nslogs@b51dfeef6bda4a506778050a1c0e53eed440598c # v11.0.1 with: log_retention: 7 - log_name_identifier: "logs-${{ matrix.e2e-suites.name }}" + log_name_identifier: "logs-${{ matrix.browser || 'chromium' }}-${{ matrix.e2e-suites.name }}" - name: Before install uses: ./.github/actions/before-install @@ -217,15 +220,27 @@ jobs: - name: Before e2e uses: ./.github/actions/before-e2e - - name: Before playwright + - name: Before playwright (Chromium for PR) + if: ${{ github.event_name == 'pull_request' }} run: npm run ci:playwright:install + - name: Before playwright (all browsers) + if: ${{ github.event_name != 'pull_request' }} + run: npm run ci:playwright:install:all + + - name: Install Playwright system dependencies + # Install system dependencies required for all browsers (especially WebKit on Linux) + if: ${{ github.event_name != 'pull_request' }} + run: npx playwright install-deps + - name: Run e2e playwright uses: ./.github/actions/run-e2e-playwright with: options: "${{ matrix.e2e-suites.name }}" - artifact-name: ${{ matrix.e2e-suites.name }} + artifact-name: "${{ matrix.browser || 'chromium' }}-${{ matrix.e2e-suites.name }}" test-runner: playwright + env: + PLAYWRIGHT_BROWSER: ${{ matrix.browser || 'chromium' }} - name: Debug Ingress Controller Logs if: always() && steps.deploy-local-acs.outcome == 'success' diff --git a/e2e/playwright/README.md b/e2e/playwright/README.md new file mode 100644 index 000000000..cf8417891 --- /dev/null +++ b/e2e/playwright/README.md @@ -0,0 +1,328 @@ +# Playwright E2E Tests + +This directory contains end-to-end (E2E) tests for the Alfresco Content Application using Playwright. + +## Table of Contents + +- [Running Tests Locally](#running-tests-locally) +- [Running Tests in CI](#running-tests-in-ci) +- [Viewing Test Results](#viewing-test-results) +- [Browser Support](#browser-support) +- [Excluding Tests](#excluding-tests) +- [Test Configuration](#test-configuration) +- [Troubleshooting](#troubleshooting) + +## Running Tests Locally + +### Prerequisites + +1. Install dependencies: + ```bash + npm ci + ``` + +2. Install Playwright browsers: + ```bash + # Install Chromium only (default) + npm run ci:playwright:install + + # Install all browsers (Chromium, Chrome, Firefox, WebKit, MS Edge) + npm run ci:playwright:install:all + ``` + + **Note**: Chrome/Chromium and MS Edge use real browser binaries. Firefox uses Playwright's patched version. Safari/WebKit uses emulation (not supported in CI). + +### Running a Specific Test Suite + +Each test suite can be run independently using Nx: + +```bash +# Run authentication tests +nx run authentication-e2e:e2e + +# Run viewer tests +nx run viewer-e2e:e2e + +# Run search tests +nx run search-e2e:e2e +``` + +### Running with Options + +You can run tests with various configurations: + +```bash +# Run in UI mode (interactive) +nx run authentication-e2e:e2e --configuration=ui + +# Run in headed mode (see browser) +nx run authentication-e2e:e2e --configuration=headed + +# Run in debug mode +nx run authentication-e2e:e2e --configuration=debug +``` + +### Running with Specific Browser + +Set the `PLAYWRIGHT_BROWSER` environment variable: + +```bash +# Run with Firefox +PLAYWRIGHT_BROWSER=firefox nx run authentication-e2e:e2e + +# Run with WebKit +PLAYWRIGHT_BROWSER=webkit nx run authentication-e2e:e2e + +# Run with MS Edge +PLAYWRIGHT_BROWSER=msedge nx run authentication-e2e:e2e + +# Run with Chrome (default) +PLAYWRIGHT_BROWSER=chrome nx run authentication-e2e:e2e +``` + +### Running All Tests + +To run all test suites, you can use the CI command: + +```bash +# Set the E2E_TARGET environment variable to the suite name +E2E_TARGET=authentication npm run ci:e2e +``` + +## Running Tests in CI + +### Pull Request Workflow + +When a pull request is opened, synchronized, or reopened against `master` or `develop` branches, the following happens: + +1. **Lint** - Code linting checks +2. **Build** - Application build +3. **Unit Tests** - Unit test execution +4. **E2E Playwright Tests** - All test suites run across multiple browsers + +#### Test Matrix + +The CI runs tests in a matrix configuration: + +- **Browsers**: `all`, `chromium`, `firefox`, `webkit`, `msedge` +- **Test Suites**: All available test suites + +Each combination of browser and test suite runs in parallel, creating multiple test jobs. + +#### Example Job Name Format + +``` +E2E | chromium | authentication | Playwright +E2E | firefox | viewer | Playwright +``` + +### Scheduled Workflows + +Tests also run on a schedule: +- **Schedule**: Every weekday at 12:00 UTC (`0 12 * * 1-5`) +- **Configuration**: Same as pull request workflow + +### CI Environment Variables + +The following environment variables are set in CI: + +```yaml +BASE_URL: http://localhost +ADMIN_EMAIL: admin +ADMIN_PASSWORD: admin +PLAYWRIGHT_E2E_HOST: http://localhost:4200 +PLAYWRIGHT_BROWSER: ${{ matrix.browser }} +MAXINSTANCES: 2 +RETRY_COUNT: 2 +``` + +### CI Test Execution Flow + +1. Deploy Local ACS +2. Install Dependencies (`npm ci`) +3. Install Playwright Browsers +4. Start Application +5. Run Tests +6. Collect Artifacts (reports, screenshots, videos, traces) + +## Viewing Test Results + +When tests run in CI, results are available in two places: **GitHub Actions** and **Report Portal**. + +### Viewing Results in GitHub Actions + +1. Navigate to the repository's **Actions** tab and select the workflow run +2. Find the specific test job (e.g., `E2E | chromium | authentication | Playwright`) +3. View test output and logs in the job output +4. Download test artifacts on failure: + - Screenshots, videos (`.webm`), and traces (`.zip`) + - Analyze traces using: `npx playwright show-trace ` +5. Application logs are available as artifacts named `logs--` + +### Viewing Results in Report Portal + +CI e2e test results are automatically reported to Report Portal for analysis and historical tracking. The Report Portal URL is available in the GitHub Actions workflow run under "Run e2e Playwright" section. + +**Sample URL format**: `https://reportportal.envalfresco.com/ui/#alfresco-content-app/launches/all/` + +- Project name: `alfresco-content-app` +- Tests are reported only in CI environments (not locally) + + +## Browser Support + +The tests support the following browsers: + +- **Chromium** (default) - Uses real Google Chrome browser +- **Firefox** - Uses Playwright's patched version +- **WebKit** - Safari-based browser (uses emulation, not supported in CI) +- **MS Edge** - Uses real Microsoft Edge browser + +Browser-specific test exclusions are supported (see [Excluding Tests](#excluding-tests)). + +## Excluding Tests + +### How It Works + +Test exclusion is handled through `exclude.tests.json` files located in each test suite directory. The exclusion system: + +1. Reads the `exclude.tests.json` file for the current test suite +2. Checks the `PLAYWRIGHT_BROWSER` environment variable to determine the current browser +3. Applies exclusions based on: + - **`all`** - Excludes tests for all browsers + - **`chromium`** - Excludes tests only for Chromium + - **`firefox`** - Excludes tests only for Firefox + - **`webkit`** - Excludes tests only for WebKit + - **`msedge`** - Excludes tests only for MS Edge + +### Exclusion File Format + +Each `exclude.tests.json` file follows this structure: + +```json +{ + "all": { + "XAT-4370": "https://hyland.atlassian.net/browse/ACS-5479" + }, + "firefox": { + "XAT-17773": "https://hyland.atlassian.net/browse/ACS-10917" + }, + "webkit": { + "XAT-5417": "https://hyland.atlassian.net/browse/ACS-10917" + } +} +``` + +### Adding Test Exclusions + + **Example**: + ```json + { + "all": { + "XAT-4370": "https://hyland.atlassian.net/browse/ACS-5479" + }, + "firefox": { + "XAT-17773": "https://hyland.atlassian.net/browse/ACS-10917" + } + } + ``` + +### How Exclusions Are Applied + +- The exclusion system uses regex patterns to match test IDs +- Tests matching excluded IDs are skipped during execution +- Console output shows which tests are excluded and why +- Example console output: + ``` + [ 🎭 Playwright Excludes - Authentication ] ❌ Tests excluded for browser 'firefox' because of 🐛 : XAT-17773 (from keys: all, firefox) + ``` + +### Best Practices + +- **Always include a Jira ticket** - Link to the bug or issue tracking the problem +- **Use specific browser exclusions** - Only exclude tests from browsers where they fail +- **Review exclusions regularly** - Remove exclusions when bugs are fixed +- **Document the reason** - The Jira ticket URL serves as documentation + +## Test Configuration + +### Global Configuration + +Global test configuration is defined in `projects/aca-playwright-shared/src/base-config/playwright.config.ts`: + +- **Timeout**: Global test timeout +- **Retries**: 2 retries on CI, 0 locally +- **Workers**: 3 parallel workers +- **Headless**: `true` on CI, configurable locally +- **Traces**: Retained on failure +- **Videos**: Retained on failure +- **Screenshots**: Captured only on failure + +### Suite-Specific Configuration + +Each test suite has its own `playwright.config.ts` that: +- Extends the global configuration +- Applies test exclusions via `grepInvert` +- Defines suite-specific projects + +### Environment Variables + +| Variable | Description | Default | +|----------|-------------|---------| +| `PLAYWRIGHT_BROWSER` | Browser to use for tests | `chromium` | +| `PLAYWRIGHT_E2E_HOST` | Base URL for the application | `http://localhost:4200` | +| `PLAYWRIGHT_HEADLESS` | Run in headless mode | `true` (CI) / `false` (local) | + + +## Troubleshooting + +### Tests Fail Locally + +1. **Check application is running**: + ```bash + npm start + ``` + Ensure the app is accessible at `http://localhost:4200` + +2. **Verify browser installation**: + ```bash + npx playwright install + ``` + +3. **Check environment variables**: + ```bash + echo $PLAYWRIGHT_BROWSER + echo $PLAYWRIGHT_E2E_HOST + ``` + +### CI Failures + +When tests fail in CI: + +1. Navigate to the failed job in GitHub Actions +2. Download test artifacts (screenshots, videos, traces) from the job's Artifacts section +3. Analyze traces using: `npx playwright show-trace ` + +#### Additional Debugging Steps + +1. Verify environment - Ensure all required services (ACS) are deployed correctly +2. Check environment variables - Verify all required secrets and variables are set +3. Review related logs - Check ACS deployment logs and application logs + +### Debug Mode + +Run tests in debug mode to step through execution: + +```bash +nx run authentication-e2e:e2e --configuration=debug +``` + +This will: +- Open Playwright Inspector +- Allow step-by-step execution +- Show browser DevTools + +## Additional Resources + +- Project-specific test utilities: `projects/aca-playwright-shared/` + diff --git a/e2e/playwright/authentication/exclude.tests.json b/e2e/playwright/authentication/exclude.tests.json index 52723a515..c47fd7820 100644 --- a/e2e/playwright/authentication/exclude.tests.json +++ b/e2e/playwright/authentication/exclude.tests.json @@ -1,3 +1,8 @@ { - "XAT-4370" : "https://hyland.atlassian.net/browse/ACS-5479" + "all": { + "XAT-4370": "https://hyland.atlassian.net/browse/ACS-5479" + }, + "firefox": { + "XAT-17773": "https://hyland.atlassian.net/browse/ACS-10917" + } } diff --git a/e2e/playwright/authentication/playwright.config.ts b/e2e/playwright/authentication/playwright.config.ts index dbfd1e15b..23e94196f 100644 --- a/e2e/playwright/authentication/playwright.config.ts +++ b/e2e/playwright/authentication/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Authentication'), - projects: [ - { - name: 'Authentication', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Authentication', './src/tests') }; export default config; diff --git a/e2e/playwright/copy-move-actions/exclude.tests.json b/e2e/playwright/copy-move-actions/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/copy-move-actions/exclude.tests.json +++ b/e2e/playwright/copy-move-actions/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/copy-move-actions/playwright.config.ts b/e2e/playwright/copy-move-actions/playwright.config.ts index b7a75dcf6..21ab73285 100644 --- a/e2e/playwright/copy-move-actions/playwright.config.ts +++ b/e2e/playwright/copy-move-actions/playwright.config.ts @@ -23,21 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, timeouts } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, timeouts, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Copy Move Actions'), - projects: [ - { - name: 'Copy Move Actions', - testDir: './src/tests', - use: {}, - timeout: timeouts.extendedTest - } - ] + projects: createSuiteProjects('Copy Move Actions', './src/tests', {}, { timeout: timeouts.extendedTest }) }; export default config; diff --git a/e2e/playwright/create-actions/exclude.tests.json b/e2e/playwright/create-actions/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/create-actions/exclude.tests.json +++ b/e2e/playwright/create-actions/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/create-actions/playwright.config.ts b/e2e/playwright/create-actions/playwright.config.ts index a3dab2653..1ee654602 100644 --- a/e2e/playwright/create-actions/playwright.config.ts +++ b/e2e/playwright/create-actions/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Create Actions'), - projects: [ - { - name: 'Create Actions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Create Actions', './src/tests') }; export default config; diff --git a/e2e/playwright/delete-actions/exclude.tests.json b/e2e/playwright/delete-actions/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/delete-actions/exclude.tests.json +++ b/e2e/playwright/delete-actions/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/delete-actions/playwright.config.ts b/e2e/playwright/delete-actions/playwright.config.ts index 9265a4c22..9d67c22fb 100644 --- a/e2e/playwright/delete-actions/playwright.config.ts +++ b/e2e/playwright/delete-actions/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Delete Actions'), - projects: [ - { - name: 'Delete Actions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Delete Actions', './src/tests') }; export default config; diff --git a/e2e/playwright/edit-actions/exclude.tests.json b/e2e/playwright/edit-actions/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/edit-actions/exclude.tests.json +++ b/e2e/playwright/edit-actions/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/edit-actions/playwright.config.ts b/e2e/playwright/edit-actions/playwright.config.ts index f5aa39986..6c003e0ca 100644 --- a/e2e/playwright/edit-actions/playwright.config.ts +++ b/e2e/playwright/edit-actions/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Edit Actions'), - projects: [ - { - name: 'Edit Actions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Edit Actions', './src/tests') }; export default config; diff --git a/e2e/playwright/favorite-actions/exclude.tests.json b/e2e/playwright/favorite-actions/exclude.tests.json index 9e26dfeeb..19ead4630 100644 --- a/e2e/playwright/favorite-actions/exclude.tests.json +++ b/e2e/playwright/favorite-actions/exclude.tests.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "all": {} +} \ No newline at end of file diff --git a/e2e/playwright/favorite-actions/playwright.config.ts b/e2e/playwright/favorite-actions/playwright.config.ts index 85d2bf589..40f2ed29b 100644 --- a/e2e/playwright/favorite-actions/playwright.config.ts +++ b/e2e/playwright/favorite-actions/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Favorite Actions'), - projects: [ - { - name: 'Favorite Actions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Favorite Actions', './src/tests') }; export default config; diff --git a/e2e/playwright/folder-information-actions/exclude.tests.json b/e2e/playwright/folder-information-actions/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/folder-information-actions/exclude.tests.json +++ b/e2e/playwright/folder-information-actions/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/folder-information-actions/playwright.config.ts b/e2e/playwright/folder-information-actions/playwright.config.ts index af7e4b0cd..1e6f4fc82 100644 --- a/e2e/playwright/folder-information-actions/playwright.config.ts +++ b/e2e/playwright/folder-information-actions/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Folder Information Actions'), - projects: [ - { - name: 'Folder Information Actions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Folder Information Actions', './src/tests') }; export default config; diff --git a/e2e/playwright/folder-rules/exclude.tests.json b/e2e/playwright/folder-rules/exclude.tests.json index b44c2ae8d..dce1031ad 100644 --- a/e2e/playwright/folder-rules/exclude.tests.json +++ b/e2e/playwright/folder-rules/exclude.tests.json @@ -1,4 +1,9 @@ { - "XAT-897": "https://hyland.atlassian.net/browse/ACS-5503", - "XAT-907": "https://hyland.atlassian.net/browse/ACS-10486" + "all": { + "XAT-897": "https://hyland.atlassian.net/browse/ACS-5503", + "XAT-907": "https://hyland.atlassian.net/browse/ACS-10486" + }, + "webkit": { + "XAT-888": "https://hyland.atlassian.net/browse/ACS-10917" + } } diff --git a/e2e/playwright/folder-rules/playwright.config.ts b/e2e/playwright/folder-rules/playwright.config.ts index 7ab114e82..e923b519e 100644 --- a/e2e/playwright/folder-rules/playwright.config.ts +++ b/e2e/playwright/folder-rules/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Folder Rules'), - projects: [ - { - name: 'Folder Rules', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Folder Rules', './src/tests') }; export default config; diff --git a/e2e/playwright/info-drawer/exclude.tests.json b/e2e/playwright/info-drawer/exclude.tests.json index a4d923e14..834172933 100644 --- a/e2e/playwright/info-drawer/exclude.tests.json +++ b/e2e/playwright/info-drawer/exclude.tests.json @@ -1,5 +1,7 @@ { - "XAT-5523": "https://hyland.atlassian.net/browse/ACA-4697", - "XAT-5516": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-5546": "https://hyland.atlassian.net/browse/ACS-10621" + "all": { + "XAT-5523": "https://hyland.atlassian.net/browse/ACA-4697", + "XAT-5516": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-5546": "https://hyland.atlassian.net/browse/ACS-10621" + } } diff --git a/e2e/playwright/info-drawer/playwright.config.ts b/e2e/playwright/info-drawer/playwright.config.ts index 544a5ba68..94d012def 100644 --- a/e2e/playwright/info-drawer/playwright.config.ts +++ b/e2e/playwright/info-drawer/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Info Drawer'), - projects: [ - { - name: 'Info Drawer', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Info Drawer', './src/tests') }; export default config; diff --git a/e2e/playwright/library-actions/exclude.tests.json b/e2e/playwright/library-actions/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/library-actions/exclude.tests.json +++ b/e2e/playwright/library-actions/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/library-actions/playwright.config.ts b/e2e/playwright/library-actions/playwright.config.ts index e37520535..cc3929e27 100644 --- a/e2e/playwright/library-actions/playwright.config.ts +++ b/e2e/playwright/library-actions/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Library Actions'), - projects: [ - { - name: 'Library Actions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Library Actions', './src/tests') }; export default config; diff --git a/e2e/playwright/list-views/exclude.tests.json b/e2e/playwright/list-views/exclude.tests.json index b947e1d69..6aa938745 100644 --- a/e2e/playwright/list-views/exclude.tests.json +++ b/e2e/playwright/list-views/exclude.tests.json @@ -1,3 +1,28 @@ { - "XAT-4525": "https://hyland.atlassian.net/browse/ACS-9741" + "all": { + "XAT-4525": "https://hyland.atlassian.net/browse/ACS-9741" + }, + "firefox": { + "XAT-4455": "https://hyland.atlassian.net/browse/ACS-10917" + }, + "webkit": { + "XAT-4459": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4460": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4461": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4462": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4452": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4464": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4441": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5612": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4448": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4449": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4450": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4437": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4438": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4439": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4526": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4471": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4470": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4472": "https://hyland.atlassian.net/browse/ACS-10917" + } } diff --git a/e2e/playwright/list-views/playwright.config.ts b/e2e/playwright/list-views/playwright.config.ts index 4c73108e5..8d7248baa 100644 --- a/e2e/playwright/list-views/playwright.config.ts +++ b/e2e/playwright/list-views/playwright.config.ts @@ -23,22 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'List Views'), - projects: [ - { - name: 'List Views', - testDir: './src/tests', - use: { - users: ['admin'] - } - } - ] + projects: createSuiteProjects('List Views', './src/tests', { users: ['admin'] }) }; export default config; diff --git a/e2e/playwright/navigation/exclude.tests.json b/e2e/playwright/navigation/exclude.tests.json index 0967ef424..a15d08b8f 100644 --- a/e2e/playwright/navigation/exclude.tests.json +++ b/e2e/playwright/navigation/exclude.tests.json @@ -1 +1,10 @@ -{} +{ + "all": {}, + "webkit": { + "XAT-4400": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4388": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4391": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4396": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-4399": "https://hyland.atlassian.net/browse/ACS-10917" + } +} diff --git a/e2e/playwright/navigation/playwright.config.ts b/e2e/playwright/navigation/playwright.config.ts index 4afcb0e9e..e566893e9 100644 --- a/e2e/playwright/navigation/playwright.config.ts +++ b/e2e/playwright/navigation/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Navigation'), - projects: [ - { - name: 'Navigation', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Navigation', './src/tests') }; export default config; diff --git a/e2e/playwright/pagination/exclude.tests.json b/e2e/playwright/pagination/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/pagination/exclude.tests.json +++ b/e2e/playwright/pagination/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/pagination/playwright.config.ts b/e2e/playwright/pagination/playwright.config.ts index 290b191d4..22cd31d42 100644 --- a/e2e/playwright/pagination/playwright.config.ts +++ b/e2e/playwright/pagination/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Pagination'), - projects: [ - { - name: 'Pagination', - testDir: './src/tests/', - use: {} - } - ] + projects: createSuiteProjects('Pagination', './src/tests') }; export default config; diff --git a/e2e/playwright/search/exclude.tests.json b/e2e/playwright/search/exclude.tests.json index 0c28fc0aa..e3856cfb5 100644 --- a/e2e/playwright/search/exclude.tests.json +++ b/e2e/playwright/search/exclude.tests.json @@ -1,5 +1,7 @@ { - "XAT-17697": "https://hyland.atlassian.net/browse/ACS-7464", - "XAT-17121": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-5602": "https://hyland.atlassian.net/browse/ACS-10384" + "all": { + "XAT-17697": "https://hyland.atlassian.net/browse/ACS-7464", + "XAT-17121": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-5602": "https://hyland.atlassian.net/browse/ACS-10384" + } } diff --git a/e2e/playwright/search/playwright.config.ts b/e2e/playwright/search/playwright.config.ts index 644d01f8e..ee3343156 100644 --- a/e2e/playwright/search/playwright.config.ts +++ b/e2e/playwright/search/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Search'), - projects: [ - { - name: 'Search', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Search', './src/tests') }; export default config; diff --git a/e2e/playwright/share-action/exclude.tests.json b/e2e/playwright/share-action/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/share-action/exclude.tests.json +++ b/e2e/playwright/share-action/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/share-action/playwright.config.ts b/e2e/playwright/share-action/playwright.config.ts index adbb6ddd8..4fc186230 100644 --- a/e2e/playwright/share-action/playwright.config.ts +++ b/e2e/playwright/share-action/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Share Action'), - projects: [ - { - name: 'Share Action', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Share Action', './src/tests') }; export default config; diff --git a/e2e/playwright/smoke-test/exclude.tests.json b/e2e/playwright/smoke-test/exclude.tests.json index 3f268cba5..2222945db 100644 --- a/e2e/playwright/smoke-test/exclude.tests.json +++ b/e2e/playwright/smoke-test/exclude.tests.json @@ -1,3 +1,5 @@ { - "XAT-17738": "https://hyland.atlassian.net/browse/ACS-9889" + "all": { + "XAT-17738": "https://hyland.atlassian.net/browse/ACS-9889" + } } diff --git a/e2e/playwright/smoke-test/playwright.config.ts b/e2e/playwright/smoke-test/playwright.config.ts index 5ea402d6f..f4c7d842c 100644 --- a/e2e/playwright/smoke-test/playwright.config.ts +++ b/e2e/playwright/smoke-test/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Smoke-test'), - projects: [ - { - name: 'Smoke-test', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Smoke-test', './src/tests') }; export default config; diff --git a/e2e/playwright/special-permissions-actions-available/exclude.tests.json b/e2e/playwright/special-permissions-actions-available/exclude.tests.json index 0967ef424..7507194dc 100644 --- a/e2e/playwright/special-permissions-actions-available/exclude.tests.json +++ b/e2e/playwright/special-permissions-actions-available/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "all": {} +} diff --git a/e2e/playwright/special-permissions-actions-available/playwright.config.ts b/e2e/playwright/special-permissions-actions-available/playwright.config.ts index c42757a94..18cd2f4da 100644 --- a/e2e/playwright/special-permissions-actions-available/playwright.config.ts +++ b/e2e/playwright/special-permissions-actions-available/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'special-permissions'), - projects: [ - { - name: 'special-permissions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('special-permissions', './src/tests') }; export default config; diff --git a/e2e/playwright/upload-download-actions/exclude.tests.json b/e2e/playwright/upload-download-actions/exclude.tests.json index 9e26dfeeb..19ead4630 100644 --- a/e2e/playwright/upload-download-actions/exclude.tests.json +++ b/e2e/playwright/upload-download-actions/exclude.tests.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "all": {} +} \ No newline at end of file diff --git a/e2e/playwright/upload-download-actions/playwright.config.ts b/e2e/playwright/upload-download-actions/playwright.config.ts index 75e08f21a..ba6f95a6b 100644 --- a/e2e/playwright/upload-download-actions/playwright.config.ts +++ b/e2e/playwright/upload-download-actions/playwright.config.ts @@ -23,20 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Upload Download Actions'), - projects: [ - { - name: 'Upload Download Actions', - testDir: './src/tests', - use: {} - } - ] + projects: createSuiteProjects('Upload Download Actions', './src/tests') }; export default config; diff --git a/e2e/playwright/viewer/exclude.tests.json b/e2e/playwright/viewer/exclude.tests.json index 7fcdbb508..f15998d7f 100644 --- a/e2e/playwright/viewer/exclude.tests.json +++ b/e2e/playwright/viewer/exclude.tests.json @@ -1,10 +1,44 @@ { - "XAT-5501": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-5499": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-5465": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-17781": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-17181": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-17640": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-17644": "https://hyland.atlassian.net/browse/ACS-9889", - "XAT-17182": "https://hyland.atlassian.net/browse/ACS-9889" + "all": { + "XAT-5501": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-5499": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-5465": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-17781": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-17181": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-17640": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-17644": "https://hyland.atlassian.net/browse/ACS-9889", + "XAT-17182": "https://hyland.atlassian.net/browse/ACS-9889" + }, + "firefox": { + "XAT-5417": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17177": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17178": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17179": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17180": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17183": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17184": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17185": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5485": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5486": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5498": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5504": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5507": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5510": "https://hyland.atlassian.net/browse/ACS-10917" + }, + "webkit": { + "XAT-5417": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17177": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17178": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17179": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17180": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17183": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17184": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-17185": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5485": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5486": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5498": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5504": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5507": "https://hyland.atlassian.net/browse/ACS-10917", + "XAT-5510": "https://hyland.atlassian.net/browse/ACS-10917" + } } diff --git a/e2e/playwright/viewer/playwright.config.ts b/e2e/playwright/viewer/playwright.config.ts index 7111dea0c..b25187576 100644 --- a/e2e/playwright/viewer/playwright.config.ts +++ b/e2e/playwright/viewer/playwright.config.ts @@ -23,22 +23,14 @@ */ import { PlaywrightTestConfig } from '@playwright/test'; -import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/aca-playwright-shared'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray, createSuiteProjects } from '@alfresco/aca-playwright-shared'; import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Viewer'), - projects: [ - { - name: 'Viewer', - testDir: './src/tests', - use: { - users: ['hruser'] - } - } - ] + projects: createSuiteProjects('Viewer', './src/tests', { users: ['hruser'] }) }; export default config; diff --git a/package-lock.json b/package-lock.json index e066a1958..a7a453b3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -151,7 +151,6 @@ "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-8.4.0-20341456262.tgz", "integrity": "sha512-i2kJgVpn0bZ0bsZZRsqizBsRCFAM2rQE7JWOVXOxJMNth/1FZMvYIhTL0/MByAoz2AyvjFrHWxIOl+ehGdYvQQ==", "license": "Apache-2.0", - "peer": true, "dependencies": { "angular-oauth2-oidc": "17.0.2", "angular-oauth2-oidc-jwks": "17.0.2", @@ -199,7 +198,6 @@ "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-8.4.0-20341456262.tgz", "integrity": "sha512-qeAbAiuLlXRPm4htGF2ontOLXtOt7anDGRRzIzlUe+wDaWgo/cf9mq/EW7z1AIiDZFYbaSBJ03qQT2iI8bx+eQ==", "license": "Apache-2.0", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -220,7 +218,6 @@ "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-9.4.0-20341456262.tgz", "integrity": "sha512-uWyoE62j3dv/UHnmU6AMrwJGiT6utJbi4kRyidG5DwEWqNNV6y1Lk3KPd/6eEl9ZnE9u4rh5PMgDrOrSi42tDA==", "license": "Apache-2.0", - "peer": true, "dependencies": { "eventemitter3": "^5.0.1", "superagent": "^9.0.1", @@ -608,7 +605,6 @@ "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-19.2.17.tgz", "integrity": "sha512-6VTet2fzTpSHEjxcVVzL8ZIyNGo/qsUs4XF/3wh9Iwu6qfWx711qXKlqGD/IHWzMTumzvQXbTV4hzvnO7fJvIQ==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1095,7 +1091,6 @@ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-19.2.17.tgz", "integrity": "sha512-3jG33S+5+kqymCRwQlcSEWlY5rYwkKxe0onln+NXxT0/kteR02vWvv1+Li4/QqSr5JvsGHEhAFsZaR9QtOzbdA==", "license": "MIT", - "peer": true, "dependencies": { "parse5": "^7.1.2", "tslib": "^2.3.0" @@ -1111,7 +1106,6 @@ "resolved": "https://registry.npmjs.org/@angular/common/-/common-19.2.17.tgz", "integrity": "sha512-yFUXAdpvOFirGD/EGDwp1WHravHzI4sdyRE2iH7i8im9l8IE2VZ6D1KDJp8VVpMJt38LNlRAWYek3s+z6OcAkg==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1128,7 +1122,6 @@ "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-19.2.17.tgz", "integrity": "sha512-qo8psYASAlDiQ8fAL8i/E2JfWH2nPTpZDKKZxSWvgBVA8o+zUEjYAJu6/k6btnu+4Qcb425T0rmM/zao6EU9Aw==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1142,7 +1135,6 @@ "integrity": "sha512-KG82fh2A0odttc6+FxlQmFfHY/Giq8rYeV1qtdafafJ8hdWIiMr4r37xwhZOl8uk2/XSLM66bxUMFHYm+zt87Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/core": "7.26.9", "@jridgewell/sourcemap-codec": "^1.4.14", @@ -1219,7 +1211,6 @@ "resolved": "https://registry.npmjs.org/@angular/core/-/core-19.2.17.tgz", "integrity": "sha512-nVu0ryxfiXUZ9M+NV21TY+rJZkPXTYo9U0aJb19hvByPpG+EvuujXUOgpulz6vxIzGy7pz/znRa+K9kxuuC+yQ==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1236,7 +1227,6 @@ "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-19.2.17.tgz", "integrity": "sha512-INgGGmMbwXuT+niAjMiCsJrZVEGWKZOep1vCRHoKlVnGUQSRKc3UW8ztmKDKMua/io/Opi03pRMpwbYQcTBr5A==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1265,7 +1255,6 @@ "resolved": "https://registry.npmjs.org/@angular/material/-/material-19.2.17.tgz", "integrity": "sha512-IyA+KP+uUj3r9loqGJrj7qAiEBckj7EVIdV0jlYwqWIUyKWeJ3R88GmLPMH2BgtBU3R/WkS2blXDI0yvRhKfww==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1283,7 +1272,6 @@ "resolved": "https://registry.npmjs.org/@angular/material-date-fns-adapter/-/material-date-fns-adapter-19.2.17.tgz", "integrity": "sha512-H3PJKZg3PatymEMa5KHWPSUvHHAorlEx+BwtUI8vwFozOHCn32FEzx/1nuo6uh0ZZvpc7L1LVYQiZtUn3GyEEA==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1298,7 +1286,6 @@ "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-19.2.17.tgz", "integrity": "sha512-Rn23nIQwYMSeGXWFHI/X8bGHAkdahRxH9UIGUlJKxW61MSkK6AW4kCHG/Ev1TvDq9HjijsMjcqcsd6/Sb8aBXg==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1321,7 +1308,6 @@ "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-19.2.17.tgz", "integrity": "sha512-jrps9QKhuPrHBZwLv+43z+WldT4aVKZu8v7LPpRHb7/pVLvqccXtIxt3Ttm7sa4tc2SwlKazdE8/ezaNWIRnAg==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1340,7 +1326,6 @@ "resolved": "https://registry.npmjs.org/@angular/router/-/router-19.2.17.tgz", "integrity": "sha512-B3Vk+E8UHQwg06WEjGuvYaKNiIXxjHN9pN8S+hDE8xwRgIS5ojEwS94blEvsGQ4QsIja6WjZMOfDUBUPlgUSuA==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -1398,7 +1383,6 @@ "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.2", @@ -3439,8 +3423,7 @@ "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.18.tgz", "integrity": "sha512-EF77RqROHL+4LhMGW5NTeKqfUd/e4OOv6EDFQ/UQQiFyWuqkEKyEz0NDILxOFxWUEVdjT2GQ2cC7t12B6pESwg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-dart": { "version": "2.3.1", @@ -3580,16 +3563,14 @@ "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.13.tgz", "integrity": "sha512-vHzk2xfqQYPvoXtQtywa6ekIonPrUEwe2uftjry3UNRNl89TtzLJVSkiymKJ3WMb+W/DwKXKIb1tKzcIS8ccIg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-html-symbol-entities": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.4.tgz", "integrity": "sha512-afea+0rGPDeOV9gdO06UW183Qg6wRhWVkgCFwiO3bDupAoyXRuvupbb5nUyqSTsLXIKL8u8uXQlJ9pkz07oVXw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-java": { "version": "5.0.12", @@ -3787,8 +3768,7 @@ "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.2.3.tgz", "integrity": "sha512-zXh1wYsNljQZfWWdSPYwQhpwiuW0KPW1dSd8idjMRvSD0aSvWWHoWlrMsmZeRl4qM4QCEAjua8+cjflm41cQBg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-vue": { "version": "3.0.5", @@ -3907,7 +3887,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": "^14 || ^16 || >=18" }, @@ -3931,7 +3910,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": "^14 || ^16 || >=18" } @@ -5211,7 +5189,6 @@ "resolved": "https://registry.npmjs.org/@mat-datetimepicker/core/-/core-15.0.2.tgz", "integrity": "sha512-2vyKub5uCSAWoKC7UlUbNFOwHrHu9gdaK1xluMiimj8GibkxuP0uh2AP1tRsYz2514CAFvsSkD39X6qy0kz7Iw==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "~2.8.1" }, @@ -5332,7 +5309,6 @@ "integrity": "sha512-8PFQxtmXc6ukBC4CqGIoc96M2Ly9WVwCPu4Ffvt+K/SB6rGbeFeZoYAwREV1zGNMJ5v5ly6+AHIEOBxNuSnzSg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@module-federation/bridge-react-webpack-plugin": "0.21.6", "@module-federation/cli": "0.21.6", @@ -5418,7 +5394,6 @@ "integrity": "sha512-/u4f+GYRZfHpSvdt5n40lMCS9Cmve7N3JlDreaFXz8xrWDNOp2wvMgiVGpndo5J4iQdtLjpavWStahGQ05B2cQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@module-federation/enhanced": "0.21.6", "@module-federation/runtime": "0.21.6", @@ -5503,7 +5478,6 @@ "integrity": "sha512-fnP+ZOZTFeBGiTAnxve+axGmiYn2D60h86nUISXjXClK3LUY1krUfPgf6MaD4YDJ4i51OGXZWPekeMe16pkd8Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@module-federation/runtime": "0.21.6", "@module-federation/webpack-bundler-runtime": "0.21.6" @@ -6191,7 +6165,6 @@ "resolved": "https://registry.npmjs.org/@ngrx/store/-/store-19.2.1.tgz", "integrity": "sha512-c5vQId7YoAhM0y4HASrz9mtLju+28vJspd6OBlhPbBlSae8GN8m9S/oav+8LaSY19yh95cZ5B/nMcLNNWgL/jA==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.0.0" }, @@ -6236,7 +6209,6 @@ "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-16.0.4.tgz", "integrity": "sha512-s8llTL2SJvROhqttxvEs7Cg+6qSf4kvZPFYO+cTOY1d8DWTjlutRkWAleZcPPoeX927Dm7ALfL07G7oYDJ7z6w==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -7413,7 +7385,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "@napi-rs/wasm-runtime": "0.2.4", "@yarnpkg/lockfile": "^1.1.0", @@ -8655,7 +8626,6 @@ "integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -9004,7 +8974,6 @@ "integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -10595,7 +10564,6 @@ "integrity": "sha512-2mR+2YBydlgZ7Q0Rpd6bCC3MBnV9TS0x857K0zIhbDj4BQOqaWVy1n7fx/B3MrS8TR0QCuzKfyDAjNz+XTyJVQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@module-federation/runtime-tools": "0.21.6", "@rspack/binding": "1.6.6", @@ -10775,6 +10743,7 @@ "integrity": "sha512-ikl+nkWUab/Z4eSkBHgq9FLIUH8qh4OcYKeBQ0fyWqIUFHyjjK0JOfwmH1g/3zAmuUMtkthHCehAtyKzCTQjVA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@angular-devkit/core": "20.3.12", "@angular-devkit/schematics": "20.3.12", @@ -10792,6 +10761,7 @@ "integrity": "sha512-ReFxd/UOoVDr3+kIUjmYILQZF89qg62POdY7a7OqBH7plmInFlYVSEDouJvGqj3LVCPiqTk2ZOSChbhS/eLxXA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ajv": "8.17.1", "ajv-formats": "3.0.1", @@ -10820,6 +10790,7 @@ "integrity": "sha512-JqJ1u59y+Ud51k/8MHYzSP+aQOeC2PJBaDmMnvqfWVaIt6n3x4gc/VtuhqhpJ0SKulbFuOWgAfI6QbPFrgUYQQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@angular-devkit/core": "20.3.12", "jsonc-parser": "3.3.1", @@ -10839,6 +10810,7 @@ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -10852,6 +10824,7 @@ "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -10865,6 +10838,7 @@ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6" }, @@ -10877,7 +10851,8 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@schematics/angular/node_modules/is-interactive": { "version": "2.0.0", @@ -10885,6 +10860,7 @@ "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -10898,6 +10874,7 @@ "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -10911,6 +10888,7 @@ "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" @@ -10928,6 +10906,7 @@ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -10941,6 +10920,7 @@ "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", @@ -10965,6 +10945,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -10978,6 +10959,7 @@ "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", "dev": true, "license": "BSD-3-Clause", + "peer": true, "engines": { "node": ">= 12" } @@ -10988,6 +10970,7 @@ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", @@ -11006,6 +10989,7 @@ "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -11446,7 +11430,6 @@ "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -11568,7 +11551,6 @@ "integrity": "sha512-oZFKlC8l5YtzGQNT4zC2PiSSKzQVZ8bAwwd+EYdPLtyk0nSEq6O16SkK+rkkT2eflDAbormJgEF3QnH3oDrTSw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~5.26.4" } @@ -11987,7 +11969,6 @@ "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "7.18.0", "@typescript-eslint/types": "7.18.0", @@ -12225,7 +12206,6 @@ "integrity": "sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -12309,7 +12289,6 @@ "integrity": "sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.48.1", @@ -12722,7 +12701,6 @@ "integrity": "sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -12756,7 +12734,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -12865,7 +12842,6 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -13332,7 +13308,6 @@ "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", @@ -13730,7 +13705,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -14006,7 +13980,6 @@ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@chevrotain/cst-dts-gen": "11.0.3", "@chevrotain/gast": "11.0.3", @@ -14034,7 +14007,6 @@ "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "readdirp": "^4.0.1" }, @@ -15355,7 +15327,6 @@ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz", "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10" } @@ -15765,7 +15736,6 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", - "peer": true, "engines": { "node": ">=12" } @@ -15919,7 +15889,6 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -16506,7 +16475,6 @@ "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "iconv-lite": "^0.6.2" } @@ -16951,7 +16919,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -18284,7 +18251,6 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -20505,8 +20471,7 @@ "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.12.1.tgz", "integrity": "sha512-P/UbRZ0LKwXe7wEpwDheuhunPwITn4oPALhrJEQJo6756EwNGnsK/TSQrWojBB4cQDQ+VaxWYws9tFNDuiMh2Q==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/jasmine-spec-reporter": { "version": "5.0.2", @@ -20653,7 +20618,6 @@ "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", "dev": true, "license": "MIT", - "peer": true, "bin": { "jiti": "lib/jiti-cli.mjs" } @@ -20796,7 +20760,6 @@ "integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@colors/colors": "1.5.0", "body-parser": "^1.19.0", @@ -21510,7 +21473,6 @@ "integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "copy-anything": "^2.0.1", "parse-node-version": "^1.0.1", @@ -22963,7 +22925,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", "license": "BlueOak-1.0.0", - "peer": true, "dependencies": { "@isaacs/brace-expansion": "^5.0.0" }, @@ -23200,7 +23161,6 @@ "integrity": "sha512-dFuwFsDJMBSd1YtmLLcX5bNNUCQUlRqgf34aXA+79PmkOP+0eF8GP2949wq3+jMjmFTNm80Oo8IUYiSLwklKCQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rollup/plugin-json": "^6.1.0", "@rollup/wasm-node": "^4.24.0", @@ -23600,7 +23560,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "@napi-rs/wasm-runtime": "0.2.4", "@yarnpkg/lockfile": "^1.1.0", @@ -24652,7 +24611,6 @@ "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-5.4.449.tgz", "integrity": "sha512-CegnUaT0QwAyQMS+7o2POr4wWUNNe8VaKKlcuoRHeYo98cVnqPpwOXNSx6Trl6szH02JrRcsPgletV6GmF3LtQ==", "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=20.16.0 || >=22.3.0" }, @@ -24945,7 +24903,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", @@ -25608,7 +25565,6 @@ "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -25673,7 +25629,6 @@ "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -26921,7 +26876,6 @@ "integrity": "sha512-+VUy01yfDqNmIVMd/LLKl2TTtY0ovZN0rTonh+FhKr65mFwIYgU9WzgIZKS7U9/SPCQvWTsTGx9jyt+qRm/XFw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@bufbuild/protobuf": "^2.5.0", "buffer-builder": "^0.2.0", @@ -27379,7 +27333,8 @@ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/schema-utils": { "version": "4.3.3", @@ -28392,6 +28347,7 @@ "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -28732,7 +28688,6 @@ "integrity": "sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@csstools/css-parser-algorithms": "^2.3.1", "@csstools/css-tokenizer": "^2.2.0", @@ -29849,8 +29804,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "peer": true + "license": "0BSD" }, "node_modules/tsscmp": { "version": "1.0.6", @@ -30032,7 +29986,6 @@ "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -30355,6 +30308,7 @@ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -30436,7 +30390,8 @@ "optional": true, "os": [ "android" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-android-arm64": { "version": "4.53.3", @@ -30450,7 +30405,8 @@ "optional": true, "os": [ "android" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-darwin-arm64": { "version": "4.53.3", @@ -30464,7 +30420,8 @@ "optional": true, "os": [ "darwin" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-darwin-x64": { "version": "4.53.3", @@ -30478,7 +30435,8 @@ "optional": true, "os": [ "darwin" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-freebsd-arm64": { "version": "4.53.3", @@ -30492,7 +30450,8 @@ "optional": true, "os": [ "freebsd" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-freebsd-x64": { "version": "4.53.3", @@ -30506,7 +30465,8 @@ "optional": true, "os": [ "freebsd" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-arm-gnueabihf": { "version": "4.53.3", @@ -30520,7 +30480,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-arm-musleabihf": { "version": "4.53.3", @@ -30534,7 +30495,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-arm64-gnu": { "version": "4.53.3", @@ -30548,7 +30510,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-arm64-musl": { "version": "4.53.3", @@ -30562,7 +30525,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-riscv64-gnu": { "version": "4.53.3", @@ -30576,7 +30540,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-s390x-gnu": { "version": "4.53.3", @@ -30590,7 +30555,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-x64-gnu": { "version": "4.53.3", @@ -30604,7 +30570,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-linux-x64-musl": { "version": "4.53.3", @@ -30618,7 +30585,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-win32-arm64-msvc": { "version": "4.53.3", @@ -30632,7 +30600,8 @@ "optional": true, "os": [ "win32" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-win32-ia32-msvc": { "version": "4.53.3", @@ -30646,7 +30615,8 @@ "optional": true, "os": [ "win32" - ] + ], + "peer": true }, "node_modules/vite/node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.53.3", @@ -30660,7 +30630,8 @@ "optional": true, "os": [ "win32" - ] + ], + "peer": true }, "node_modules/vite/node_modules/postcss": { "version": "8.5.6", @@ -30682,6 +30653,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -30697,6 +30669,7 @@ "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -30848,7 +30821,6 @@ "integrity": "sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", @@ -31014,7 +30986,6 @@ "integrity": "sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/bonjour": "^3.5.13", "@types/connect-history-api-fallback": "^1.5.4", @@ -31555,7 +31526,6 @@ "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 664b29087..f99d6a5f8 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "ci:build": "nx build", "ci:build:many": "nx run-many --target=build", "ci:playwright:install": "playwright install chromium", + "ci:playwright:install:all": "playwright install chromium chrome firefox webkit msedge", "ci:e2e": "nx run $E2E_TARGET-e2e:e2e", "ci:audit": "adf-cli audit -d docs/audit", "ci:licenses": "adf-cli licenses -d docs/licences", diff --git a/projects/aca-playwright-shared/src/base-config/playwright.config.ts b/projects/aca-playwright-shared/src/base-config/playwright.config.ts index fb47d09d6..a623d64c6 100644 --- a/projects/aca-playwright-shared/src/base-config/playwright.config.ts +++ b/projects/aca-playwright-shared/src/base-config/playwright.config.ts @@ -22,13 +22,121 @@ * from Hyland Software. If not, see . */ -import { PlaywrightTestConfig, devices } from '@playwright/test'; +import { PlaywrightTestConfig, devices, chromium } from '@playwright/test'; import { timeouts } from '../utils'; import { getReporter } from './report-portal.config'; +type LaunchOptions = Parameters[0]; + require('@alfresco/adf-cli/tooling').dotenvConfig(); const { env } = process; +interface BrowserConfig { + device: any; + launchOptions: LaunchOptions; + name: string; +} + +function getBrowsersToUse(): string[] { + const browserEnv = (env.PLAYWRIGHT_BROWSER || 'chromium').toLowerCase(); + const allBrowsers = ['chrome', 'firefox', 'webkit', 'msedge']; + + if (browserEnv === 'all') { + return allBrowsers; + } else if (allBrowsers.includes(browserEnv) || browserEnv === 'chromium') { + return [browserEnv]; + } else { + return ['chromium']; + } +} + +function getBrowserConfig(browser: string): BrowserConfig { + const launchOptions: LaunchOptions = { + devtools: false, + slowMo: 300 + }; + + const chromiumArgs = ['--no-sandbox', '--disable-site-isolation-trials']; + + switch (browser) { + case 'firefox': + return { + device: devices['Desktop Firefox'], + launchOptions, + name: 'firefox' + }; + case 'webkit': + return { + device: devices['Desktop Safari'], + launchOptions, + name: 'webkit' + }; + case 'msedge': + launchOptions.args = chromiumArgs; + return { + device: { ...devices['Desktop Edge'], channel: 'msedge' }, + launchOptions, + name: 'msedge' + }; + case 'chrome': + launchOptions.args = chromiumArgs; + return { + device: { ...devices['Desktop Chrome'], channel: 'chrome' }, + launchOptions, + name: 'chrome' + }; + case 'chromium': + default: + launchOptions.args = chromiumArgs; + return { + device: devices['Desktop Chrome'], + launchOptions, + name: 'chromium' + }; + } +} + +export function createSuiteProjects( + suiteName: string, + testDir: string, + useConfig: Record = {}, + projectConfig: Record = {} +) { + const browsersToUse = getBrowsersToUse(); + const browserEnv = (env.PLAYWRIGHT_BROWSER || 'chrome').toLowerCase(); + + return browsersToUse.map((browser) => { + const { device, launchOptions } = getBrowserConfig(browser); + + return { + name: browserEnv === 'all' ? `${suiteName} - ${browser}` : suiteName, + testDir, + use: { + ...device, + launchOptions, + ...useConfig + }, + ...projectConfig + }; + }); +} + +export function getBrowserProjects() { + const browsersToUse = getBrowsersToUse(); + + return browsersToUse.map((browser) => { + const { device, launchOptions, name } = getBrowserConfig(browser); + + return { + name, + use: { + ...device, + launchOptions + } + }; + }); +} + export const getGlobalConfig: PlaywrightTestConfig = { timeout: timeouts.globalTest, globalTimeout: timeouts.globalSpec, @@ -62,21 +170,9 @@ export const getGlobalConfig: PlaywrightTestConfig = { /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'retain-on-failure', video: 'retain-on-failure', - screenshot: 'only-on-failure', - launchOptions: { - devtools: false, - args: ['--no-sandbox', '--disable-site-isolation-trials'], - slowMo: 300 - } + screenshot: 'only-on-failure' }, /* Configure projects for major browsers */ - projects: [ - { - name: 'chromium', - use: { - ...devices['Desktop Chrome'] - } - } - ] + projects: getBrowserProjects() }; diff --git a/projects/aca-playwright-shared/src/base-config/report-portal.config.ts b/projects/aca-playwright-shared/src/base-config/report-portal.config.ts index 872f1a7a4..3b037f3c7 100644 --- a/projects/aca-playwright-shared/src/base-config/report-portal.config.ts +++ b/projects/aca-playwright-shared/src/base-config/report-portal.config.ts @@ -28,14 +28,16 @@ import { timeouts } from '../utils'; const { env } = process; export const getReportPortalConfig = () => { + const browser = (env.PLAYWRIGHT_BROWSER || 'chrome').toLowerCase(); const attributes = [ { key: 'Job', value: `${env.GITHUB_JOB}` }, { key: 'Build_type', value: `${env.GITHUB_EVENT_NAME}` }, { key: 'Repository', value: `${env.GITHUB_REPOSITORY}` }, - { key: 'Branch', value: `${env.GITHUB_HEAD_REF || env.GITHUB_REF}` } + { key: 'Branch', value: `${env.GITHUB_HEAD_REF || env.GITHUB_REF}` }, + { key: 'Browser', value: browser } ]; - const launch = `GitHub Actions - ACA`; + const launch = `GitHub Actions - ACA - ${browser}`; return { endpoint: env.REPORT_PORTAL_URL, @@ -43,13 +45,19 @@ export const getReportPortalConfig = () => { project: 'alfresco-content-app', launch, includeTestSteps: true, + skipPassed: true, restClientConfig: { timeout: timeouts.extendedTest }, attributes, - description: `[Run on GitHub Actions ${env.GITHUB_RUN_ID}](${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID})` + description: `[Run ${env.GITHUB_RUN_ID}](${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}) - ${browser} - Failures only` }; }; -export const getReporter = (): ReporterDescription[] => - env.CI ? [['@reportportal/agent-js-playwright', getReportPortalConfig()], ['github']] : [['html']]; +export const getReporter = (): ReporterDescription[] => { + if (!env.CI) { + return [['html']]; + } + + return [['@reportportal/agent-js-playwright', getReportPortalConfig()], ['github']]; +}; diff --git a/projects/aca-playwright-shared/src/utils/exclude-tests.ts b/projects/aca-playwright-shared/src/utils/exclude-tests.ts index e35cb4af2..45bd8832c 100644 --- a/projects/aca-playwright-shared/src/utils/exclude-tests.ts +++ b/projects/aca-playwright-shared/src/utils/exclude-tests.ts @@ -22,15 +22,39 @@ * from Hyland Software. If not, see . */ +const getCurrentBrowser = (): string => (process.env.PLAYWRIGHT_BROWSER || 'chrome').toLowerCase(); + export const getExcludedTestsRegExpArray = (excludedJson: any, projectName: string) => { const prefix = `[ 🎭 Playwright Excludes - ${projectName} ]`; - const objectKeys = Object.keys(excludedJson); + const currentBrowser = getCurrentBrowser(); + const browserKeys = ['all', 'firefox', 'chromium', 'webkit', 'msedge']; + const relevantKeys: string[] = []; + const testIdsToExclude: string[] = []; - if (!objectKeys.length) { - console.info(`${prefix} ✅ No excluded tests 🎉 `); - } else { - console.warn(`${prefix} ❌ Tests excluded because of 🐛 : ${objectKeys}`); + // Always include 'all' if it exists + if (excludedJson.all && typeof excludedJson.all === 'object') { + const allTestIds = Object.keys(excludedJson.all); + testIdsToExclude.push(...allTestIds); + relevantKeys.push('all'); } - return objectKeys.map((key) => new RegExp(key)); + // Include current browser-specific exclusions + const browserKey = browserKeys.find((key) => key.toLowerCase() === currentBrowser); + if (browserKey && excludedJson[browserKey] && typeof excludedJson[browserKey] === 'object') { + const browserTestIds = Object.keys(excludedJson[browserKey]); + testIdsToExclude.push(...browserTestIds); + if (!relevantKeys.includes(browserKey)) { + relevantKeys.push(browserKey); + } + } + + if (testIdsToExclude.length > 0) { + console.warn( + `${prefix} ❌ Tests excluded for browser '${currentBrowser}' because of 🐛 : ${testIdsToExclude.join(', ')} (from keys: ${relevantKeys.join(', ')})` + ); + } else { + console.info(`${prefix} ✅ No excluded tests for browser '${currentBrowser}' 🎉`); + } + + return testIdsToExclude.map((key) => new RegExp(key)); };