playwright

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDockerImage represents the name of the docker image on Dockerhub
	DefaultDockerImage = "saucelabs/stt-playwright-node"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Playwright

type Playwright struct {
	ProjectPath string      `yaml:"projectPath,omitempty" json:"projectPath,omitempty"`
	Version     string      `yaml:"version,omitempty" json:"version,omitempty"`
	Params      SuiteConfig `yaml:"params,omitempty" json:"params,omitempty"`

	// LocalProjectPath represents the project before nested folder removal
	LocalProjectPath string `yaml:"-" json:"-"`
}

Playwright represents crucial playwright configuration that is required for setting up a project.

type Project

type Project struct {
	config.TypeDef `yaml:",inline"`
	ShowConsoleLog bool
	Sauce          config.SauceConfig `yaml:"sauce,omitempty" json:"sauce"`
	Playwright     Playwright         `yaml:"playwright,omitempty" json:"playwright"`
	Suites         []Suite            `yaml:"suites,omitempty" json:"suites"`
	BeforeExec     []string           `yaml:"beforeExec,omitempty" json:"beforeExec"`
	Docker         config.Docker      `yaml:"docker,omitempty" json:"docker"`
	Npm            config.Npm         `yaml:"npm,omitempty" json:"npm"`
}

Project represents the playwright project configuration.

func FromFile

func FromFile(cfgPath string) (Project, error)

FromFile creates a new playwright Project based on the filepath cfgPath.

type Suite

type Suite struct {
	Name              string      `yaml:"name,omitempty" json:"name"`
	PlaywrightVersion string      `yaml:"playwrightVersion,omitempty" json:"playwrightVersion,omitempty"`
	TestMatch         string      `yaml:"testMatch,omitempty" json:"testMatch,omitempty"`
	PlatformName      string      `yaml:"platformName,omitempty" json:"platformName,omitempty"`
	Params            SuiteConfig `yaml:"params,omitempty" json:"param,omitempty"`
}

Suite represents the playwright test suite configuration.

type SuiteConfig

type SuiteConfig struct {
	BrowserName         string `yaml:"browserName,omitempty" json:"browserName,omitempty"`
	HeadFull            bool   `yaml:"headful,omitempty" json:"headful,omitempty"`
	ScreenshotOnFailure bool   `yaml:"screenshotOnFailure,omitempty" json:"screenshotOnFailure,omitempty"`
	SlowMo              int    `yaml:"slowMo,omitempty" json:"slowMo,omitempty"`
	Video               bool   `yaml:"video,omitempty" json:"video,omitempty"`
}

SuiteConfig represents the configuration specific to a suite

Jump to

Keyboard shortcuts

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