deflake TestNavigate

For some reason, this test fails about half the time on Travis, but I
can't get it to fail even after stress-testing hundreds of concurrent
runs.

It might be because Travis is on a much older version of Chrome. We'll
fix that soon, by having chromedp select a specific version of Chrome.

For now, make it more conservative, not assuming that a Location after a
Navigate isn't racy.
This commit is contained in:
Daniel Martí 2019-04-08 12:38:36 +02:00
parent 11b3a5dc8f
commit a29b1ec1d6

View File

@ -23,8 +23,8 @@ func TestNavigate(t *testing.T) {
var urlstr string var urlstr string
if err := Run(ctx, if err := Run(ctx,
Location(&urlstr),
WaitVisible(`#icon-brankas`, ByID), WaitVisible(`#icon-brankas`, ByID),
Location(&urlstr),
); err != nil { ); err != nil {
t.Fatal(err) t.Fatal(err)
} }