diff --git a/utils/page-utils.ts b/utils/page-utils.ts index 6c58eb6..1c97d3f 100644 --- a/utils/page-utils.ts +++ b/utils/page-utils.ts @@ -582,6 +582,10 @@ export class PageUtils { // Remove WP Rocket from UI if on local run is explicitly parsed. if ( process.env.npm_config_env !== undefined && process.env.npm_config_env === 'local' ) { + // Start the process to remove wp-rocket. + await this.visitPage('wp-admin'); + await this.auth(); + await this.removeWprViaUi(); } } @@ -592,9 +596,6 @@ export class PageUtils { * @return {Promise} Promise that resolves after the uninstallation process is complete. */ public removeWprViaUi = async (): Promise => { - // Start the process to remove wp-rocket. - await this.visitPage('wp-admin'); - // Confirm Dialog Box. this.page.on('dialog', async(dialog) => { expect(dialog.type()).toContain('confirm');