Skip to content

Latest commit

 

History

History
43 lines (39 loc) · 2.02 KB

File metadata and controls

43 lines (39 loc) · 2.02 KB

Getting Started

Best Practices

  • Each it() should be its own atomic test (run independently of other tests). Each it() should likely start with cy.visit() or nav to page
  • We are switching over our test ids from < ... data-test-id=".."/> to using the Cypress preferred < ... data-test=".."/>. This allows us to better take advantage of certain Cypress tooling, like the Selector Playground
  • Use Cypress's Best Practices for Selecting Elements

Directory Structure

frontend/packages/integration-tests-cypress/
├── support    <--- add commands to Cypress 'cy.' global, other support configurations
│   ├── index.ts
│   ├── nav.ts
│   ├── project.ts
│   ├── README.md
│   └── selectors.ts
├── fixtures                <--- mock data
│   └── example.json
├── plugins
│   └── index.js            <--- webpack-preprocessor, enviornment variables, baseUrl, custom tasks
├── tests                   <--- test suites
│   ├── crud
│   │   └── namespace-crud.cy.ts
│   └── monitoring
│       └── monitoring.cy.ts
└── views                   <--- helper objects containing assertions and commands
    ├── details-page.ts
    ├── list-page.ts
    ├── form.ts
    └── modal.ts

Additional Resources