Closed peterlawless closed 10 months ago
cypress-testing-library
node
npm
yarn
Relevant code or config
// cypress/support/index.ts import { configure } from "@testing-library/cypress"; configure({ testIdAttribute: "data-test-id" });
What you did: Followed the instructions to configure the testIdAttribute.
testIdAttribute
What happened:
The configuration did not work, even after restarting Cypress multiple times. It is still using "data-testid":
"data-testid"
Correction: I moved the configuration into cypress/support/e2e.ts in accordance with documented support file structure and it works now.
cypress/support/e2e.ts
cypress-testing-library
version: 10.0.1node
version: 18.15.0npm
(oryarn
) version: 9.5.0Relevant code or config
What you did: Followed the instructions to configure the
testIdAttribute
.What happened:
The configuration did not work, even after restarting Cypress multiple times. It is still using
"data-testid"
: