models

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnmatchedStepArgumentNumber = errors.New("func received more arguments than expected")
	ErrCannotConvert               = errors.New("cannot convert argument")
	ErrUnsupportedArgumentType     = errors.New("unsupported argument type")
)

matchable errors

Functions

This section is empty.

Types

type Feature

type Feature struct {
	*messages.GherkinDocument
	Pickles []*messages.Pickle
	Content []byte
}

Feature is an internal object to group together the parsed gherkin document, the pickles and the raw content.

func (Feature) FindBackground

func (f Feature) FindBackground(astScenarioID string) *messages.Background

FindBackground ...

func (Feature) FindExample

func (f Feature) FindExample(exampleAstID string) (*messages.Examples, *messages.TableRow)

FindExample ...

func (Feature) FindScenario

func (f Feature) FindScenario(astScenarioID string) *messages.Scenario

FindScenario ...

func (Feature) FindStep

func (f Feature) FindStep(astStepID string) *messages.Step

FindStep ...

type PickleResult

type PickleResult struct {
	PickleID  string
	StartedAt time.Time
}

PickleResult ...

type PickleStepResult

type PickleStepResult struct {
	Status     StepResultStatus
	FinishedAt time.Time
	Err        error

	PickleID     string
	PickleStepID string

	Def *StepDefinition
}

PickleStepResult ...

func NewStepResult

func NewStepResult(pickleID, pickleStepID string, match *StepDefinition) PickleStepResult

NewStepResult ...

type StepDefinition

type StepDefinition struct {
	formatters.StepDefinition

	Args         []interface{}
	HandlerValue reflect.Value

	// multistep related
	Nested    bool
	Undefined []string
}

StepDefinition ...

func (*StepDefinition) GetInternalStepDefinition

func (sd *StepDefinition) GetInternalStepDefinition() *formatters.StepDefinition

GetInternalStepDefinition ...

func (*StepDefinition) Run

func (sd *StepDefinition) Run(ctx context.Context) (context.Context, interface{})

Run a step with the matched arguments using reflect

type StepResultStatus

type StepResultStatus int

StepResultStatus ...

const (
	// Passed ...
	Passed StepResultStatus = iota
	// Failed ...
	Failed
	// Skipped ...
	Skipped
	// Undefined ...
	Undefined
	// Pending ...
	Pending
)

func (StepResultStatus) Color

func (st StepResultStatus) Color() colors.ColorFunc

Color ...

func (StepResultStatus) String

func (st StepResultStatus) String() string

String ...

type TestRunStarted

type TestRunStarted struct {
	StartedAt time.Time
}

TestRunStarted ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL