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.

list_paging.js 1.6 KiB

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