Conditional Details @gleb
Conditional Details  @gleb
Uploaded August 2025 | Updated November 2026, 14 minutes ago
This video shows an example of conditional testing:
- if the details element is open, close it and confirm the text is removed from DOM
- if the details element is closed, open it and confirm the text is visible to the user
Find the full recipe at glebbahmutov.com/cypress-examples
Conditional DetailsThe Difference Between Cypress Commands cy.find And cy.filterCustom Cypress HTML Should Look AssertionConditional Count Elements After They Have Been LoadedCompare Two Lists Of Elements ExamplesRequired Input AttributesTest Element Overflow Using A Custom Cypress Chai Assertion99% Code Coverage In 9 MinutesGet All Elements Without The Given HTML AttributeCustom Should Read Assertion From Cypress-map PluginCompare Text In An Element Against Several Possible Values Using oneOf AssertionMock The Location Href Property
gleb bahmutov |

Conditional Details

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER