careful-cpu-45530
10/11/2022, 8:07 AMcy.get cannot find anything in the DOM.
I am new to Cypress, so maybe my assumptions about how thing work are wrong. The code is in the comment.careful-cpu-45530
10/11/2022, 8:07 AM// Check if there are any product collections
Cypress.Commands.add('checkProductCollections', () => {
cy.visit('/products/collections')
cy.get('.css-grid').within(() => {
// Visit each collection and check for products
cy.get('.card__link').each(($el, index, $list) => {
cy.visit($el[0].href)
cy.get('.list-products').within(() => {
cy.get('list-products__product')
})
})
})
})