I am new to Cypress and I have written a simple test:
/// <reference types="Cypress" />
describe('brand workflow', () => {
it('List brands', () => {
cy.login().then(() => {
cy.visit('/brands');
cy.listBrands().then(() => {
// TODO: Test the table functions
cy.get('[data-cy=data-table-row]').should('have.length', '25');
cy.contains('[data-cy=pagination]', '50').click();
cy.get('[data-cy=data-table-row]').should('have.length', '50');
cy.contains('[data-cy=pagination]', 'All').click();
cy.get('[data-cy=data-table-row]').should('have.length.greaterThan', '50');
});
});
});
});
Everything works up to this line cy.get('[data-cy=data-table-row]').should('have.length.greaterThan', '50'); which throws this error:
Does anyone know why this is happening?
