Skip to content

Commit

Permalink
Add playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed May 3, 2023
1 parent 3d0b574 commit e905bdf
Show file tree
Hide file tree
Showing 276 changed files with 676 additions and 2,926 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
playwright-report/

# Front-End #
#############
Expand Down
45 changes: 45 additions & 0 deletions .sauce/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: v1alpha
kind: playwright
sauce:
region: us-west-1
concurrency: 3 # Controls how many suites are executed at the same time.
metadata:
tags:
- design-system-playwright
docker:
# Affects how test files are transferred to the docker container when using the docker mode.
fileTransfer: copy # Choose between mount|copy.
playwright:
version: package.json # See https://docs.saucelabs.com/dev/cli/saucectl/#supported-frameworks-and-browsers for a list of supported versions.
configFile: playwright.config.ts # See https://docs.saucelabs.com/dev/testrunner-toolkit/configuration/playwright#configuration-examples for a list of supported configuration files.
# Controls what files are available in the context of a test run (unless explicitly excluded by .sauceignore).
rootDir: ./
suites:
- name: 'Firefox Win'
platformName: 'Windows 11'
screenResolution: '1440x900'
testMatch: ['.*.js']
params:
browserName: 'firefox'
project: 'firefox' # Runs the project that's defined in `playwright.config.js`
- name: 'Chromium Mac'
platformName: 'macOS 12'
screenResolution: '1440x900'
testMatch: ['.*.js']
params:
browserName: 'chromium'
project: 'chromium'
- name: 'Webkit Win'
platformName: 'Windows 11'
screenResolution: '1440x900'
testMatch: ['.*.js']
params:
browserName: 'webkit'
project: 'webkit'
# Controls what artifacts to fetch when the suite on Sauce Cloud has finished.
# artifacts:
# download:
# when: always
# match:
# - console.log
# directory: ./artifacts/
15 changes: 15 additions & 0 deletions .sauceignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file instructs saucectl to not package any files mentioned here.
.git/
.github/
.DS_Store
.hg/
.vscode/
.idea/
.gitignore
.hgignore
.gitlab-ci.yml
.npmrc
*.gif
# Remove this to have node_modules uploaded with code
node_modules/

