diff --git a/internal/runner/web_carrier_test.go b/internal/runner/web_carrier_test.go index c5cb169..96b5f9d 100644 --- a/internal/runner/web_carrier_test.go +++ b/internal/runner/web_carrier_test.go @@ -75,6 +75,8 @@ func (d *carrierWebDriver) NextActionFromV8(context.Context) (json.RawMessage, e func (d *carrierWebDriver) SetLastAction(context.Context, json.RawMessage) error { return nil } +func (d *carrierWebDriver) SetLogs(context.Context, json.RawMessage) error { return nil } + // TestRunner_TransitionalStepNeverAdvancesThePageCarrier pins the ordering the // web path depends on. The page-side extractors must run only on steps the // verifier accepts: their getters advance spec state every time they evaluate, @@ -172,6 +174,8 @@ func (d *installFailsWebDriver) SetLastAction(context.Context, json.RawMessage) return errors.New("__sanderlingSetLastAction__ is not a function") } +func (d *installFailsWebDriver) SetLogs(context.Context, json.RawMessage) error { return nil } + // TestRunner_LastActionInstallFailureFailsTheRun covers the other half of the // same trust boundary. A run that cannot install lastAction in the page cannot // apply the page's extractor values either, so the step keeps goja's diff --git a/internal/runner/web_extractor_trace_test.go b/internal/runner/web_extractor_trace_test.go index b31733e..d2c54e4 100644 --- a/internal/runner/web_extractor_trace_test.go +++ b/internal/runner/web_extractor_trace_test.go @@ -47,6 +47,8 @@ func (d *webMockDriver) NextActionFromV8(context.Context) (json.RawMessage, erro func (d *webMockDriver) SetLastAction(context.Context, json.RawMessage) error { return nil } +func (d *webMockDriver) SetLogs(context.Context, json.RawMessage) error { return nil } + // TestRunner_TraceRecordsTheValueTheVerdictUsed fails if the trace and the // verdict disagree about an extractor. A witness is only an explanation of a // violation if it holds the state the violated property was evaluated against. diff --git a/internal/runner/web_last_action_test.go b/internal/runner/web_last_action_test.go index 10ce20e..a50c706 100644 --- a/internal/runner/web_last_action_test.go +++ b/internal/runner/web_last_action_test.go @@ -26,7 +26,8 @@ globalThis.properties = {}; // control, so the runner has a real applied action to report on the next step. type tappingWebDriver struct { *mockdriver.Driver - installed []string + installed []string + installedLogs []string } func (d *tappingWebDriver) InstallBundle(context.Context, []byte) error { return nil } @@ -44,6 +45,11 @@ func (d *tappingWebDriver) SetLastAction(_ context.Context, encoded json.RawMess return nil } +func (d *tappingWebDriver) SetLogs(_ context.Context, encoded json.RawMessage) error { + d.installedLogs = append(d.installedLogs, string(encoded)) + return nil +} + func TestRunner_WebInstallsLastActionInThePage(t *testing.T) { state := newHarnessWithSpec(t, lastActionSpec) web := &tappingWebDriver{Driver: state.mock}