zuke.tools.cypress

← Python API reference

@zuke/cypress 1.1.0: @zuke/cypress — typed CypressTasks wrappers for the [Cypress](https://cypress.io) CLI (end-to-end and component testing), for use in Zuke builds.

Symbols

#

CypressInfoSettings

class
class CypressInfoSettings(CypressSettings)

Settings for cypress info.

#

CypressInstallSettings

class
class CypressInstallSettings(CypressSettings)

Settings for cypress install (the bundled binary).

  • force() -> Self

    Reinstall even if already present (--force).

#

CypressOpenSettings

class
class CypressOpenSettings(CypressTestingSettings)

Settings for cypress open (interactive).

#

CypressRunSettings

class
class CypressRunSettings(CypressTestingSettings)

Settings for cypress run (headless).

  • headed() -> Self

    Run in a headed browser (--headed).

  • spec(pattern: str) -> Self

    Glob of spec files to run (--spec).

  • record() -> Self

    Record the run to Cypress Cloud (--record).

  • parallel() -> Self

    Run in parallel across machines (--parallel).

  • tag(value: str) -> Self

    Tag the recorded run (--tag).

  • port(value: float) -> Self

    Override the server port (--port).

#

CypressSettings

class
class CypressSettings(ToolSettings)

Base for all cypress subcommand settings: the binary is cypress.

#

CypressTasks

class
class CypressTasks

Typed task functions for the cypress CLI.

  • static async run(ctx: ServiceContext, configure: Callable[[CypressRunSettings], CypressRunSettings] | None=None) -> ExecResult

    Run tests in headless mode: cypress run.

  • static async open(ctx: ServiceContext, configure: Callable[[CypressOpenSettings], CypressOpenSettings] | None=None) -> ExecResult

    Open the interactive runner: cypress open.

  • static async install(ctx: ServiceContext, configure: Callable[[CypressInstallSettings], CypressInstallSettings] | None=None) -> ExecResult

    Install the bundled binary: cypress install.

  • static async verify(ctx: ServiceContext, configure: Callable[[CypressVerifySettings], CypressVerifySettings] | None=None) -> ExecResult

    Verify the installation: cypress verify.

  • static async info(ctx: ServiceContext, configure: Callable[[CypressInfoSettings], CypressInfoSettings] | None=None) -> ExecResult

    Print environment info: cypress info.

#

CypressTestingSettings

class
class CypressTestingSettings(CypressSettings)

Base for the run/open commands, which share testing-type selection, a browser, a config file, and a project path.

  • e2e() -> Self

    Run end-to-end tests (--e2e).

  • component() -> Self

    Run component tests (--component).

  • browser(name: str) -> Self

    Choose the browser, e.g. chrome or electron (--browser).

  • config_file(path: str) -> Self

    Use an explicit config file (--config-file).

  • project(path: str) -> Self

    Run against a project at the given path (--project).

#

CypressVerifySettings

class
class CypressVerifySettings(CypressSettings)

Settings for cypress verify.