Fixture for e2e testing against records mode in Cypress #6584
Labels
refactoring
tests
Improving test coverage and speed
Type: Feature Request
Identifies requests for new features or enhancements. These involve proposing new improvements.
It would be helpful for end-to-end testing if there was an example project to write tests against that's representative of data users would work with in records mode. The suite of food fixtures in the fixtures directory;
food.mini.*
,food.small.*
, etc.; does not respond well to records mode since each row corresponds to one record. Cypress specs inrows_records.cy.js
use such a project with hierarchical data, where many rows correspond to one record. However, this fixture is not accessible to specs in other files because it's stored in a file variable.Proposed solution
Move data in
jsonValue
inrows_records.cy.js
into a fixture so other test files can use this data.Alternatives considered
New tests could define their own records-mode data in the spec. I've done this in the interim with fixture based on Pricerunner dataset.
https://github.com/steve-kasica/OpenRefine/blob/91e975bf03ed10dbfa9545a9a704fa723e8e7cca/main/tests/cypress/cypress/e2e/project/grid/all-column/add-rows.cy.js#L324-L330
But this approach is redundant, and leaving developers to specify their own test data could lead to gaps in test coverage.
Additional context
The text was updated successfully, but these errors were encountered: