You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.4 KiB

  1. context('List Paging', () => {
  2. before(() => {
  3. cy.login();
  4. cy.visit('/app/website');
  5. return cy.window().its('frappe').then(frappe => {
  6. return frappe.call("frappe.tests.ui_test_helpers.create_multiple_todo_records");
  7. });
  8. });
  9. it('test load more with count selection buttons', () => {
  10. cy.visit('/app/todo/view/report');
  11. cy.get('.list-paging-area .list-count').should('contain.text', '20 of');
  12. cy.get('.list-paging-area .btn-more').click();
  13. cy.get('.list-paging-area .list-count').should('contain.text', '40 of');
  14. cy.get('.list-paging-area .btn-more').click();
  15. cy.get('.list-paging-area .list-count').should('contain.text', '60 of');
  16. cy.get('.list-paging-area .btn-group .btn-paging[data-value="100"]').click();
  17. cy.get('.list-paging-area .list-count').should('contain.text', '100 of');
  18. cy.get('.list-paging-area .btn-more').click();
  19. cy.get('.list-paging-area .list-count').should('contain.text', '200 of');
  20. cy.get('.list-paging-area .btn-more').click();
  21. cy.get('.list-paging-area .list-count').should('contain.text', '300 of');
  22. // check if refresh works after load more
  23. cy.get('.page-head .standard-actions [data-original-title="Refresh"]').click();
  24. cy.get('.list-paging-area .list-count').should('contain.text', '300 of');
  25. cy.get('.list-paging-area .btn-group .btn-paging[data-value="500"]').click();
  26. cy.get('.list-paging-area .list-count').should('contain.text', '500 of');
  27. });
  28. });