From the course: Advanced Cypress
Unlock this course with a free trial
Join today to access over 23,200 courses taught by industry experts.
How to use assertions in Cypress - Cypress Tutorial
From the course: Advanced Cypress
How to use assertions in Cypress
Welcome back. In this video, we're going to talk about assertions in Cypress. So just ways of checking that things are appearing the way that they should appear or behaving the way that they are expected to behave. So the learning goals for this video are to identify and use common Cypress assertions, and then also understanding when assertions happen by default. So like we've seen in previous topics, Cypress handles a lot of things, kind of, behind the scenes by default. And this is also true with assertions where some assertions just, kind of, happen out of the box based on the action that you're taking. So let's go ahead and dive in. Before we dive into the actual code, I wanted to point out this Assertions page on Cypress's documentation section of their website. You might see some familiar looking ways of writing tests from other libraries like Chai. All of this stuff is built in to Cypress, which is super helpful if you're familiar with these other testing libraries, you'll see…
Contents
-
-
-
(Locked)
GET and FIND command hacks20m 5s
-
(Locked)
How to install Cypress plugin and set environment variables17m 52s
-
(Locked)
How to handle Cypress async commands12m 10s
-
How to handle non-Cypress async promises11m
-
(Locked)
How to use assertions in Cypress9m 45s
-
(Locked)
How to write tests with Cypress UI commands15m 41s
-
(Locked)
What are Cypress hooks?11m 54s
-
(Locked)
What are Cypress fixtures?16m 56s
-
(Locked)
What are Cypress custom commands?16m 53s
-
(Locked)
What are Cypress mouse commands?14m 13s
-
(Locked)
What are Cypress actions?10m 14s
-
(Locked)
Perform cross-browser testing on Cloud14m 25s
-
(Locked)