Custom Should Read Assertion From Cypress-map Plugin @gleb
Custom Should Read Assertion From Cypress-map Plugin  @gleb
Uploaded March 2025 | Updated November 2026, 5 days ago
This video shows a custom "read" assertion that checks the text of a single or multiple elements using strings or regular expressions:
cy.get('li').should('read', [
'Write code',
'Add tests',
/^Pay \$\d+ fine$/,
])
The assertion is part of my "cypress-map" plugin github.com/bahmutov/cypress-map and the full recipe I am showing in this video is at glebbahmutov.com/cypress-examples/recipes/should-read.html
Custom Should Read Assertion From Cypress-map PluginCompare Text In An Element Against Several Possible Values Using oneOf AssertionMock The Location Href PropertyClick And Count Each ElementTest CSS Property :user-invalid Using Cypress E2E TestThe Text Of Each Element Starts With The Given StringLesson 1 From 99 Cypress.io Tips CourseCypress Flaky Test Exercise: Level 5Spy On Constructor FunctionMock But VerifyRefactor A Test: Part OneAdd Page HTML To Fix A Cypress Test Error Using Cursor AI
gleb bahmutov |

Custom Should Read Assertion From Cypress-map Plugin

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER