@@ -3,7 +3,7 @@ import { expect, test } from "@playwright/test";
3
3
test . describe ( "Composable Cache" , ( ) => {
4
4
test ( "cached component should work in ssr" , async ( { page } ) => {
5
5
await page . goto ( "/use-cache/ssr" ) ;
6
- let fullyCachedElt = page . getByTestId ( "fullyCached " ) ;
6
+ let fullyCachedElt = page . getByTestId ( "fully-cached " ) ;
7
7
let isrElt = page . getByTestId ( "isr" ) ;
8
8
await expect ( fullyCachedElt ) . toBeVisible ( ) ;
9
9
await expect ( isrElt ) . toBeVisible ( ) ;
@@ -12,9 +12,10 @@ test.describe("Composable Cache", () => {
12
12
const initialIsrText = await isrElt . textContent ( ) ;
13
13
14
14
let isrText = initialIsrText ;
15
+
15
16
do {
16
17
await page . reload ( ) ;
17
- fullyCachedElt = page . getByTestId ( "fullyCached " ) ;
18
+ fullyCachedElt = page . getByTestId ( "fully-cached " ) ;
18
19
isrElt = page . getByTestId ( "isr" ) ;
19
20
await expect ( fullyCachedElt ) . toBeVisible ( ) ;
20
21
await expect ( isrElt ) . toBeVisible ( ) ;
@@ -27,7 +28,7 @@ test.describe("Composable Cache", () => {
27
28
28
29
test ( "revalidateTag should work for fullyCached component" , async ( { page, request } ) => {
29
30
await page . goto ( "/use-cache/ssr" ) ;
30
- const fullyCachedElt = page . getByTestId ( "fullyCached " ) ;
31
+ const fullyCachedElt = page . getByTestId ( "fully-cached-with-tag " ) ;
31
32
await expect ( fullyCachedElt ) . toBeVisible ( ) ;
32
33
33
34
const initialFullyCachedText = await fullyCachedElt . textContent ( ) ;
@@ -45,7 +46,7 @@ test.describe("Composable Cache", () => {
45
46
test ( "cached component should work in isr" , async ( { page } ) => {
46
47
await page . goto ( "/use-cache/isr" ) ;
47
48
48
- let fullyCachedElt = page . getByTestId ( "fullyCached " ) ;
49
+ let fullyCachedElt = page . getByTestId ( "fully-cached " ) ;
49
50
let isrElt = page . getByTestId ( "isr" ) ;
50
51
51
52
await expect ( fullyCachedElt ) . toBeVisible ( ) ;
@@ -61,7 +62,7 @@ test.describe("Composable Cache", () => {
61
62
while ( isrText === initialIsrText ) {
62
63
await page . reload ( ) ;
63
64
isrElt = page . getByTestId ( "isr" ) ;
64
- fullyCachedElt = page . getByTestId ( "fullyCached " ) ;
65
+ fullyCachedElt = page . getByTestId ( "fully-cached " ) ;
65
66
await expect ( isrElt ) . toBeVisible ( ) ;
66
67
isrText = await isrElt . textContent ( ) ;
67
68
await expect ( fullyCachedElt ) . toBeVisible ( ) ;
@@ -72,7 +73,7 @@ test.describe("Composable Cache", () => {
72
73
73
74
do {
74
75
await page . reload ( ) ;
75
- fullyCachedElt = page . getByTestId ( "fullyCached " ) ;
76
+ fullyCachedElt = page . getByTestId ( "fully-cached " ) ;
76
77
isrElt = page . getByTestId ( "isr" ) ;
77
78
await expect ( fullyCachedElt ) . toBeVisible ( ) ;
78
79
await expect ( isrElt ) . toBeVisible ( ) ;
0 commit comments