Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cypress E2E tests * Should be ready now * fix readme link * change to data attributes
- Loading branch information
1 parent
01878bf
commit d2be249
Showing
16 changed files
with
154 additions
and
19 deletions.
There are no files selected for viewing
File renamed without changes.
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,41 @@ | ||
name: Cypress Tests | ||
on: | ||
workflow_run: | ||
workflows: [Unit Tests, Linter] | ||
types: | ||
- completed | ||
branches: | ||
- 'main' | ||
jobs: | ||
Chrome: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run on Staging | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
working-directory: client | ||
browser: chrome | ||
headless: true | ||
env: | ||
NPM_CONFIG_PRODUCTION: false | ||
CYPRESS_TEST_USER_EMAIL: ${{ secrets.CYPRESS_TEST_USER_EMAIL }} | ||
CYPRESS_TEST_USER_PASS: ${{ secrets.CYPRESS_TEST_USER_PASS }} | ||
CYPRESS_baseUrl: "https://tn-spa-bootstrapper-staging.herokuapp.com/" | ||
Firefox: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run on Staging | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
working-directory: client | ||
browser: firefox | ||
headless: true | ||
env: | ||
NPM_CONFIG_PRODUCTION: false | ||
CYPRESS_TEST_USER_EMAIL: ${{ secrets.CYPRESS_TEST_USER_EMAIL }} | ||
CYPRESS_TEST_USER_PASS: ${{ secrets.CYPRESS_TEST_USER_PASS }} | ||
CYPRESS_baseUrl: "https://tn-spa-bootstrapper-staging.herokuapp.com/" |
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
19 changes: 19 additions & 0 deletions
19
{{cookiecutter.project_slug}}/.github/pull_request_template.md
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,19 @@ | ||
## What this does | ||
|
||
Add a description of what feature/page this PR intends to add or change. Don't forget to start the PR title with the Jira ticket number. | ||
|
||
- [Jira ticket](Paste Jira link here) | ||
|
||
## Checklist | ||
- [ ] Todo 1 | ||
- [ ] Todo 2 | ||
- [ ] Todo 3 | ||
|
||
|
||
## Deploy Notes | ||
|
||
Add any notes for changes needed when deployed. I.e. API keys, environment variables, database changes, etc. | ||
|
||
## How to test | ||
|
||
Add user steps to achieve desired functionality for this feature. |
41 changes: 41 additions & 0 deletions
41
{{cookiecutter.project_slug}}/.github/workflows/cypress.yml
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,41 @@ | ||
name: Cypress Tests | ||
on: | ||
workflow_run: | ||
workflows: [Unit Tests, Linter] | ||
types: | ||
- completed | ||
branches: | ||
- 'main' | ||
jobs: | ||
Chrome: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run on Staging | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
working-directory: client | ||
browser: chrome | ||
headless: true | ||
env: | ||
NPM_CONFIG_PRODUCTION: false | ||
CYPRESS_TEST_USER_EMAIL: {{ "${{ secrets.CYPRESS_TEST_USER_EMAIL }}" }} | ||
CYPRESS_TEST_USER_PASS: {{ "${{ secrets.CYPRESS_TEST_USER_PASS }}" }} | ||
CYPRESS_baseUrl: "https://{{ cookiecutter.project_slug }}-staging.herokuapp.com/" | ||
Firefox: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run on Staging | ||
uses: cypress-io/github-action@v2 | ||
with: | ||
working-directory: client | ||
browser: firefox | ||
headless: true | ||
env: | ||
NPM_CONFIG_PRODUCTION: false | ||
CYPRESS_TEST_USER_EMAIL: {{ "${{ secrets.CYPRESS_TEST_USER_EMAIL }}" }} | ||
CYPRESS_TEST_USER_PASS: {{ "${{ secrets.CYPRESS_TEST_USER_PASS }}" }} | ||
CYPRESS_baseUrl: "https://{{ cookiecutter.project_slug }}-staging.herokuapp.com/" |
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
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
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
8 changes: 0 additions & 8 deletions
8
{{cookiecutter.project_slug}}/clients/vue3/tests/e2e/specs/test.js
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
{{cookiecutter.project_slug}}/clients/vue3/tests/e2e/specs/test_login.js
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,14 @@ | ||
describe('Tests login workflow', () => { | ||
it('Home page has link to login', () => { | ||
cy.visit('/') | ||
cy.get('[data-cy=login]').click() | ||
cy.url().should('include', '/login') | ||
}) | ||
|
||
it('Filling in email and passwords goes to', () => { | ||
cy.get('[data-cy=email]').type(Cypress.env('TEST_USER_EMAIL')) | ||
cy.get('[data-cy=password]').type(Cypress.env('TEST_USER_PASS')) | ||
cy.contains('[data-cy=submit]', 'Login').click() | ||
cy.url().should('include', '/dashboard') | ||
}) | ||
}) |
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
File renamed without changes.
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