From 08070c36113f4715039cf2679cb25d9a44b2e03c Mon Sep 17 00:00:00 2001 From: Aaron Shafovaloff Date: Sat, 16 Nov 2024 13:57:14 -0700 Subject: [PATCH] Add test: 20mb size item --- packages/idb-cache-app/tests/test-1.spec.ts | 2 +- packages/idb-cache-app/tests/test-4.spec.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 packages/idb-cache-app/tests/test-4.spec.ts diff --git a/packages/idb-cache-app/tests/test-1.spec.ts b/packages/idb-cache-app/tests/test-1.spec.ts index ea229e1..857347d 100644 --- a/packages/idb-cache-app/tests/test-1.spec.ts +++ b/packages/idb-cache-app/tests/test-1.spec.ts @@ -1,4 +1,4 @@ -import { test, expect } from "@playwright/test"; +import { test } from "@playwright/test"; test("basics", async ({ page }) => { await page.goto("http://localhost:3000/#size=32"); diff --git a/packages/idb-cache-app/tests/test-4.spec.ts b/packages/idb-cache-app/tests/test-4.spec.ts new file mode 100644 index 0000000..3b194bc --- /dev/null +++ b/packages/idb-cache-app/tests/test-4.spec.ts @@ -0,0 +1,12 @@ +import { test, expect } from "@playwright/test"; + +test("20mb size item", async ({ page }) => { + await page.goto("http://localhost:3000/#size=20480"); + await page.getByTestId("clear-button").click(); + await page.getByTestId("set-item-button").click(); + await expect(page.getByText("6u81xr")).toBeVisible(); + await page.getByTestId("get-item-button").click(); + await expect(page.getByTestId("hash2").getByText("6u81xr")).toBeVisible(); + await page.getByTestId("count-button").click(); + await expect(page.getByText("839")).toBeVisible(); +});