-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add github actions to add automated tests
- Loading branch information
1 parent
2ab33e3
commit 4a7081b
Showing
13 changed files
with
822 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Run Cypress Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: | ||
[ | ||
"angular", | ||
"angular-standalone", | ||
# "react-next14-ts", | ||
# "react-next15-ts", | ||
# "react-vite-ts", | ||
# "react-webpack5-js", | ||
# "svelte-vite-ts", | ||
# "svelte-webpack-ts", | ||
# "vue3-vite-ts", | ||
# "vue3-webpack-ts", | ||
] | ||
|
||
name: Cypress Tests | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
# - name: Cypress Component Tests | ||
# uses: cypress-io/github-action@v6 | ||
# with: | ||
# component: true | ||
# working-directory: "${{ matrix.project }}" | ||
# smoke tests the sample app and makes sure everything works as expected | ||
- name: Cypress E2E Tests | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
start: npm start | ||
wait-on: 'http://localhost:4200' | ||
working-directory: "${{ matrix.project }}" | ||
browser: chrome | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
describe('Authentication', () => { | ||
it('Logs in', () => { | ||
cy.visit('http://localhost:4200') | ||
cy.get('[name="username"]').type('testuser') | ||
cy.get('[name="password"]').type('testpassword') | ||
cy.get('[type="submit"]').click() | ||
cy.get('h1').should('have.text', 'Welcome testuser') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts 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' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
describe('Authentication', () => { | ||
it('Logs in', () => { | ||
cy.visit('http://localhost:4200') | ||
cy.get('[name="username"]').type('testuser') | ||
cy.get('[name="password"]').type('testpassword') | ||
cy.get('[type="submit"]').click() | ||
cy.get('h1').should('have.text', 'Welcome testuser') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts 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' |
Oops, something went wrong.