Skip to content

Commit 25ffa0a

Browse files
committed
Fix test
1 parent e4ac35c commit 25ffa0a

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

packages/idb-cache-app/src/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ const App = () => {
313313

314314
<WrappedFlexItem>
315315
<NumberInput
316+
data-testid="item-size-input"
316317
renderLabel={
317318
<Flex alignItems="end" direction="row">
318319
<Flex.Item as="div">
@@ -376,6 +377,7 @@ const App = () => {
376377

377378
<WrappedFlexItem>
378379
<NumberInput
380+
data-testid="max-chunks-input"
379381
renderLabel={
380382
<Flex alignItems="end">
381383
<Flex.Item as="div">
@@ -418,7 +420,7 @@ const App = () => {
418420
</Flex.Item>
419421
<Tooltip
420422
color="primary-inverse"
421-
renderTip="Low priority delays start of operations slightly to reduce load on event loop."
423+
renderTip="Low priority slightly delays start of operations to reduce load on event loop."
422424
offsetY="5px"
423425
>
424426
<Flex.Item as="div">

packages/idb-cache-app/tests/test-5.spec.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ async function retryClickAndCheckTestIdText(
2424

2525
test("maxChunks and cleanup", async ({ page }) => {
2626
await page.goto("http://localhost:3000/#size=32");
27-
await page.getByLabel("Max total chunks:").dblclick();
28-
await page.getByLabel("Max total chunks:").fill("100");
29-
await page.getByLabel("Item size (KiB): *").fill("1200");
27+
await page.getByTestId("max-chunks-input").dblclick();
28+
await page.getByTestId("max-chunks-input").fill("100");
29+
await page.getByTestId("item-size-input").fill("1200");
3030
await page.goto("http://localhost:3000/#size=1200");
31-
await page.getByLabel("Item size (KiB): *").press("ArrowLeft");
32-
await page.getByLabel("Item size (KiB): *").press("ArrowLeft");
33-
await page.getByLabel("Item size (KiB): *").press("Shift+ArrowLeft");
34-
await page.getByLabel("Item size (KiB): *").fill("1300");
31+
await page.getByTestId("item-size-input").fill("1300");
3532
await page.goto("http://localhost:3000/#size=1300");
3633
await page.getByTestId("set-item-button").click();
3734
await retryClickAndCheckTestIdText(page, "count-button", "count-value", "52");

packages/idb-cache/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ interface IDBCacheConfig {
8383
*/
8484
pbkdf2Iterations?: number;
8585
/**
86-
* Low priority delays start of operations slightly to reduce load on the event loop.
86+
* Low priority slightly delays start of operations to reduce load on the event loop.
8787
*/
8888
priority?: "normal" | "low";
8989
}

0 commit comments

Comments
 (0)