Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Kind represents the type definition of this config. Kind = "cypress" // APIVersion represents the supported config version. APIVersion = "v1alpha" )
Config descriptors.
Functions ¶
func FilterSuites ¶ added in v0.52.0
FilterSuites filters out suites in the project that don't match the given suite name.
func SetDefaults ¶ added in v0.52.0
func SetDefaults(p *Project)
SetDefaults applies config defaults in case the user has left them blank.
func SplitSuites ¶ added in v0.38.0
SplitSuites divided Suites to dockerSuites and sauceSuites
func Validate ¶ added in v0.23.3
Validate validates basic configuration of the project and returns an error if any of the settings contain illegal values. This is not an exhaustive operation and further validation should be performed both in the client and/or server side depending on the workflow that is executed.
Types ¶
type Config ¶ added in v0.56.0
type Config struct { // Path is the location of the config file itself. Path string `yaml:"-" json:"-"` FixturesFolder interface{} `json:"fixturesFolder,omitempty"` IntegrationFolder string `json:"integrationFolder,omitempty"` PluginsFile string `json:"pluginsFile,omitempty"` SupportFile string `json:"supportFile,omitempty"` }
Config represents the cypress.json native configuration file.
func (Config) AbsIntegrationFolder ¶ added in v0.68.0
AbsIntegrationFolder returns the absolute path to Config.IntegrationFolder.
type Cypress ¶
type Cypress struct { // ConfigFile is the path to "cypress.json". ConfigFile string `yaml:"configFile,omitempty" json:"configFile"` // Version represents the cypress framework version. Version string `yaml:"version" json:"version"` // Record represents the cypress framework record flag. Record bool `yaml:"record" json:"record"` // Key represents the cypress framework key flag. Key string `yaml:"key" json:"key"` // Reporters represents the customer reporters. Reporters []Reporter `yaml:"reporters" json:"reporters"` }
Cypress represents crucial cypress configuration that is required for setting up a project.
type Project ¶
type Project struct { config.TypeDef `yaml:",inline" mapstructure:",squash"` Defaults config.Defaults `yaml:"defaults" json:"defaults"` DryRun bool `yaml:"-" json:"-"` ShowConsoleLog bool `yaml:"showConsoleLog" json:"-"` ConfigFilePath string `yaml:"-" json:"-"` CLIFlags map[string]interface{} `yaml:"-" json:"-"` Sauce config.SauceConfig `yaml:"sauce,omitempty" json:"sauce"` Cypress Cypress `yaml:"cypress,omitempty" json:"cypress"` // Suite is only used as a workaround to parse adhoc suites that are created via CLI args. Suite Suite `yaml:"suite,omitempty" json:"-"` 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"` RootDir string `yaml:"rootDir,omitempty" json:"rootDir"` RunnerVersion string `yaml:"runnerVersion,omitempty" json:"runnerVersion"` Artifacts config.Artifacts `yaml:"artifacts,omitempty" json:"artifacts"` Reporters config.Reporters `yaml:"reporters,omitempty" json:"-"` Env map[string]string `yaml:"env,omitempty" json:"env"` Notifications config.Notifications `yaml:"notifications,omitempty" json:"-"` }
Project represents the cypress project configuration.
type Reporter ¶ added in v0.61.0
type Reporter struct { Name string `yaml:"name" json:"name"` Options map[string]interface{} `yaml:"options" json:"options"` }
Reporter represents a cypress report configuration.
type Suite ¶
type Suite struct { Name string `yaml:"name,omitempty" json:"name"` Browser string `yaml:"browser,omitempty" json:"browser"` BrowserVersion string `yaml:"browserVersion,omitempty" json:"browserVersion"` PlatformName string `yaml:"platformName,omitempty" json:"platformName"` Config SuiteConfig `yaml:"config,omitempty" json:"config"` ScreenResolution string `yaml:"screenResolution,omitempty" json:"screenResolution"` Mode string `yaml:"mode,omitempty" json:"-"` Timeout time.Duration `yaml:"timeout,omitempty" json:"timeout"` Shard string `yaml:"shard,omitempty" json:"-"` Headless bool `yaml:"headless,omitempty" json:"headless"` }
Suite represents the cypress test suite configuration.
type SuiteConfig ¶
type SuiteConfig struct { TestFiles []string `yaml:"testFiles,omitempty" json:"testFiles"` Env map[string]string `yaml:"env,omitempty" json:"env"` }
SuiteConfig represents the cypress config overrides.