mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-30 02:32:58 +05:30
Added e2e test for attempt to open direct register page with invalid refresh token state
This commit is contained in:
parent
36f4fb8e34
commit
16d11de977
@ -228,6 +228,27 @@ describe('when user\'s token and refreshToken are invalid', () => {
|
||||
cy.url().should('contain', '/register');
|
||||
});
|
||||
|
||||
/**
|
||||
* This is a regression test for the edge case, when user tries to register new
|
||||
* account via direct sign up page link
|
||||
*
|
||||
* Expected result:
|
||||
* It should show register page
|
||||
*
|
||||
* Actual result:
|
||||
* User was redirected from register page back to password page due to recursive
|
||||
* atempt to get new refreshToken
|
||||
*
|
||||
* @see https://trello.com/c/iINbZ2l2
|
||||
*/
|
||||
it('should allow enter register page', () => {
|
||||
cy.visit('/register');
|
||||
|
||||
cy.get('@fetch').should('be.calledWith', '/api/options');
|
||||
|
||||
cy.url().should('contain', '/register');
|
||||
});
|
||||
|
||||
it('should allow oauth', () => {
|
||||
cy.visit(
|
||||
'/oauth2/v1/ely?client_id=ely&redirect_uri=http%3A%2F%2Fely.by%2Fauthorization%2Foauth&response_type=code&scope=account_info%2Caccount_email'
|
||||
|
Loading…
Reference in New Issue
Block a user