mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 08:03:13 +00:00
test(vendors): isolate mutable reactivation state
This commit is contained in:
parent
4fe9319d7a
commit
b1cf3a0678
1 changed files with 2 additions and 2 deletions
4
e2e/vendors/vendors.spec.ts
vendored
4
e2e/vendors/vendors.spec.ts
vendored
|
|
@ -186,7 +186,7 @@ async function mockVendorApi(
|
|||
if (route.request().method() === "PUT") {
|
||||
state.updatedBody = route.request().postDataJSON();
|
||||
const vendor = vendorRecords.find((item) => String(item.Id) === id);
|
||||
if (vendor && typeof state.updatedBody?.isActive === "boolean") {
|
||||
if (options.legacyGateway && vendor && typeof state.updatedBody?.isActive === "boolean") {
|
||||
vendor.IsActive = state.updatedBody.isActive;
|
||||
}
|
||||
await fulfillJson(route, {
|
||||
|
|
@ -205,7 +205,7 @@ async function mockVendorApi(
|
|||
}
|
||||
state.deletedId = id;
|
||||
const vendor = vendorRecords.find((item) => String(item.Id) === id);
|
||||
if (vendor) vendor.IsActive = false;
|
||||
if (options.legacyGateway && vendor) vendor.IsActive = false;
|
||||
await fulfillJson(route, { status: "200" });
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue