From fa0a4cc7fcfabf77ce66e3c908c907be41c2c800 Mon Sep 17 00:00:00 2001 From: Walmyr Date: Thu, 18 Jan 2024 00:29:12 +0100 Subject: [PATCH] Add label to unordered list --- src/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index dfc606f..f912fe9 100644 --- a/src/index.html +++ b/src/index.html @@ -226,7 +226,8 @@

To deal with that, Cypress offers the .should('have.length') assertion.

Here's how it works: cy.get('ul li').should('have.length', 5).

This way, you can count how many elements were found for that specific selector, and assert against the number you expect them to be.

-