diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml new file mode 100644 index 0000000000..0fd5ab073f --- /dev/null +++ b/.github/workflows/cypress.yml @@ -0,0 +1,50 @@ +name: Cypress Tests +on: [push] +jobs: + cypress-run: + runs-on: ubuntu-latest + # Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization + # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs + # Also see warning here https://github.com/cypress-io/github-action#parallel + strategy: + fail-fast: false # https://github.com/cypress-io/github-action/issues/48 + # matrix: + # containers: [1, 2] # Uses 2 parallel instances + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Set up Ruby for Jekyll + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2.3 + + - name: Install dependencies with Yarn + run: | + yarn install + yarn after-install + + - name: Cypress run + # Uses the official Cypress GitHub action https://github.com/cypress-io/github-action + uses: cypress-io/github-action@v6 + with: + # Starts web server for E2E tests - replace with your own server invocation + # https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server + start: yarn start + wait-on: 'http://localhost:4000/design-system/' # Waits for above + # When true, records to Cypress Cloud. + # https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record + record: false + browser: firefox + parallel: false # When true, runs test in parallel using settings above + env: + # For recording and parallelization to work you must set your CYPRESS_RECORD_KEY + # in GitHub repo → Settings → Secrets → Actions + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + # Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sauce.yml b/.github/workflows/sauce.yml deleted file mode 100644 index 0be7234751..0000000000 --- a/.github/workflows/sauce.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Sauce CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - browser-tests: - runs-on: ubuntu-latest - - steps: - - name: Check out the repo - uses: actions/checkout@v4 - - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Set up Ruby for Jekyll - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.2.3 - - - name: Install dependencies with Yarn - run: | - yarn install - yarn after-install - - - name: Start local Design System website server - run: | - yarn start & - sleep 5 - - - name: Set up Sauce Connect - uses: saucelabs/sauce-connect-action@v2 - with: - # These credentials are from @contolini's CFPB Sauce Labs account - # They're defined on the repo's settings page: - # https://github.com/cfpb/design-system/settings/secrets - username: ${{ secrets.SAUCE_USERNAME }} - accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} - configFile: ${{ github.workspace }}/.sauce/config.yml - - - name: Run e2e browser tests - # Don't run these tests on forks. It would be nice to instead check - # to see if the Sauce Labs environment variables are defined, but that - # doesn't seem currently possible: - # https://github.com/actions/runner/issues/520 - if: ${{ github.repository_owner == 'cfpb' }} - env: - # These credentials are from @contolini's CFPB Sauce Labs account - # They're defined on the repo's settings page: - # https://github.com/cfpb/design-system/settings/secrets - SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} - SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} - run: yarn test:browser:cloud diff --git a/.sauce/config.yml b/.sauce/config.yml deleted file mode 100644 index 88be4528d1..0000000000 --- a/.sauce/config.yml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: v1 -kind: cypress -defaults: {} -showConsoleLog: false -npm: - registries: - - url: https://registry.npmjs.org - packages: - '@cfpb/browserslist-config': '0.0.2' -sauce: - region: us-west-1 - concurrency: 15 - sauceignore: .sauceignore -cypress: - configFile: cypress.config.js - version: 13.7.3 - record: false - key: '' - reporters: [] -suites: - - name: cypress - Windows 10 - chrome - browser: 'chrome' - browserVersion: 'latest' - platformName: 'Windows 10' - config: - testingType: e2e - specPattern: - - 'test/cypress/e2e/**/*.cy.js' - # Increase the VM's resolution for Decap CMS tests that require a wider viewport. - screenResolution: '1920x1200' - - name: cypress - Windows 11 - edge - browser: 'microsoftedge' - browserVersion: '119' - platformName: 'Windows 11' - config: - testingType: e2e - specPattern: - - 'test/cypress/e2e/**/*.cy.js' - screenResolution: '1920x1200' - exclude: - # Decap CMS is only tested with Chrome - - 'test/cypress/e2e/docs/decap-cms.cy.js' - - name: cypress - Windows 10 - firefox - browser: 'firefox' - browserVersion: '123' - platformName: 'Windows 10' - config: - testingType: e2e - specPattern: - - 'test/cypress/e2e/**/*.cy.js' - screenResolution: '1920x1200' - exclude: - # Decap CMS is only tested with Chrome - - 'test/cypress/e2e/docs/decap-cms.cy.js' -rootDir: . diff --git a/.sauceignore b/.sauceignore deleted file mode 100644 index 3432053978..0000000000 --- a/.sauceignore +++ /dev/null @@ -1,19 +0,0 @@ -# This file instructs saucectl to not package any files mentioned here. -/examples/ -/artifacts/ -cypress/videos/ -cypress/results/ -cypress/screenshots/ -# Remove this to have node_modules uploaded with code -node_modules/ -.git/ -.github/ -.DS_Store -.hg/ -.vscode/ -.idea/ -.gitignore -.hgignore -.gitlab-ci.yml -.npmrc -*.gif diff --git a/cypress.config.js b/cypress.config.js index f9d7d38abd..175c7c5356 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,6 +1,7 @@ import { defineConfig } from 'cypress'; export default defineConfig({ + projectId: '2hroh3', e2e: { baseUrl: 'http://127.0.0.1:4000/design-system/', defaultCommandTimeout: 40000, diff --git a/npm-packages-offline-cache/@octokit-types-13.5.1.tgz b/npm-packages-offline-cache/@octokit-types-13.5.1.tgz deleted file mode 100644 index b9fb1fec42..0000000000 Binary files a/npm-packages-offline-cache/@octokit-types-13.5.1.tgz and /dev/null differ diff --git a/npm-packages-offline-cache/@octokit-types-13.6.0.tgz b/npm-packages-offline-cache/@octokit-types-13.6.0.tgz new file mode 100644 index 0000000000..c07bd996eb Binary files /dev/null and b/npm-packages-offline-cache/@octokit-types-13.6.0.tgz differ diff --git a/npm-packages-offline-cache/@saucelabs-bin-wrapper-2.1.1.tgz b/npm-packages-offline-cache/@saucelabs-bin-wrapper-2.1.1.tgz deleted file mode 100644 index a3c0be0b1d..0000000000 Binary files a/npm-packages-offline-cache/@saucelabs-bin-wrapper-2.1.1.tgz and /dev/null differ diff --git a/npm-packages-offline-cache/adm-zip-0.5.16.tgz b/npm-packages-offline-cache/adm-zip-0.5.16.tgz deleted file mode 100644 index 871adc4a4e..0000000000 Binary files a/npm-packages-offline-cache/adm-zip-0.5.16.tgz and /dev/null differ diff --git a/npm-packages-offline-cache/axios-1.7.7.tgz b/npm-packages-offline-cache/axios-1.7.7.tgz deleted file mode 100644 index fea52e829a..0000000000 Binary files a/npm-packages-offline-cache/axios-1.7.7.tgz and /dev/null differ diff --git a/npm-packages-offline-cache/nwsapi-2.2.12.tgz b/npm-packages-offline-cache/nwsapi-2.2.12.tgz deleted file mode 100644 index f9a803ba51..0000000000 Binary files a/npm-packages-offline-cache/nwsapi-2.2.12.tgz and /dev/null differ diff --git a/npm-packages-offline-cache/nwsapi-2.2.13.tgz b/npm-packages-offline-cache/nwsapi-2.2.13.tgz new file mode 100644 index 0000000000..7c77f30f90 Binary files /dev/null and b/npm-packages-offline-cache/nwsapi-2.2.13.tgz differ diff --git a/npm-packages-offline-cache/saucectl-0.186.0.tgz b/npm-packages-offline-cache/saucectl-0.186.0.tgz deleted file mode 100644 index f7e15f9d40..0000000000 Binary files a/npm-packages-offline-cache/saucectl-0.186.0.tgz and /dev/null differ diff --git a/package.json b/package.json index a8fed98b0e..6dee18df68 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,7 @@ "serve-decap": "npx decap-server", "start": "yarn build && concurrently --kill-others \"yarn serve-decap\" \"yarn serve-jekyll\" \"yarn build watch\"", "jest": "yarn node --experimental-vm-modules $(yarn bin jest)", - "test:browser": "yarn cypress run", - "test:browser:cloud": ": ${SAUCE_USERNAME?\"You need to define SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables \"} && node_modules/saucectl/bin/saucectl run" + "test:browser": "yarn cypress run" }, "browserslist": "> 0.2% in @cfpb/browserslist-config stats", "dependencies": { @@ -80,7 +79,6 @@ "prop-types": "15.8.1", "release-it": "17.6.0", "sass": "1.79.3", - "saucectl": "0.186.0", "stylelint": "16.9.0", "stylelint-config-standard-scss": "13.1.0", "svgo": "3.3.0" diff --git a/yarn.lock b/yarn.lock index e58ee48675..576a2a7bd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1187,9 +1187,9 @@ "@octokit/plugin-rest-endpoint-methods" "13.2.2" "@octokit/types@^13.0.0", "@octokit/types@^13.1.0", "@octokit/types@^13.5.0": - version "13.5.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-13.5.1.tgz#5685a91f295195ddfff39723b093b0df9609ce6e" - integrity sha512-F41lGiWBKPIWPBgjSvaDXTTQptBujnozENAK3S//nj7xsFdYdirImKlBB/hTjr+Vii68SM+8jG3UJWRa6DMuDA== + version "13.6.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-13.6.0.tgz#db13d345cc3fe1a0f7c07171c724d90f2b55f410" + integrity sha512-CrooV/vKCXqwLa+osmHLIMUb87brpgUqlqkPGc6iE2wCkUvTrHiXFMhAKoDDaAAYJrtKtrFTgSQTg5nObBEaew== dependencies: "@octokit/openapi-types" "^22.2.0" @@ -1263,16 +1263,6 @@ redux-thunk "^2.4.2" reselect "^4.1.8" -"@saucelabs/bin-wrapper@^2.1.0": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@saucelabs/bin-wrapper/-/bin-wrapper-2.1.1.tgz#bd38e71f8f9c36e6e3c4217ce94d01e7c38c7bf6" - integrity sha512-wzG3tx5wOmzFxdKqCUAq7aPR0zHk6PIiV+rGjTJMApyGyJtjAWSXPGzdfejio06A6sdBNkDeZXm/Fb+yR3h8Bg== - dependencies: - adm-zip "^0.5.15" - axios "^1.7.5" - https-proxy-agent "^7.0.5" - tar-stream "^3.1.7" - "@sentry/core@6.19.7": version "6.19.7" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.19.7.tgz#156aaa56dd7fad8c89c145be6ad7a4f7209f9785" @@ -1645,11 +1635,6 @@ acorn@^8.1.0, acorn@^8.11.0, acorn@^8.8.1, acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -adm-zip@^0.5.15: - version "0.5.16" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.16.tgz#0b5e4c779f07dedea5805cdccb1147071d94a909" - integrity sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ== - agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -2124,15 +2109,6 @@ axe-core@^4.9.1: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59" integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g== -axios@^1.7.5: - version "1.7.7" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" - integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - axobject-query@^3.2.1: version "3.2.4" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.4.tgz#6dfba930294ea14d7d2fc68b9d007211baedb94c" @@ -4632,7 +4608,7 @@ focus-group@^0.3.1: resolved "https://registry.yarnpkg.com/focus-group/-/focus-group-0.3.1.tgz#e0f32ed86b0dabdd6ffcebdf898ecb32e47fedce" integrity sha512-IA01dzk2cStQso/qnt2rWhXCFBZlBfjZmohB9mXUx9feEaJcORAK0FQGvwaApsNNGwzEnqrp/2qTR4lq8PXfnQ== -follow-redirects@^1.0.0, follow-redirects@^1.15.6: +follow-redirects@^1.0.0: version "1.15.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== @@ -7562,9 +7538,9 @@ nth-check@^2.0.1: boolbase "^1.0.0" nwsapi@^2.2.2: - version "2.2.12" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.12.tgz#fb6af5c0ec35b27b4581eb3bbad34ec9e5c696f8" - integrity sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w== + version "2.2.13" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.13.tgz#e56b4e98960e7a040e5474536587e599c4ff4655" + integrity sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ== object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" @@ -9153,13 +9129,6 @@ sass@1.79.3, sass@^1.69.5: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" -saucectl@0.186.0: - version "0.186.0" - resolved "https://registry.yarnpkg.com/saucectl/-/saucectl-0.186.0.tgz#29c5d25fbeb4f47919bd93e048d1884dde5fc0f2" - integrity sha512-jvZ/dsKj8Luk68BjAk2D0O/1cuKNy2m843AhsoE1OoMJTx4XPZLICLKLOAvpVKxSpAVovXu8LQAfckQ4I0zZYA== - dependencies: - "@saucelabs/bin-wrapper" "^2.1.0" - saxes@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" @@ -9938,7 +9907,7 @@ tar-fs@^3.0.6: bare-fs "^2.1.1" bare-path "^2.1.0" -tar-stream@^3.1.5, tar-stream@^3.1.7: +tar-stream@^3.1.5: version "3.1.7" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==