Wrote end-to-end cypress tests
This commit is contained in:
21
client/cypress/integration/authentication.spec.js
Normal file
21
client/cypress/integration/authentication.spec.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { testid } from '../support/utils';
|
||||
|
||||
describe('Authentication', () => {
|
||||
beforeEach(() => {
|
||||
cy.resetDatabase();
|
||||
cy.visit('/');
|
||||
});
|
||||
|
||||
it('creates guest account if user has no auth token', () => {
|
||||
cy.window()
|
||||
.its('localStorage.authToken')
|
||||
.should('be.undefined');
|
||||
|
||||
cy.window()
|
||||
.its('localStorage.authToken')
|
||||
.should('be.a', 'string')
|
||||
.and('not.be.empty');
|
||||
|
||||
cy.get(testid`list-issue`).should('have.length', 7);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user