Files
carpseeds.pl/wp-content/plugins/elementor-3.2.5-bck4/tests/e2e/support/hooks.js
2024-07-15 11:28:08 +02:00

20 lines
522 B
JavaScript

/// <reference types="Cypress" />
beforeEach( function() {
cy.login( 'admin' );
} );
afterEach( function() {
/*
* This exist because electron dose not show Prompt, alers and confirms.
* Cypress runs on electron and elementor alert the "user" from switching pages.
* This make cypress stack and unable to continue.
* So because of this, this event disable the confirm.
*/
cy.window()
.then( ( win ) => {
if ( win.elementor ) {
win.elementor.channels.editor.reply( 'status', false );
}
} );
} );