From 39e48d11a593ed70b220aa30114bbbcc39a78f63 Mon Sep 17 00:00:00 2001 From: Simon Priet Date: Sun, 5 Sep 2021 14:21:07 +0200 Subject: [PATCH] fix(#3): :white_check_mark: Refactored a few configurations in cypress. Partially fix #3. --- cypress.json | 7 +++++- cypress/fixtures/userSet.json | 25 +++++++++++++++++++++ cypress/integration/trusk-test/test.spec.js | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 cypress/fixtures/userSet.json diff --git a/cypress.json b/cypress.json index 0967ef4..52667bb 100644 --- a/cypress.json +++ b/cypress.json @@ -1 +1,6 @@ -{} +{ + "baseUrl": "http://localhost:3000", + "env" : { + "logoutUrl": "/ok.html" + } +} diff --git a/cypress/fixtures/userSet.json b/cypress/fixtures/userSet.json new file mode 100644 index 0000000..ad778bc --- /dev/null +++ b/cypress/fixtures/userSet.json @@ -0,0 +1,25 @@ +[ + { + "valid-admin": { + "email": "adrian@trusk.com", + "password": "adrian@trusk.com" + } + }, + { + "invalid-admin": { + "email": "adrian@trusk.com", + "password": "adrian" + } + }, + { + "unexisting-user": { + "email": "adrian.pothuaud@trusk.com", + "password": "badpassword" + } + }, + { + "malformed-email": { + "email": "adrian-trusk" + } + } +] \ No newline at end of file diff --git a/cypress/integration/trusk-test/test.spec.js b/cypress/integration/trusk-test/test.spec.js index 97e438f..e3aaefc 100644 --- a/cypress/integration/trusk-test/test.spec.js +++ b/cypress/integration/trusk-test/test.spec.js @@ -4,7 +4,7 @@ describe('Should allow valid user and block the rest', () => { beforeEach(function() { // Changed theses should as required conditions to perform other tests - cy.visit('http://localhost:3000') + cy.visit('/') // title cy.title().should('eq', 'QA @ Trusk') // elements