Skip to content

Commit

Permalink
fix(test): only restart driver when kill driver
Browse files Browse the repository at this point in the history
  • Loading branch information
canstand committed Dec 13, 2023
1 parent 0886225 commit 8181e34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/playwright_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (
func TestShouldNotHangWhenPlaywrightUnexpectedExit(t *testing.T) {
BeforeEach(t)
defer AfterEach(t, false)
defer BeforeAll() // need restart playwright driver
if !isChromium {
t.Skip("browser agnostic testing")
return
}
if runtime.GOOS == "linux" {
t.Skip("ignore linux, hard to find the playwright process")
t.Skip("killPlaywrightProcess not work on linux")
return
}

err := killPlaywrightProcess()
require.NoError(t, err)
defer BeforeAll() // need restart playwright driver
_, err = browser.NewContext()
require.Error(t, err)
}

0 comments on commit 8181e34

Please sign in to comment.