File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,28 +3,28 @@ import { test, expect } from "@playwright/test";
3
3
test ( "redirect" , async ( { page } ) => {
4
4
await page . goto ( "/" ) ;
5
5
await page . click ( '[href="/about"]' ) ;
6
- expect ( page . waitForURL ( "**/redirected" ) ) ;
6
+ await page . waitForURL ( "**/redirected" ) ;
7
7
expect ( await page . textContent ( "h1" ) ) . toContain ( "Redirected" ) ;
8
8
} ) ;
9
9
10
10
test ( "rewrite" , async ( { page } ) => {
11
11
await page . goto ( "/" ) ;
12
12
await page . click ( '[href="/another"]' ) ;
13
- expect ( page . waitForURL ( "**/another" ) ) ;
13
+ await page . waitForURL ( "**/another" ) ;
14
14
expect ( await page . textContent ( "h1" ) ) . toContain ( "Rewrite" ) ;
15
15
} ) ;
16
16
17
17
test ( "no matching middleware" , async ( { page } ) => {
18
18
await page . goto ( "/" ) ;
19
19
await page . click ( '[href="/about2"]' ) ;
20
- expect ( page . waitForURL ( "**/about2" ) ) ;
20
+ await page . waitForURL ( "**/about2" ) ;
21
21
expect ( await page . textContent ( "h1" ) ) . toContain ( "About 2" ) ;
22
22
} ) ;
23
23
24
24
test ( "matching noop middleware" , async ( { page } ) => {
25
25
await page . goto ( "/" ) ;
26
26
await page . click ( '[href="/middleware"]' ) ;
27
- expect ( page . waitForURL ( "**/middleware" ) ) ;
27
+ await page . waitForURL ( "**/middleware" ) ;
28
28
expect ( await page . textContent ( "h1" ) ) . toContain ( "Via middleware" ) ;
29
29
} ) ;
30
30
You can’t perform that action at this time.
0 commit comments