MCPcopy Create free account
hub / github.com/conforma/cli / AddStepsTo

Function AddStepsTo

acceptance/cli/cli.go:850–869  ·  view source on GitHub ↗

AddStepsTo adds Gherkin steps to the godog ScenarioContext

(sc *godog.ScenarioContext)

Source from the content-addressed store, hash-verified

848
849// AddStepsTo adds Gherkin steps to the godog ScenarioContext
850func AddStepsTo(sc *godog.ScenarioContext) {
851 sc.Step(`^ec command is run with "(.+)"$`, ecCommandIsRunWith)
852 sc.Step(`^the exit status should be (\d+)$`, theExitStatusIs)
853 sc.Step(`^the standard output should contain$`, theStandardOutputShouldContain)
854 sc.Step(`^the standard output should match baseline file "(.+)"$`, theStandardOutputShouldMatchBaseline)
855 sc.Step(`^the standard error should contain$`, theStandardErrorShouldContain)
856 sc.Step(`^the log output should contain "([^"]*)"$`, theLogOutputShouldContain)
857 sc.Step(`^the environment variable is set "([^"]*)"$`, theEnvironmentVarilableIsSet)
858 sc.Step(`^the output should match the snapshot$`, matchSnapshot)
859 sc.Step(`^the "([^"]*)" file should match the snapshot$`, matchFileSnapshot)
860 sc.Step(`^a file named "([^"]*)" containing$`, createGenericFile)
861 sc.Step(`^a track bundle file named "([^"]*)" containing$`, createTrackBundleFile)
862 sc.After(func(ctx context.Context, sc *godog.Scenario, err error) (context.Context, error) {
863 if err != nil {
864 logExecution(ctx)
865 }
866
867 return ctx, nil
868 })
869}
870
871// gojsondiff handles arrays and maps different
872// gojsondiff.Compare unmarshals to map[string]interface{}

Callers 1

initializeScenarioFunction · 0.92

Calls 1

logExecutionFunction · 0.85

Tested by 1

initializeScenarioFunction · 0.74