Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress tests fork #138

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/test-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: E2E on Chrome

on:
push:
branches: [ main ]


jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cypress run
uses: cypress-io/github-action@v3
with:
project: ./packages/nextjs
browser: chrome
build: yarn build
start: yarn start
wait-on: "http://localhost:3000"
env:
NEXT_PUBLIC_HEIMDALL_URL: "${{ secrets.NEXT_PUBLIC_HEIMDALL_URL }}"
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"postinstall": "husky install",
"precommit": "lint-staged",
"vercel": "yarn workspace @se-2/nextjs vercel",
"vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo"
"vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo",
"cypress:open": "yarn workspace @se-2/nextjs cypress:open",
"cypress:run": "yarn workspace @se-2/nextjs cypress:run"
},
"packageManager": "[email protected]",
"devDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions packages/nextjs/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "cypress";

export default defineConfig({
e2e: {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
Loading
Loading