test: fix intermitent e2e
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
0c2127f63f
commit
7899f7903f
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,6 +40,11 @@ style.innerHTML = `
|
|||
`;
|
||||
document.head.appendChild(style);
|
||||
|
||||
// FIXME: https://redmine.verdnatura.es/issues/8771
|
||||
Cypress.on('uncaught:exception', (err) => {
|
||||
if (err.code === 'ERR_CANCELED') return false;
|
||||
});
|
||||
|
||||
const waitForApiReady = (url, maxRetries = 20, delay = 1000) => {
|
||||
let retries = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue