test today's dashboard work
This commit is contained in:
parent
483ca6fc1d
commit
1c83eb1b84
5 changed files with 184 additions and 3 deletions
|
|
@ -47,6 +47,12 @@ describe('session authentication', () => {
|
|||
statusCode: 200,
|
||||
body: { schedules: [] },
|
||||
})
|
||||
cy.intercept('GET', '**/api/assignments?date=*', (request) => {
|
||||
request.reply({
|
||||
statusCode: 200,
|
||||
body: { date: request.query.date, assignments: [] },
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('restores an authenticated session on a protected route', () => {
|
||||
|
|
@ -59,7 +65,7 @@ describe('session authentication', () => {
|
|||
cy.wait('@me')
|
||||
|
||||
cy.location('pathname').should('equal', '/dashboard')
|
||||
cy.get('h1').should('have.text', 'Available sets')
|
||||
cy.get('#sets-heading').should('have.text', 'Available sets')
|
||||
})
|
||||
|
||||
it('redirects an unauthenticated protected route to login', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue