test: refs #6695 handle uncaught exceptions in logout.spec.js for better error management
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
This commit is contained in:
parent
7bd4f088eb
commit
2c4ee50f46
|
@ -24,12 +24,21 @@ describe('Logout', () => {
|
|||
},
|
||||
},
|
||||
statusMessage: 'AUTHORIZATION_REQUIRED',
|
||||
});
|
||||
}).as('badRequest');
|
||||
});
|
||||
|
||||
it('when token not exists', () => {
|
||||
const exceptionHandler = (err) => {
|
||||
if (err.code === 'AUTHORIZATION_REQUIRED') return;
|
||||
};
|
||||
Cypress.on('uncaught:exception', exceptionHandler);
|
||||
|
||||
cy.get('.q-list').first().should('be.visible').click();
|
||||
cy.wait('@badRequest');
|
||||
|
||||
cy.checkNotification('Authorization Required');
|
||||
|
||||
Cypress.off('uncaught:exception', exceptionHandler);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue