Skip to content

Commit

Permalink
Improve waiting for page auto-close
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed Jun 19, 2024
1 parent 84fb8fa commit 6f9495d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/cloud-slack-dev-e2e/slack_page_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (p *SlackPage) ConnectWorkspace(t *testing.T, browser *rod.Browser) {
p.page.Screenshot("after-workspace-connect")
}

_, err = p.page.Element("#non-existing-elem")
// expected context canceled = which means, it was auto-closed
assert.EqualError(t, err, context.Canceled.Error())
t.Log("Waiting for page auto-close...")
err = p.page.WaitIdle(waitTime) // wait for auto-close
assert.NoError(t, err)
}

0 comments on commit 6f9495d

Please sign in to comment.