eschutho edited a comment on issue #16792:
URL: https://github.com/apache/superset/issues/16792#issuecomment-937319674


   Can we add more explanation to these points so that people reading in the 
future also understand the why: 
   >Usage of waitFor
   Do not use it for elements that can be queried with find
   It should only have one assertion at a time
   
   <hr>
   
   
   Can we instead of discouraging people from using Cypress just relay the 
difference between end-to-end and integration tests? We still need people to 
continue to write end to end tests. :)
   
   <hr>
   
   >Cleaning state
   Cleaning the state of the application, such as resetting the DB, or in 
general, any state that might affect consequent tests should always be done in 
the beforeEach hook and never in the afterEach one as the beforeEach is 
guaranteed to run, while the test might never reach the point to run the 
afterEach hook.
   
   when does the afterEach not run? I think it's better to clean up after 
yourself than after someone else. :)
   <hr>
   
   Another common antipattern is that people will add classes or ids just for 
testing. I know we're talking about using roles and test-ids, etc, but do you 
think we can explicitly discourage adding anything into code for testing except 
for a test-id? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to