Skip to content

Commit a05d7b7

Browse files
committed
fixup! Add a test for waitForNavigation with url
1 parent 06cc761 commit a05d7b7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

internal/js/modules/k6/browser/tests/page_test.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,6 @@ func TestWaitForNavigationWithURL(t *testing.T) {
28112811
throw new Error('Expected to navigate to page1.html but got ' + currentURL);
28122812
}
28132813
2814-
// Go back to test page
28152814
await page.goto(testURL);
28162815
28172816
// Test glob pattern - matches page2.html
@@ -2824,7 +2823,6 @@ func TestWaitForNavigationWithURL(t *testing.T) {
28242823
throw new Error('Expected to navigate to page2.html but got ' + currentURL);
28252824
}
28262825
2827-
// Go back to test page
28282826
await page.goto(testURL);
28292827
28302828
// Test glob pattern with query string
@@ -2837,7 +2835,6 @@ func TestWaitForNavigationWithURL(t *testing.T) {
28372835
throw new Error('Expected to navigate to page1.html?test=true but got ' + currentURL);
28382836
}
28392837
2840-
// Go back to test page
28412838
await page.goto(testURL);
28422839
28432840
// Test regex pattern - matches any page with .html extension
@@ -2850,7 +2847,6 @@ func TestWaitForNavigationWithURL(t *testing.T) {
28502847
throw new Error('Expected URL to end with .html but got ' + currentURL);
28512848
}
28522849
2853-
// Go back to test page
28542850
await page.goto(testURL);
28552851
28562852
// Test regex pattern with query parameters
@@ -2863,7 +2859,6 @@ func TestWaitForNavigationWithURL(t *testing.T) {
28632859
throw new Error('Expected to navigate to page2.html?test=true but got ' + currentURL);
28642860
}
28652861
2866-
// Go back to test page
28672862
await page.goto(testURL);
28682863
28692864
// Test timeout when URL doesn't match
@@ -2884,8 +2879,9 @@ func TestWaitForNavigationWithURL(t *testing.T) {
28842879
throw new Error('Expected timeout error when URL does not match');
28852880
}
28862881
2887-
// Test character class in glob pattern
28882882
await page.goto(testURL);
2883+
2884+
// Test character class in glob pattern
28892885
await Promise.all([
28902886
page.waitForNavigation({ url: '**/page[12].html' }),
28912887
page.click('#page1')
@@ -2895,8 +2891,9 @@ func TestWaitForNavigationWithURL(t *testing.T) {
28952891
throw new Error('Expected to navigate to page1.html with character class pattern but got ' + currentURL);
28962892
}
28972893
2898-
// Test empty pattern (matches any navigation)
28992894
await page.goto(testURL);
2895+
2896+
// Test empty pattern (matches any navigation)
29002897
await Promise.all([
29012898
page.waitForNavigation({ url: '' }),
29022899
page.click('#page2')

0 commit comments

Comments
 (0)