Skip to content

Commit

Permalink
fix e2e cypress tests (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanjf committed Aug 12, 2022
1 parent 4f3ef56 commit 3b901f4
Show file tree
Hide file tree
Showing 17 changed files with 1,853 additions and 1,649 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
# name: end-to-end tests
# on:
# push:
# branches:
# - master
# jobs:
# cypress-run:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# # Install NPM dependencies, cache them correctly
# # and run all Cypress tests
# - name: Cypress run
# uses: cypress-io/github-action@v2
# with:
# build: npm run build
# start: npm run serve
# wait-on: http://localhost:8080
# wait-on-timeout: 300
# env:
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# # Recommended: pass the GitHub token lets this action correctly
# # determine the unique run id necessary to re-run the checks
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Cypress Tests

on: [push]

jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v4
with:
start: npm run serve
wait-on: 'http://localhost:8080'
config: baseUrl=http://localhost:8080
20 changes: 20 additions & 0 deletions .github/workflows/netlify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
push:
branches:
- master
tags:
- '*'
name: Publish on Netlify

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Publish
uses: netlify/actions/build@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ node_modules
docs/
/docs

#Cypress
/tests/e2e/screenshots/

# local env files
.env.local
.env.*.local
Expand Down
16 changes: 16 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
fixturesFolder: 'tests/e2e/fixtures',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./tests/e2e/plugins/index.js')(on, config)
},
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/e2e/support/index.js',
},
})
3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

Loading

0 comments on commit 3b901f4

Please sign in to comment.