ancient-wire-34126
10/01/2020, 12:25 PMstocky-dream-36427
10/01/2020, 3:08 PMstocky-dream-36427
10/01/2020, 3:08 PMstocky-dream-36427
10/01/2020, 3:09 PMstocky-dream-36427
10/01/2020, 3:10 PMstocky-dream-36427
10/01/2020, 3:10 PMstocky-dream-36427
10/01/2020, 3:11 PMancient-wire-34126
10/01/2020, 3:42 PMstocky-dream-36427
10/01/2020, 3:44 PMstocky-dream-36427
10/01/2020, 3:45 PMstocky-dream-36427
10/01/2020, 3:45 PMancient-wire-34126
10/01/2020, 4:13 PMstocky-dream-36427
10/01/2020, 4:21 PMstocky-dream-36427
10/01/2020, 4:21 PMnutritious-restaurant-91514
10/02/2020, 2:45 PMancient-wire-34126
10/02/2020, 2:46 PMnutritious-restaurant-91514
10/02/2020, 2:46 PMnutritious-restaurant-91514
10/02/2020, 2:48 PMancient-wire-34126
10/02/2020, 2:48 PMnutritious-restaurant-91514
10/06/2020, 7:01 AMstocky-dream-36427
10/06/2020, 4:08 PMnutritious-restaurant-91514
10/06/2020, 4:09 PMnumerous-greece-56828
04/01/2021, 2:53 PMancient-appointment-66951
04/08/2021, 1:53 AMancient-appointment-66951
04/08/2021, 1:53 AMcy.intercept
twice in the same test - it will use the most recently declared one.numerous-greece-56828
04/14/2021, 8:43 PMcy.intercept
response to be released. While is not available I'm just set a counter like this:numerous-greece-56828
04/14/2021, 8:50 PMuser
04/20/2021, 4:04 AMuser
04/20/2021, 10:14 AMcy.on
in the beforeEach (because using cy instead of Cypress should make it so they automatically get cleaned up between tests), but that does not seem to work, as it runs the content of the listener function provided too early.user
04/20/2021, 10:15 AMbeforeEach(function () {
let spySetup = function(window) {
let config = this.mocha.getRunner().test.ctx.consoleLoggingTestConfig;
config.spies.ERROR = sinon.spy(window.console, 'error');
config.spies.WARN = sinon.spy(window.console, 'warn');
};
let spyAssertion = function() {
let config: ConsoleLoggingTestConfig = this.mocha.getRunner().test.ctx.consoleLoggingTestConfig;
assertSpiedConsoleLogs(config, ConsoleType.ERROR);
assertSpiedConsoleLogs(config, ConsoleType.WARN);
};
Cypress.on('window:before:load', spySetup);
Cypress.on('command:end', spyAssertion);
this.test.ctx.consoleLoggingTestConfig = <ConsoleLoggingTestConfig>{
consoleTypes: [ConsoleType.ERROR],
excludedMessages: {
ERROR: [
'while rendering',
'blabla'
],
WARN: []
},
spies: {},
spySetupFunc: spySetup,
spyAssertionFunc: spyAssertion
};
});
afterEach(function () {
const config: ConsoleLoggingTestConfig = this.test.ctx.consoleLoggingTestConfig;
Cypress.removeListener('window:before:load', config.spySetupFunc);
Cypress.removeListener('command:end', config.spyAssertionFunc);
});