test today's dashboard work

This commit is contained in:
Yisroel Baum 2026-08-15 21:54:42 +03:00
parent 483ca6fc1d
commit 1c83eb1b84
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
5 changed files with 184 additions and 3 deletions

View file

@ -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', () => {