testcafe

package
v0.49.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Kind represents the type definition of this config.
	Kind = "testcafe"

	// APIVersion represents the supported config version.
	APIVersion = "v1alpha"
)

Config descriptors.

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:"-"`
	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:"-"`
	// Deprecated. Reserved for future use for actual devices.
	Devices    []config.Simulator `yaml:"devices,omitempty" json:"devices"`
	Simulators []config.Simulator `yaml:"emulators,omitempty" json:"emulators"`
}

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