Commit 01c128b5110 for woocommerce
commit 01c128b5110f782c0a6406903fb8d693bb4bac70
Author: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
Date: Thu Jun 4 14:53:15 2026 +0200
[e2e tests] Fix missing baseURL guard in restApi fixture (#65516)
diff --git a/plugins/woocommerce/changelog/wooplug-6227-e2e-pw-guard-against-undefined-baseurl-in-restapi-fixture b/plugins/woocommerce/changelog/wooplug-6227-e2e-pw-guard-against-undefined-baseurl-in-restapi-fixture
new file mode 100644
index 00000000000..c5619c651b2
--- /dev/null
+++ b/plugins/woocommerce/changelog/wooplug-6227-e2e-pw-guard-against-undefined-baseurl-in-restapi-fixture
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+e2e tests: Fix missing baseURL guard in restApi fixture
diff --git a/plugins/woocommerce/tests/e2e-pw/fixtures/fixtures.ts b/plugins/woocommerce/tests/e2e-pw/fixtures/fixtures.ts
index ecbd78488d6..12659e7b21c 100644
--- a/plugins/woocommerce/tests/e2e-pw/fixtures/fixtures.ts
+++ b/plugins/woocommerce/tests/e2e-pw/fixtures/fixtures.ts
@@ -16,6 +16,12 @@ import { admin } from '../test-data/data';
export const test = baseTest.extend( {
restApi: async ( { baseURL }, use ) => {
+ if ( ! baseURL ) {
+ throw new Error(
+ 'Playwright baseURL is required to use the restApi fixture.'
+ );
+ }
+
await use(
createClient( baseURL, {
type: 'basic',