testcafe

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitSuites added in v0.38.0

func SplitSuites(p Project) (Project, Project)

SplitSuites divided Suites to dockerSuites and sauceSuites

Types

type Project

type Project struct {
	config.TypeDef `yaml:",inline"`
	ShowConsoleLog bool
	ConfigFilePath string             `yaml:"-" json:"-"`
	DryRun         bool               `yaml:"-" json:"-"`
	Sauce          config.SauceConfig `yaml:"sauce,omitempty" json:"sauce"`
	Suites         []Suite            `yaml:"suites,omitempty" json:"suites"`
	BeforeExec     []string           `yaml:"beforeExec,omitempty" json:"beforeExec"`
	Docker         config.Docker      `yaml:"docker,omitempty" json:"docker"`
	Testcafe       Testcafe           `yaml:"testcafe,omitempty" json:"testcafe"`
	Npm            config.Npm         `yaml:"npm,omitempty" json:"npm"`
	RootDir        string             `yaml:"rootDir,omitempty" json:"rootDir"`
	RunnerVersion  string             `yaml:"runnerVersion,omitempty" json:"runnerVersion"`
	Artifacts      config.Artifacts   `yaml:"artifacts,omitempty" json:"artifacts"`
	Defaults       config.Defaults    `yaml:"defaults,omitempty" json:"defaults"`
}

Project represents the testcafe project configuration.

func FromFile

func FromFile(cfgPath string) (Project, error)

FromFile creates a new testcafe project based on the filepath.

type Screenshots

type Screenshots struct {
	TakeOnFails bool `yaml:"takeOnFails,omitempty" json:"takeOnFails"`
	FullPage    bool `yaml:"fullPage,omitempty" json:"fullPage"`
}

Screenshots represents screenshots configuration.

type Suite

type Suite struct {
	Name               string            `yaml:"name,omitempty" json:"name"`
	BrowserName        string            `yaml:"browserName,omitempty" json:"browserName"`
	BrowserVersion     string            `yaml:"browserVersion,omitempty" json:"browserVersion"`
	Src                []string          `yaml:"src,omitempty" json:"src"`
	Screenshots        Screenshots       `yaml:"screenshots,omitempty" json:"screenshots"`
	PlatformName       string            `yaml:"platformName,omitempty" json:"platformName"`
	ScreenResolution   string            `yaml:"screenResolution,omitempty" json:"screenResolution"`
	Env                map[string]string `yaml:"env,omitempty" json:"env"`
	TsConfigPath       string            `yaml:"tsConfigPath,omitempty" json:"tsConfigPath"`
	ClientScripts      []string          `yaml:"clientScripts,omitempty" json:"clientScripts"`
	SkipJsErrors       bool              `yaml:"skipJsErrors,omitempty" json:"skipJsErrors"`
	QuarantineMode     bool              `yaml:"quarantineMode,omitempty" json:"quarantineMode"`
	SkipUncaughtErrors bool              `yaml:"skipUncaughtErrors,omitempty" json:"skipUncaughtErrors"`
	SelectorTimeout    int               `yaml:"selectorTimeout,omitempty" json:"selectorTimeout"`
	AssertionTimeout   int               `yaml:"assertionTimeout,omitempty" json:"assertionTimeout"`
	PageLoadTimeout    int               `yaml:"pageLoadTimeout,omitempty" json:"pageLoadTimeout"`
	Speed              float64           `yaml:"speed,omitempty" json:"speed"`
	StopOnFirstFail    bool              `yaml:"stopOnFirstFail,omitempty" json:"stopOnFirstFail"`
	DisablePageCaching bool              `yaml:"disablePageCaching,omitempty" json:"disablePageCaching"`
	DisableScreenshots bool              `yaml:"disableScreenshots,omitempty" json:"disableScreenshots"`
	DisableVideo       bool              `yaml:"disableVideo,omitempty" json:"disableVideo"` // This field is for sauce, not for native testcafe config.
	Mode               string            `yaml:"mode,omitempty" json:"-"`
	Devices            []config.Emulator `yaml:"devices,omitempty" json:"devices"`
}

Suite represents the testcafe test suite configuration.

type Testcafe

type Testcafe struct {
	// Deprecated. ProjectPath is succeeded by Project.RootDir.
	ProjectPath string `yaml:"projectPath,omitempty" json:"projectPath"`

	// Version represents the testcafe framework version.
	Version string `yaml:"version,omitempty" json:"version"`
}

Testcafe represents the configuration for testcafe.

Jump to

Keyboard shortcuts

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