Skip to content

Commit

Permalink
fix: playwright trigger test (#3936)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Jul 15, 2024
1 parent 55ff48e commit 351d5e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions agent/workers/trigger/playwrightengine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var scriptFail = `
module.exports = { basicTest };
`

func TestTriggerFailure(t *testing.T) {
func TestTriggerWithScriptFailure(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {

assert.Equal(t, "GET", req.Method)
Expand All @@ -87,7 +87,7 @@ func TestTriggerFailure(t *testing.T) {
ex := triggerer.PLAYWRIGHTENGINE()

resp, err := ex.Trigger(createContext(), triggerConfig, createOptions())
assert.NotNil(t, err)

assert.Equal(t, false, resp.Result.PlaywrightEngine.Success)
assert.Nil(t, err)
assert.Contains(t, resp.Result.PlaywrightEngine.Out, "<element(s) not found>")
assert.Equal(t, true, resp.Result.PlaywrightEngine.Success)
}

0 comments on commit 351d5e3

Please sign in to comment.