File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
internal/js/modules/k6/browser/tests Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2864,3 +2864,24 @@ func TestWaitForNavigationWithURL(t *testing.T) {
2864
2864
)
2865
2865
assert .Equal (t , sobek .Undefined (), got .Result ())
2866
2866
}
2867
+
2868
+ func TestWaitForNavigationWithURL_RegexFailure (t * testing.T ) {
2869
+ t .Parallel ()
2870
+
2871
+ tb := newTestBrowser (t , withFileServer ())
2872
+ tb .vu .ActivateVU ()
2873
+ tb .vu .StartIteration (t )
2874
+
2875
+ _ , err := tb .vu .RunAsync (t , `
2876
+ const page = await browser.newPage();
2877
+ await page.goto('%s');
2878
+
2879
+ await Promise.all([
2880
+ page.waitForNavigation({ url: /^.*/my_messages.*$/ }),
2881
+ page.locator('#page2').click()
2882
+ ]);
2883
+ ` ,
2884
+ tb .staticURL ("waitfornavigation_test.html" ),
2885
+ )
2886
+ assert .ErrorContains (t , err , "Unexpected token *" )
2887
+ }
You can’t perform that action at this time.
0 commit comments