Skip to content

Commit

Permalink
test(WebpackExample): bump cypress to 10.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Jul 10, 2022
1 parent 8996acb commit 5895d15
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 61 deletions.
68 changes: 10 additions & 58 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,74 +98,26 @@ jobs:
browser: chrome
start: npm start

test-webpack-example-chrome-electron:
test-webpack-example:
name: Webpack, Chrome, Electron
runs-on: ubuntu-20.04
container: cypress/browsers:node16.13.2-chrome97-ff96
defaults:
run:
working-directory: ./examples/Webpack

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install
run: |
npm install
- name: Build
run: |
npm run build
- name: Test Electron
uses: cypress-io/github-action@v2
with:
working-directory: ./examples/Webpack
browser: electron
start: npm start
config: defaultCommandTimeout=8000
- uses: actions/checkout@v3

- name: Test Chrome
uses: cypress-io/github-action@v2
- name: Test Webpack Example on Chrome
uses: cypress-io/github-action@v4
with:
working-directory: ./examples/Webpack
working-directory: ./examples/Vite
browser: chrome
start: npm start
config: defaultCommandTimeout=8000

test-webpack-example-firefox:
name: Webpack, Firefox
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./examples/Webpack

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
- name: Test Webpack Example on Firefox
uses: cypress-io/github-action@v4
with:
node-version: '16'

- name: Install
run: |
npm install
- name: Build
run: |
npm run build
- name: Test Firefox
run: |
# Allow writing test output in the Docker image
sudo chmod -R 777 cypress
# To debug locally, run `./cypress/run-docker-firefox.sh -d`
./cypress/run-docker-firefox.sh
working-directory: ./examples/Vite
browser: firefox
start: npm start

test-vite-example:
name: Vite Example
Expand Down
1 change: 0 additions & 1 deletion examples/Webpack/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
cypress/support
12 changes: 12 additions & 0 deletions examples/Webpack/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
defaultCommandTimeout: 8000,
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
})
1 change: 0 additions & 1 deletion examples/Webpack/cypress.json

This file was deleted.

25 changes: 25 additions & 0 deletions examples/Webpack/cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
20 changes: 20 additions & 0 deletions examples/Webpack/cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 1 addition & 1 deletion examples/Webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@babel/preset-env": "^7.13.5",
"babel-loader": "^8.2.3",
"copy-webpack-plugin": "^9.0.1",
"cypress": "^9.5.2",
"cypress": "^10.3.0",
"start-server-and-test": "^1.14.0",
"webpack": "^5.65.0",
"webpack-cli": "^4.8.0",
Expand Down

0 comments on commit 5895d15

Please sign in to comment.