test: fix failing test of listview settings
This commit is contained in:
parent
f5816b9b31
commit
d95b20e970
1 changed files with 13 additions and 7 deletions
|
|
@ -2,18 +2,24 @@ context("List View Settings", () => {
|
|||
beforeEach(() => {
|
||||
cy.login();
|
||||
cy.visit("/desk/website");
|
||||
cy.visit("/desk/List/DocType/List");
|
||||
cy.wait(300);
|
||||
cy.clear_filters();
|
||||
cy.wait(300);
|
||||
cy.get(".menu-btn-group button").click({ force: true });
|
||||
cy.get(".dropdown-menu li").filter(":visible").contains("List Settings").click();
|
||||
cy.get(".modal-dialog").should("contain", "DocType List View Settings");
|
||||
cy.findByLabelText("Disable Count").uncheck({ force: true });
|
||||
cy.findByLabelText("Disable Comment Count").uncheck({ force: true });
|
||||
cy.findByLabelText("Disable Sidebar Stats").uncheck({ force: true });
|
||||
cy.findByRole("button", { name: "Save" }).click();
|
||||
cy.reload({ force: true });
|
||||
});
|
||||
it("Default settings", () => {
|
||||
cy.visit("/desk/List/DocType/List");
|
||||
cy.clear_filters();
|
||||
cy.get(".list-count").should("contain", "20 of");
|
||||
cy.get(".list-stats").should("contain", "Tags");
|
||||
});
|
||||
it("disable count and sidebar stats then verify", () => {
|
||||
cy.wait(300);
|
||||
cy.visit("/desk/List/DocType/List");
|
||||
cy.clear_filters();
|
||||
cy.wait(300);
|
||||
cy.get(".list-count").should("contain", "20 of");
|
||||
cy.get(".frappe-list svg.es-icon.es-line").should("be.visible");
|
||||
cy.get(".menu-btn-group button").click();
|
||||
|
|
@ -29,7 +35,7 @@ context("List View Settings", () => {
|
|||
|
||||
cy.get(".list-count").should("be.empty");
|
||||
cy.get(".list-sidebar .list-tags").should("not.exist");
|
||||
cy.get("[href='#es-line-chat-alt']").should("not.be.visible");
|
||||
cy.get("[href='#es-line-chat-alt']").should("not.exist");
|
||||
|
||||
cy.get(".menu-btn-group button").click({ force: true });
|
||||
cy.get(".dropdown-menu li").filter(":visible").contains("List Settings").click();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue