test: Simplify list_view test
This commit is contained in:
parent
0d4574e95b
commit
3667d1ae04
1 changed files with 5 additions and 16 deletions
|
|
@ -13,15 +13,8 @@ context("List View", () => {
|
|||
it("Keep checkbox checked after Refresh", { scrollBehavior: false }, () => {
|
||||
cy.go_to_list("ToDo");
|
||||
cy.clear_filters();
|
||||
cy.get(".list-row-container .list-row-checkbox").click({
|
||||
multiple: true,
|
||||
force: true,
|
||||
});
|
||||
cy.get(".actions-btn-group button").contains("Actions").should("be.visible");
|
||||
cy.intercept("/api/method/frappe.desk.reportview.get").as("list-refresh");
|
||||
cy.wait(3000); // wait before you hit another refresh
|
||||
cy.get('button[data-original-title="Refresh"]').click();
|
||||
cy.wait("@list-refresh");
|
||||
cy.get(".list-header-subject > .list-subject > .list-check-all").click();
|
||||
cy.get("button[data-original-title='Refresh']").click();
|
||||
cy.get(".list-row-container .list-row-checkbox:checked").should("be.visible");
|
||||
});
|
||||
|
||||
|
|
@ -39,11 +32,8 @@ context("List View", () => {
|
|||
];
|
||||
cy.go_to_list("ToDo");
|
||||
cy.clear_filters();
|
||||
cy.get('.list-row-container:contains("Pending") .list-row-checkbox').click({
|
||||
multiple: true,
|
||||
force: true,
|
||||
});
|
||||
cy.get(".actions-btn-group button").contains("Actions").should("be.visible").click();
|
||||
cy.get(".list-header-subject > .list-subject > .list-check-all").click();
|
||||
cy.findByRole("button", { name: "Actions" }).click();
|
||||
cy.get(".dropdown-menu li:visible .dropdown-item")
|
||||
.should("have.length", 9)
|
||||
.each((el, index) => {
|
||||
|
|
@ -56,8 +46,7 @@ context("List View", () => {
|
|||
}).as("bulk-approval");
|
||||
cy.wrap(elements).contains("Approve").click();
|
||||
cy.wait("@bulk-approval");
|
||||
cy.wait(300);
|
||||
cy.get_open_dialog().find(".btn-modal-close").click();
|
||||
cy.hide_dialog();
|
||||
cy.reload();
|
||||
cy.clear_filters();
|
||||
cy.get(".list-row-container:visible").should("contain", "Approved");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue