Table of Contents

Class CypressExporter

Namespace
Cress.Exporters.Cypress
Assembly
Cress.Exporters.dll

Exports a CressFlow as a Cypress .cy.ts test file. This is a lossy one-way conversion — some locator strategies require Cypress Testing Library plugins (findByRole, findByLabelText, findByTestId).

public sealed class CypressExporter
Inheritance
CypressExporter
Inherited Members

Remarks

Plugin requirements:

  • testId / role / labelRequires @testing-library/cypress
  • xpathRequires cypress-xpath

Locator priority for ui.click and ui.fill:

  1. testId
  2. role + label
  3. label (alone)
  4. text
  5. cssSelector
  6. xpath
  7. automationId (mapped to [id="..."] with comment)

Methods

Export(CressFlow)

Convert flow to a .cy.ts file and return the text.

public string Export(CressFlow flow)

Parameters

flow CressFlow

Returns

string

Export(NormalizedFlow)

Convert a NormalizedFlow to a .cy.ts file and return the text.

public string Export(NormalizedFlow flow)

Parameters

flow NormalizedFlow

Returns

string