Update bisq tests to use the menu navigation

This commit is contained in:
Felipe Knorr Kuhn 2021-08-17 13:02:24 -07:00
parent 250ea09c7e
commit 901cee903c

View File

@ -62,20 +62,26 @@ describe('Bisq', () => {
it('shows blocks pagination with 5 pages (desktop)', () => { it('shows blocks pagination with 5 pages (desktop)', () => {
cy.viewport(760, 800); cy.viewport(760, 800);
cy.visit('/bisq/blocks'); cy.visit('/bisq');
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('tbody tr').should('have.length', 10); cy.get('li:nth-of-type(3) > a').click().then(() => {
// 5 pages + 4 buttons = 9 buttons cy.waitForSkeletonGone();
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 9); cy.get('tbody tr').should('have.length', 10);
// 5 pages + 4 buttons = 9 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 9);
});
}); });
it('shows blocks pagination with 3 pages (mobile)', () => { it('shows blocks pagination with 3 pages (mobile)', () => {
cy.viewport(669, 800); cy.viewport(669, 800);
cy.visit('/bisq/blocks'); cy.visit('/bisq');
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('tbody tr').should('have.length', 10); cy.get('li:nth-of-type(3) > a').click().then(() => {
// 3 pages + 4 buttons = 7 buttons cy.waitForSkeletonGone();
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7); cy.get('tbody tr').should('have.length', 10);
// 3 pages + 4 buttons = 7 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7);
});
}); });
}); });