cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

Documentation examples should follow best practices

Open marcandre opened this issue 3 years ago • 1 comments

In particular, selecting arguments by ID/class is explicitly recommended to be used only "sparingly", yet many examples, including the best practices use those.

Docs should follow best practices and always use contains or get("[data-attr-cy='...']") where appropriate.

marcandre avatar Nov 23 '21 22:11 marcandre

  1. Using IDs or classes in the examples should be updated for consistency with data-*, per the best practices docs. API pages need to be addressed.
  2. There is a larger conversation kicking off to revise the best practice docs around selectors to consider things like cy.contains() in examples, accessibility (using aria roles,labels,etc) and RTL style selectors.

jaffrepaul avatar May 04 '22 21:05 jaffrepaul

This seems to have been addressed

jennifer-shehane avatar Apr 25 '24 01:04 jennifer-shehane