Skip to content

Commit

Permalink
add E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Sep 29, 2023
1 parent e3cf23d commit d34a596
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/cypress/integration/admin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});

0 comments on commit d34a596

Please sign in to comment.