show sets on dashboard
This commit is contained in:
parent
2072166bdd
commit
321c1b7bb0
4 changed files with 221 additions and 21 deletions
|
|
@ -38,6 +38,13 @@ function visitDashboardAndLogout(): void {
|
|||
}
|
||||
|
||||
describe('session authentication', () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', '**/api/sets', {
|
||||
statusCode: 200,
|
||||
body: { sets: [] },
|
||||
})
|
||||
})
|
||||
|
||||
it('restores an authenticated session on a protected route', () => {
|
||||
cy.intercept('GET', '**/api/me', {
|
||||
statusCode: 200,
|
||||
|
|
@ -48,7 +55,7 @@ describe('session authentication', () => {
|
|||
cy.wait('@me')
|
||||
|
||||
cy.location('pathname').should('equal', '/dashboard')
|
||||
cy.get('h1').should('have.text', 'Your next step starts here.')
|
||||
cy.get('h1').should('have.text', 'Available sets')
|
||||
})
|
||||
|
||||
it('redirects an unauthenticated protected route to login', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue