Fix failing disable test (#39674)

* Fix failing disable test

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix daily failing

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Jonathan Lane 2023-08-18 15:33:07 -07:00 committed by GitHub
parent b3f7be5fdc
commit 497c5694e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fixes a failing e2e test in our daily test runs.

View File

@ -18,15 +18,15 @@ let isNewProductEditorEnabled = false;
const isTrackingSupposedToBeEnabled = !! process.env.ENABLE_TRACKING;
async function dismissFeedbackModalIfShown( page ) {
if ( ! isTrackingSupposedToBeEnabled ) {
// no modal should be shown, so don't even look for button
return;
}
// if ( ! isTrackingSupposedToBeEnabled ) {
// // no modal should be shown, so don't even look for button
// console.log('Feedback modal not shown');
// return;
// }
try {
await page
.locator( '.woocommerce-product-mvp-feedback-modal' )
.getByRole( 'button', { name: 'Skip' } )
.getByText('Skip').nth(3)
.click( { timeout: 5000 } );
} catch ( error ) {}
}