Use Sanity Assertions @gleb
Use Sanity Assertions  @gleb
Uploaded January 2024 | Updated September 2026, 1 week ago
This video shows how to compare two numbers shown on the page. There are few different cases I consider:
- two static numbers
- a number could be a NaN
- numbers are loaded dynamically
- why negative assertions are dangerous
- using known data
Find the full source code at glebbahmutov.com/cypress-examples/recipes/use-sanity-assertions.html
Use Sanity AssertionsCypress Custom Commands With Multiple DOM SnapshotsAdd Number Of Team Players Cypress Plus Cursor ExampleRefactor A Test Part 3: Checking A Paginated ListRun Tests Separately Using cypress-magic-backend Playback ModeQwik Framework IntroductionCheck Multiple Properties At Once Using cy.difference QueryCase-Insensitive Query With Retriescy.root Command ExampleVertical CenterRefactor Cypress Api Tests Part 3: Use cypress-mapCypress-diff Plugin Demo
gleb bahmutov |

Use Sanity Assertions

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER