test: update tests for ui changes

- update selectors
- remove color check code
This commit is contained in:
Ankush Menat 2023-09-18 21:10:16 +05:30
parent 1ebbbc772e
commit 6939a24d43
4 changed files with 4 additions and 8 deletions

View file

@ -101,10 +101,6 @@ context("Form", () => {
cy.get("@email_input2").type(valid_email, { waitForAnimations: false }); cy.get("@email_input2").type(valid_email, { waitForAnimations: false });
cy.get("@row1").click(); cy.get("@row1").click();
cy.get("@email_input1").should(($div) => {
const style = window.getComputedStyle($div[0]);
expect(style.backgroundColor).to.equal(expectBackgroundColor);
});
cy.get("@email_input1").should("have.class", "invalid"); cy.get("@email_input1").should("have.class", "invalid");
cy.get("@row2").click(); cy.get("@row2").click();

View file

@ -29,7 +29,7 @@ context("List Paging", () => {
cy.get(".list-paging-area .list-count").should("contain.text", "300 of"); cy.get(".list-paging-area .list-count").should("contain.text", "300 of");
// check if refresh works after load more // check if refresh works after load more
cy.get('.page-head .standard-actions [data-original-title="Refresh"]').click(); cy.get('.page-head .standard-actions [data-original-title="Reload List"]').click();
cy.get(".list-paging-area .list-count").should("contain.text", "300 of"); cy.get(".list-paging-area .list-count").should("contain.text", "300 of");
cy.get('.list-paging-area .btn-group .btn-paging[data-value="500"]').click(); cy.get('.list-paging-area .btn-group .btn-paging[data-value="500"]').click();

View file

@ -14,7 +14,7 @@ context("List View", () => {
cy.go_to_list("ToDo"); cy.go_to_list("ToDo");
cy.clear_filters(); cy.clear_filters();
cy.get(".list-header-subject > .list-subject > .list-check-all").click(); cy.get(".list-header-subject > .list-subject > .list-check-all").click();
cy.get("button[data-original-title='Refresh']").click(); cy.get("button[data-original-title='Reload List']").click();
cy.get(".list-row-container .list-row-checkbox:checked").should("be.visible"); cy.get(".list-row-container .list-row-checkbox:checked").should("be.visible");
}); });

View file

@ -15,7 +15,7 @@ context("List View Settings", () => {
cy.clear_filters(); cy.clear_filters();
cy.wait(300); cy.wait(300);
cy.get(".list-count").should("contain", "20 of"); cy.get(".list-count").should("contain", "20 of");
cy.get("[href='#icon-small-message']").should("be.visible"); cy.get("[href='#es-line-chat-alt']").should("be.visible");
cy.get(".menu-btn-group button").click(); cy.get(".menu-btn-group button").click();
cy.get(".dropdown-menu li").filter(":visible").contains("List Settings").click(); cy.get(".dropdown-menu li").filter(":visible").contains("List Settings").click();
cy.get(".modal-dialog").should("contain", "DocType Settings"); cy.get(".modal-dialog").should("contain", "DocType Settings");
@ -29,7 +29,7 @@ context("List View Settings", () => {
cy.get(".list-count").should("be.empty"); cy.get(".list-count").should("be.empty");
cy.get(".list-sidebar .list-tags").should("not.exist"); cy.get(".list-sidebar .list-tags").should("not.exist");
cy.get("[href='#icon-small-message']").should("not.be.visible"); cy.get("[href='#es-line-chat-alt']").should("not.be.visible");
cy.get(".menu-btn-group button").click({ force: true }); cy.get(".menu-btn-group button").click({ force: true });
cy.get(".dropdown-menu li").filter(":visible").contains("List Settings").click(); cy.get(".dropdown-menu li").filter(":visible").contains("List Settings").click();