let countOfElements = 0;
cy.get(".element-selector").then($elements => {
countOfElements = $elements.length;
});
cy.get('#id_value').should('have.length', 7)
// Check that element has length of 7
cy.get('.listings-grid')
.find('.listing')
.then(listing => {
const listingCount = Cypress.$(listing).length;
expect(listing).to.have.length(listingCount);
});
cy.get('[data-testhook-id="accordion-body-item"] > div > div').its('length').then((size) => {
cy.get('[data-testhook-id="accordion-body-item"] > div > div:nth-child(' + size + ')').find('svg').should('have.attr', 'data-testhook-id', 'icon-active-version')
});