mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 12:49:00 +00:00
test(vendors): follow grouped directory endpoint
This commit is contained in:
parent
99253587ef
commit
af6616ca65
2 changed files with 2 additions and 2 deletions
2
e2e/vendors/vendors.spec.ts
vendored
2
e2e/vendors/vendors.spec.ts
vendored
|
|
@ -148,7 +148,7 @@ async function mockVendorApi(
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await page.route("**/api/Vendor/GetVendorList*", async (route) => {
|
await page.route("**/api/Vendor/GetVendorDirectoryList*", async (route) => {
|
||||||
const url = new URL(route.request().url());
|
const url = new URL(route.request().url());
|
||||||
state.listUrls.push(url.toString());
|
state.listUrls.push(url.toString());
|
||||||
if (options.listError && url.searchParams.get("pageSize") !== "1") {
|
if (options.listError && url.searchParams.get("pageSize") !== "1") {
|
||||||
|
|
|
||||||
2
e2e/vendors/vendors.visual.spec.ts
vendored
2
e2e/vendors/vendors.visual.spec.ts
vendored
|
|
@ -112,7 +112,7 @@ async function mockVendorApi(page: Page, mode: "default" | "empty" | "error" = "
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url.pathname.endsWith("/api/Vendor/GetVendorList")) {
|
if (url.pathname.endsWith("/api/Vendor/GetVendorDirectoryList")) {
|
||||||
const isCount = url.searchParams.get("pageSize") === "1";
|
const isCount = url.searchParams.get("pageSize") === "1";
|
||||||
if (mode === "error" && !isCount) {
|
if (mode === "error" && !isCount) {
|
||||||
await fulfillJson(route, { message: "Vendor directory unavailable" }, 500);
|
await fulfillJson(route, { message: "Vendor directory unavailable" }, 500);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue