-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds stuff to run cypress tests (#53)
* Removes example tests. * Adds support for running cypress through npm. * Setup Cypress to not take screenshots and videos on test failure. * Refactor tests to take in testing credentials using dotenv. * Update Circleci config to run Cypress tests.
- Loading branch information
1 parent
4fbad9b
commit 042387d
Showing
25 changed files
with
21 additions
and
2,162 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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
version: 2.1 | ||
orbs: | ||
node: circleci/[email protected] | ||
cypress: cypress-io/[email protected] | ||
jobs: | ||
lint: | ||
docker: | ||
- image: circleci/node:12.13.0 | ||
- image: circleci/node:12.14.0 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
|
@@ -17,7 +18,7 @@ jobs: | |
- run: npm run lint | ||
test: | ||
docker: | ||
- image: circleci/node:12.13.0 | ||
- image: circleci/node:12.14.0 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
|
@@ -32,4 +33,8 @@ workflows: | |
lint_and_test: | ||
jobs: | ||
- lint | ||
- cypress/run: | ||
executor: cypress/base-12-14-0 | ||
start: npm run start | ||
wait-on: 'http://localhost:3000' | ||
- test |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
{} | ||
{ | ||
"video": false | ||
} |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
describe('Inductee Sign In', function() { | ||
it('Logs in and views points.', function() { | ||
cy.visit('http://localhost:3000', { | ||
// Rememver to clear session storage before every run to clear firebase auth's cache! | ||
onBeforeLoad: win => { | ||
win.sessionStorage.clear(); | ||
}, | ||
|
@@ -13,10 +14,10 @@ describe('Inductee Sign In', function() { | |
|
||
// Get an input, type into it and verify that the value has been updated | ||
cy.get('#email') | ||
.type('[email protected]') | ||
.should('have.value', '[email protected]'); | ||
.type(Cypress.env('EMAIL')) | ||
.should('have.value', Cypress.env('EMAIL')); | ||
|
||
cy.get('#password').type('hkn-password'); | ||
cy.get('#password').type(Cypress.env('PASSWORD')); | ||
|
||
cy.contains('Sign in').click(); | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.