mirror of https://github.com/rancher/dashboard.git
23 lines
651 B
TypeScript
23 lines
651 B
TypeScript
|
|
import './commands';
|
|
|
|
declare global {
|
|
// eslint-disable-next-line no-unused-vars
|
|
namespace Cypress {
|
|
interface Chainable {
|
|
login(username?: string, password?: string, cacheSession?: boolean): Chainable<Element>;
|
|
|
|
byLabel(label: string,): Chainable<Element>;
|
|
}
|
|
}
|
|
}
|
|
|
|
// TODO handle redirection errors better?
|
|
// we see a lot of 'error navigation cancelled' uncaught exceptions that don't actually break anything; ignore them here
|
|
Cypress.on('uncaught:exception', (err, runnable) => {
|
|
// returning false here prevents Cypress from failing the test
|
|
if (err.message.includes('navigation guard')) {
|
|
return false;
|
|
}
|
|
});
|