mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 03:49:45 -06:00
Latest cypress: - updated all the tests - fixed up warnings - got rid of isolation stuff, it's now isolated by default - added simple docs - added `--noLocal` to prevent any local config from screwing up when testing locally - store screenshot artifacts if things go wrong
22 lines
648 B
TypeScript
22 lines
648 B
TypeScript
import '../../static/global';
|
|
|
|
export function runFrontendTest(name: string) {
|
|
it(name, () => {
|
|
return cy.window().then(win => {
|
|
return win.compilerExplorerFrontendTesting.run(name);
|
|
});
|
|
});
|
|
}
|
|
|
|
export function stubConsoleOutput(win: Cypress.AUTWindow) {
|
|
cy.stub(win.console, 'log').as('consoleLog');
|
|
cy.stub(win.console, 'warn').as('consoleWarn');
|
|
cy.stub(win.console, 'error').as('consoleError');
|
|
}
|
|
|
|
export function assertNoConsoleOutput() {
|
|
cy.get('@consoleLog').should('not.be.called');
|
|
cy.get('@consoleWarn').should('not.be.called');
|
|
cy.get('@consoleError').should('not.be.called');
|
|
}
|