mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
enhancement(login): add redirectBackTo parameter to login button
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
1207ce7690
commit
1199db4692
2 changed files with 21 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -51,7 +51,10 @@ describe('When logged-out ', () => {
|
|||
type: AuthProviderType.LOCAL
|
||||
}
|
||||
])
|
||||
cy.getByCypressId('sign-in-button').should('be.visible').parent().should('have.attr', 'href', '/login')
|
||||
cy.getByCypressId('sign-in-button')
|
||||
.should('be.visible')
|
||||
.parent()
|
||||
.should('have.attr', 'href', '/login?redirectBackTo=/history')
|
||||
})
|
||||
|
||||
it('sign-in button points to login route: ldap', () => {
|
||||
|
@ -62,7 +65,10 @@ describe('When logged-out ', () => {
|
|||
providerName: 'cy LDAP'
|
||||
}
|
||||
])
|
||||
cy.getByCypressId('sign-in-button').should('be.visible').parent().should('have.attr', 'href', '/login')
|
||||
cy.getByCypressId('sign-in-button')
|
||||
.should('be.visible')
|
||||
.parent()
|
||||
.should('have.attr', 'href', '/login?redirectBackTo=/history')
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -91,7 +97,10 @@ describe('When logged-out ', () => {
|
|||
type: AuthProviderType.GOOGLE
|
||||
}
|
||||
])
|
||||
cy.getByCypressId('sign-in-button').should('be.visible').parent().should('have.attr', 'href', '/login')
|
||||
cy.getByCypressId('sign-in-button')
|
||||
.should('be.visible')
|
||||
.parent()
|
||||
.should('have.attr', 'href', '/login?redirectBackTo=/history')
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -105,7 +114,10 @@ describe('When logged-out ', () => {
|
|||
type: AuthProviderType.LOCAL
|
||||
}
|
||||
])
|
||||
cy.getByCypressId('sign-in-button').should('be.visible').parent().should('have.attr', 'href', '/login')
|
||||
cy.getByCypressId('sign-in-button')
|
||||
.should('be.visible')
|
||||
.parent()
|
||||
.should('have.attr', 'href', '/login?redirectBackTo=/history')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue