Skip to content

Commit 149c7f1

Browse files
committed
debug test failure
1 parent ca4453b commit 149c7f1

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

tests/e2e/pageobjects/mwp-admin/marketplace.page.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,14 @@ class MwpMarketplaceSetupWizard {
5555
await $('.button=Activate Plugin').waitForDisplayed({ timeout: 30000 });
5656

5757
await $('.button=Activate Plugin').click();
58-
await browser.waitUntil(() => {
59-
return browser.execute(() => /page=matomo-marketplace/.test(window.location.pathname));
60-
}, { timeout: 30000 });
58+
try {
59+
await browser.waitUntil(() => {
60+
return browser.execute(() => /page=matomo-marketplace/.test(window.location.pathname));
61+
}, {timeout: 30000});
62+
} catch (e) {
63+
console.log(await browser.execute(() => window.location.pathname));
64+
throw e;
65+
}
6166

6267
await browser.switchWindow(/page=matomo-marketplace/);
6368
}

tests/phpunit/wpmatomo/ecommerce/test-woocommerce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ private function simulate_order_received_page_visit() {
371371

372372
// remove script added by woocommerce in wp_footer event
373373
$result = preg_replace( '%<script type="application/ld\+json">.*?</script>%s', '', $result );
374-
$result = preg_replace( "%<style id='global-styles-inline-css'.*?</style>%s", '', $result );
374+
$result = preg_replace( "%<style id=[\"']global-styles-inline-css[\"'].*?</style>%s", '', $result );
375375
$result = trim( $result );
376376

377377
return $result;

0 commit comments

Comments
 (0)