1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default {
moduleNameMapper: {
'\\.(svg)$': '<rootDir>/test/unit-test/mocks/fileMock.js',
},
modulePathIgnorePatterns: ['<rootDir>/test/browser'],
testEnvironmentOptions: {
url: 'http://localhost',
},
Expand Down
Binary file not shown.
Binary file removed npm-packages-offline-cache/@jest-schemas-28.1.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/@jest-types-28.1.3.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@tufjs-models-1.0.3.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-diff-5.0.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-ejs-3.1.2.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-inquirer-8.2.6.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-keyv-3.1.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-mocha-10.0.1.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-react-18.2.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-through-0.0.30.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-tmp-0.2.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@types-which-1.3.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-cli-7.26.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-config-7.26.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-logger-7.26.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-logger-8.6.6.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-repl-7.26.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-runner-7.26.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-types-7.26.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/@wdio-utils-7.26.0.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/adm-zip-0.5.10.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ansi-colors-4.1.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ansi-regex-2.1.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ansi-styles-2.2.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/archive-type-4.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/async-exit-hook-2.0.1.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/b4a-1.6.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/bl-1.2.3.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/bl-6.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/browser-stdout-1.3.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/buffer-alloc-1.2.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/buffer-fill-1.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/cac-3.0.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/camelcase-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/camelcase-keys-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/capital-case-1.0.4.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/chalk-1.1.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/chalk-5.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/change-case-4.1.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/chokidar-3.5.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/chromedriver-111.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/clone-response-1.0.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/clone-response-1.0.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/constant-case-3.0.4.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/cross-spawn-4.0.2.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/css-value-0.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/debug-4.3.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/decamelize-4.0.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/decompress-4.2.1.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/decompress-tar-4.1.1.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/devtools-7.26.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/diff-5.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/diff-5.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/diff-sequences-28.1.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/download-8.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/duplexer3-0.1.5.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/easy-table-1.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/edge-paths-2.2.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/expect-28.1.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/ext-list-2.2.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ext-name-5.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/fast-deep-equal-2.0.1.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/fast-fifo-1.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/file-type-11.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/file-type-3.9.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/file-type-4.4.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/file-type-5.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/file-type-6.2.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/filenamify-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/find-up-1.1.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/from2-2.3.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/gaze-1.1.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/get-stream-2.3.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/get-stream-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/get-stream-4.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/glob-7.1.7.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/glob-7.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/globule-1.3.4.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/got-11.8.6.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/got-8.3.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/has-ansi-2.0.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/hash.js-1.1.7.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/header-case-2.0.4.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/http2-wrapper-1.0.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/indent-string-3.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/into-stream-3.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ip-regex-4.3.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/is-binary-path-2.1.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/is-object-1.0.2.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/is-stream-1.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/is-url-1.2.4.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/is-utf8-0.2.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/is2-2.0.9.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/isurl-1.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-diff-28.1.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-get-type-28.0.2.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-util-28.1.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/json-buffer-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/json-buffer-3.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/keyv-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/keyv-4.5.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ky-0.30.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/load-json-file-1.1.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/lodash.isobject-3.0.2.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/lodash.zip-4.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/loglevel-1.8.1.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/lowercase-keys-1.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/lowercase-keys-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/lowercase-keys-2.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/lru-cache-4.1.5.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/make-dir-1.3.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/mimic-response-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/mimic-response-3.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/minimalistic-assert-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/minimatch-3.0.8.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/minimatch-5.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/minimatch-7.4.6.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/mocha-10.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/nanoid-3.3.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/normalize-url-2.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/normalize-url-6.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/p-cancelable-0.4.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/p-cancelable-2.1.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/p-event-2.3.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/p-is-promise-1.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/p-iteration-1.1.8.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/p-timeout-2.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/parse-json-2.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/parse-ms-2.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/path-case-3.0.4.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/path-exists-2.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/path-type-1.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/pinkie-2.0.4.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/pinkie-promise-2.0.1.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/prepend-http-2.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/pretty-format-28.1.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/pretty-ms-7.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/pseudomap-1.0.2.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/query-string-5.1.1.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/queue-tick-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/quick-lru-5.1.1.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/read-pkg-1.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/read-pkg-up-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/readdirp-3.6.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/resolve-alpn-1.2.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/responselike-1.0.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/responselike-2.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/resq-1.11.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/rgb2hex-0.2.5.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/saucectl-0.139.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/saucelabs-7.2.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/seek-bzip-1.0.6.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/sentence-case-3.0.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/snake-case-3.0.4.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/sort-keys-1.1.2.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/split2-4.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/stream-buffers-3.0.2.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/streamx-2.13.2.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/strip-ansi-3.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/strip-bom-2.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/strip-dirs-2.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/strip-outer-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/suffix-0.1.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/supports-color-2.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/tar-stream-1.6.2.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/tar-stream-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/tcp-port-used-1.0.2.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/timed-out-4.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/to-buffer-1.1.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/trim-repeated-1.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/tuf-js-1.1.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/tuf-js-1.1.5.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/tunnel-0.0.6.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ua-parser-js-1.0.35.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/upper-case-2.0.2.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/url-parse-lax-3.0.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/url-to-options-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/uuid-9.0.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/webdriver-7.26.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/webdriverio-7.26.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/workerpool-6.2.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/ws-8.5.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/yallist-2.1.2.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/yarn-install-1.0.0.tgz
Binary file not shown.
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"serve-netlify": "netlify-cms-proxy-server",
"start": "yarn compile-dev && concurrently --kill-others \"yarn serve-netlify\" \"yarn serve-jekyll\" \"yarn compile-dev --watch\"",
"jest": "yarn node --experimental-vm-modules $(yarn bin jest)",
"test:browser": "wdio run ./wdio.config.cjs",
"test:browser:cloud": ": ${SAUCE_USERNAME?\"You need to define SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables \"} && wdio run ./wdio.config.sauce.cjs"
"test:browser": "npx playwright test",
"test:browser:cloud": ": ${SAUCE_USERNAME?\"You need to define SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables \"} && saucectl run --region us-west-1"
},
"browserslist": "> 0.5%, last 2 versions, Firefox ESR, not dead, ie >= 11",
"dependencies": {
Expand All @@ -64,14 +64,9 @@
"@babel/preset-env": "7.21.5",
"@babel/preset-react": "7.18.6",
"@lhci/cli": "0.12.0",
"@wdio/cli": "7.26.0",
"@wdio/local-runner": "7.26.0",
"@wdio/mocha-framework": "7.26.0",
"@wdio/sauce-service": "7.26.0",
"@wdio/spec-reporter": "7.26.0",
"@playwright/test": "1.33.0",
"autoprefixer": "10.4.14",
"babel-loader": "9.1.2",
"chromedriver": "111.0.0",
"concurrently": "8.0.1",
"css-loader": "6.7.3",
"cssnano": "6.0.1",
Expand All @@ -98,13 +93,13 @@
"postcss-loader": "7.3.0",
"prettier": "2.8.8",
"prop-types": "15.8.1",
"saucectl": "0.139.0",
"stylelint": "15.4.0",
"stylelint-config-prettier": "9.0.5",
"stylelint-config-recommended-less": "1.0.4",
"svg-inline-loader": "0.8.2",
"svgo": "3.0.2",
"terser-webpack-plugin": "5.3.7",
"wdio-chromedriver-service": "8.1.1",
"webpack": "5.81.0",
"webpack-cli": "5.0.2"
},
Expand Down
90 changes: 90 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import { defineConfig, devices } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './test/browser',
/* Maximum time one test can run for. */
timeout: 30 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000,
},
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://localhost:4000/design-system/',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { channel: 'chrome' },
// },
],

/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// port: 3000,
// },
});
27 changes: 0 additions & 27 deletions test/browser/docs/interstitial.js

This file was deleted.

27 changes: 27 additions & 0 deletions test/browser/docs/interstitial.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { test, expect } from '@playwright/test';

test.describe('CMS interstitial page with editing instructions', () => {
test.describe('Editing a component page', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/design-system/components/banner-notification');
const editButton = await page.locator('#edit-page');
await expect(editButton).toBeVisible();
await editButton.click();
});

test("should show the interstitial if the user hasn't seen it before", async ({
page,
}) => {
await expect(page).toHaveTitle(
'Updating this website - CFPB Design System'
);
});

test.skip('should not show the interstitial if the user has already seen it', async ({
page,
}) => {
await expect(page.locator('button:text("Delete entry")')).toBeVisible();
await expect(page).toHaveTitle('Content Manager');
});
});
});
99 changes: 0 additions & 99 deletions test/browser/docs/netlify-cms.js

This file was deleted.

Loading

0 comments on commit e905bdf

Please sign in to comment.