Server IP : 172.67.157.199 / Your IP : 18.227.13.206 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/mu-plugins/vendor/wpex/godaddy-launch/.dev/tests/cypress/support/ |
Upload File : |
import { loginToSite } from '../helpers'; beforeEach( function() { loginToSite(); cy.visit( Cypress.env( 'testURL' ) + '/wp-admin/post-new.php?post_type=post' ); cy.get( '.block-editor-page' ).should( 'exist' ); cy.url().should( 'contain', '/wp-admin/post-new.php?post_type=post' ).then( () => { cy.window().then( ( win ) => { // Enable "Top Toolbar" if ( ! win.wp.data.select( 'core/edit-post' ).isFeatureActive( 'fixedToolbar' ) ) { win.wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fixedToolbar' ); } win.wp.data.dispatch( 'core/editor' ).disablePublishSidebar(); } ); } ); } ); /** * Starting in Cypress 8.1.0 Unhandled Exceptions now cause tests to fail. * Sometimes unhandled exceptions occur in Core that do not effect the UX created by CoBlocks. * We discard unhandled exceptions and pass the test as long as assertions continue expectedly. */ Cypress.on( 'uncaught:exception', () => { // returning false here prevents Cypress from failing the test. return false; } );