Skip to content

Commit 36e2191

Browse files
committed
fix: mocks
1 parent b577e43 commit 36e2191

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/suites/bridge/mocks.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import type {Page, Route} from '@playwright/test';
22

3-
import {backend} from '../../utils/constants';
4-
53
export const mockCapabilities = (page: Page, enabled: boolean) => {
6-
return page.route(`${backend}/viewer/json/capabilities?*`, async (route: Route) => {
4+
return page.route(`**/viewer/capabilities`, async (route: Route) => {
75
await route.fulfill({
86
status: 200,
97
contentType: 'application/json',
@@ -17,7 +15,7 @@ export const mockCapabilities = (page: Page, enabled: boolean) => {
1715
};
1816

1917
export const mockNodesWithPile = (page: Page) => {
20-
return page.route(`${backend}/viewer/json/nodes?*`, async (route: Route) => {
18+
return page.route(`**/viewer/json/nodes?*`, async (route: Route) => {
2119
await route.fulfill({
2220
status: 200,
2321
contentType: 'application/json',
@@ -43,7 +41,7 @@ export const mockNodesWithPile = (page: Page) => {
4341
};
4442

4543
export const mockStorageGroupsWithPile = (page: Page) => {
46-
return page.route(`${backend}/storage/groups?*`, async (route: Route) => {
44+
return page.route(`**/storage/groups?*`, async (route: Route) => {
4745
await route.fulfill({
4846
status: 200,
4947
contentType: 'application/json',

0 commit comments

Comments
 (0)