Skip to content

Commit 2c1dea6

Browse files
committed
Changed the tests to work for new id, since mOnlineId changed.
1 parent 66331e9 commit 2c1dea6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { MigrosAPI, ILoginCookies } from "migros-api-wrapper";
2020
main();
2121

2222
async function main() {
23-
// Search for products matching a certain string.
23+
// Search for products matching a certain string.
2424
const guestInfo = await MigrosAPI.account.oauth2.getGuestToken();
2525
const responseProductSearch = await MigrosAPI.products.productSearch.searchProduct({
2626
query: "cooking salt",

tests/product-supply.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,35 @@ describe("Check for a Products Supply", () => {
1616
expect(response[0].infiniteSupply).toBe(false);
1717
expect(response[0].pid).toBe(4963004);
1818
});
19-
test("Search for 4979976", async () => {
19+
test("Search for 228006", async () => {
2020
const guestInfo = await MigrosAPI.account.oauth2.getGuestToken();
2121
const productSupplyOptions: IProductSupplyOptions = {
22-
pids: "4979976",
22+
pids: "228006",
2323
warehouses: 1,
2424
};
2525
const response = await MigrosAPI.products.productStock.getProductSupply(
2626
productSupplyOptions,
2727
{ leshopch: guestInfo.token },
2828
);
2929
expect(response[0].infiniteSupply).toBe(false);
30-
expect(response[0].pid).toBe(4979976);
30+
expect(response[0].pid).toBe(228006);
3131
});
3232
});
3333

3434
describe("Check for multiple Products Supplies", () => {
35-
test("Search for 4963004 and 4979976", async () => {
35+
test("Search for 4963004 and 228006", async () => {
3636
const guestInfo = await MigrosAPI.account.oauth2.getGuestToken();
3737
const productSupplyOptions: IProductSupplyOptions = {
38-
pids: ["4963004", "4979976"],
38+
pids: ["4963004", "228006"],
3939
warehouses: 1,
4040
};
4141
const response = await MigrosAPI.products.productStock.getProductSupply(
4242
productSupplyOptions,
4343
{ leshopch: guestInfo.token },
4444
);
4545
expect(response[0].infiniteSupply).toBe(false);
46-
expect(response[0].pid).toBe(4979976);
46+
expect(response[0].pid).toBe(4963004);
4747
expect(response[1].infiniteSupply).toBe(false);
48-
expect(response[1].pid).toBe(4963004);
48+
expect(response[1].pid).toBe(228006);
4949
});
5050
});

0 commit comments

Comments
 (0)