diff --git a/tests/cypress/integration/admin.test.js b/tests/cypress/integration/admin.test.js index 315d52a..8b139d3 100644 --- a/tests/cypress/integration/admin.test.js +++ b/tests/cypress/integration/admin.test.js @@ -22,4 +22,19 @@ describe('Admin can login and make sure plugin is activated', () => { cy.visit('/wp-admin/edit.php?post_type=page'); cy.get('.subsubsub .byorder').should('have.text', 'Sort by Order'); }); + + it('Pagination is visible when Clicking "Sort by Order"', () => { + cy.login(); + cy.visit( '/wp-admin/edit.php?post_type=page' ); + cy.get( '#show-settings-link' ).click(); + cy.get( '#edit_page_per_page' ).clear().type( '2' ); + cy.get( '#screen-options-apply' ).click(); + cy.get( '.byorder' ).click(); + cy.get( '.pagination-links' ).should( 'be.visible' ); + + // Restore default pagination. + cy.get( '#show-settings-link' ).click(); + cy.get( '#edit_page_per_page' ).clear().type( '10' ); + cy.get( '#screen-options-apply' ).click(); + }); });