mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
Enable screenshot mode before loading; capture screenshots after each test
This commit is contained in:
parent
505d4f05b1
commit
7fa7c535e3
1 changed files with 19 additions and 1 deletions
|
|
@ -18,4 +18,22 @@ import 'cypress-wait-until';
|
|||
import './commands';
|
||||
import failOnConsoleError from 'cypress-fail-on-console-error';
|
||||
|
||||
failOnConsoleError();
|
||||
failOnConsoleError();
|
||||
|
||||
beforeEach(() => {
|
||||
cy.on('window:before:load', (win) => {
|
||||
const originalGet = win.URLSearchParams.prototype.get;
|
||||
win.URLSearchParams.prototype.get = function (name: string) {
|
||||
if (name === 'screenshot') {
|
||||
return 'true';
|
||||
}
|
||||
return originalGet.call(this, name);
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.screenshot({
|
||||
capture: 'fullPage',
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue