diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b6b4a6f05..ca3816df0e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 executors: pw-focal-development: docker: - - image: mcr.microsoft.com/playwright:v1.25.2-focal + - image: mcr.microsoft.com/playwright:v1.29.0-focal environment: NODE_ENV: development # Needed to ensure 'dist' folder created and devDependencies installed PERCY_POSTINSTALL_BROWSER: 'true' # Needed to store the percy browser in cache deps diff --git a/.github/workflows/e2e-couchdb.yml b/.github/workflows/e2e-couchdb.yml index ee610a51ee..6006478dd5 100644 --- a/.github/workflows/e2e-couchdb.yml +++ b/.github/workflows/e2e-couchdb.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '16' - - run: npx playwright@1.25.2 install + - run: npx playwright@1.29.0 install - run: npm install - run: sh src/plugins/persistence/couch/replace-localstorage-with-couchdb-indexhtml.sh - run: npm run test:e2e:couchdb diff --git a/.github/workflows/e2e-pr.yml b/.github/workflows/e2e-pr.yml index 317d0ef379..be20656663 100644 --- a/.github/workflows/e2e-pr.yml +++ b/.github/workflows/e2e-pr.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '16' - - run: npx playwright@1.25.2 install + - run: npx playwright@1.29.0 install - run: npx playwright install chrome-beta - run: npm install - run: npm run test:e2e:full diff --git a/e2e/README.md b/e2e/README.md index 11de7615da..9702bae04e 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -8,7 +8,7 @@ This document is designed to capture on the What, Why, and How's of writing and 1. [Getting Started](#getting-started) 2. [Types of Testing](#types-of-e2e-testing) -3. [Architecture](#architecture) +3. [Architecture](#test-architecture-and-ci) ## Getting Started @@ -400,3 +400,23 @@ A single e2e test in Open MCT is extended to run: - Tests won't start because 'Error: # is already used...' This error will appear when running the tests locally. Sometimes, the webserver is left in an orphaned state and needs to be cleaned up. To clear up the orphaned webserver, execute the following from your Terminal: ```lsof -n -i4TCP:8080 | awk '{print$2}' | tail -1 | xargs kill -9``` + +### Upgrading Playwright + +In order to upgrade from one version of Playwright to another, the version should be updated in several places in both `openmct` and `openmct-yamcs` repos. An easy way to identify these locations is to search for the current version in all files and find/replace. + +For reference, all of the locations where the version should be updated are listed below: + +#### **In `openmct`:** + +- `package.json` + - Both packages `@playwright/test` and `playwright-core` should be updated to the same target version. +- `.circleci/config.yml` +- `.github/workflows/e2e-couchdb.yml` +- `.github/workflows/e2e-pr.yml` + +#### **In `openmct-yamcs`:** + +- `package.json` + - `@playwright/test` should be updated to the target version. +- `.github/workflows/yamcs-quickstart-e2e.yml` diff --git a/package.json b/package.json index ab716726da..2977b18627 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@braintree/sanitize-url": "6.0.2", "@percy/cli": "1.16.0", "@percy/playwright": "1.0.4", - "@playwright/test": "1.25.2", + "@playwright/test": "1.29.0", "@types/jasmine": "4.3.1", "@types/lodash": "4.14.191", "babel-loader": "9.1.0", @@ -48,7 +48,7 @@ "moment-timezone": "0.5.40", "nyc": "15.1.0", "painterro": "1.2.78", - "playwright-core": "1.25.2", + "playwright-core": "1.29.0", "plotly.js-basic-dist": "2.14.0", "plotly.js-gl2d-dist": "2.14.0", "printj": "1.3.1",