fix(tests): [Workspace] Fix tests for actions in footer

This commit is contained in:
Rushabh Mehta 2024-07-29 07:58:10 +05:30
parent da3698ba30
commit d545f30b22
2 changed files with 9 additions and 9 deletions

View file

@ -18,7 +18,7 @@ context("Workspace 2.0", () => {
}).as("new_page");
cy.get(".codex-editor__redactor .ce-block");
cy.get('.workspace-footer button[data-label="New"]:visible').click();
cy.get(".btn-new-workspace").click();
cy.fill_field("title", "Test Private Page", "Data");
cy.get_open_dialog().find(".modal-header").click();
cy.get_open_dialog().find(".btn-primary").click();
@ -48,7 +48,7 @@ context("Workspace 2.0", () => {
}).as("new_page");
cy.get(".codex-editor__redactor .ce-block");
cy.get('.workspace-footer button[data-label="New"]:visible').click();
cy.get(".btn-new-workspace").click();
cy.fill_field("title", "Test Child Page", "Data");
cy.fill_field("parent", "Test Private Page", "Select");
cy.get_open_dialog().find(".modal-header").click();
@ -79,7 +79,7 @@ context("Workspace 2.0", () => {
}).as("page_duplicated");
cy.get(".codex-editor__redactor .ce-block");
cy.get(".standard-actions .btn-secondary[data-label=Edit]").click();
cy.get(".standard-actions .btn[data-label=Edit]").click();
cy.get('.sidebar-item-container[item-name="Test Private Page"]').as("sidebar-item");
@ -196,7 +196,7 @@ context("Workspace 2.0", () => {
}).as("hide_page");
cy.get(".codex-editor__redactor .ce-block");
cy.get(".workspace-footer .btn-secondary[data-label=Edit]").click();
cy.get(".btn-edit-workspace").click();
cy.get('.sidebar-item-container[item-name="Duplicate Page"]')
.find(".sidebar-item-control .setting-btn")
@ -217,7 +217,7 @@ context("Workspace 2.0", () => {
}).as("unhide_page");
cy.get(".codex-editor__redactor .ce-block");
cy.get(".workspace-footer .btn-secondary[data-label=Edit]").click();
cy.get(".btn-edit-workspace").click();
cy.get('.sidebar-item-container[item-name="Duplicate Page"]')
.find('[title="Unhide Workspace"]')
@ -237,7 +237,7 @@ context("Workspace 2.0", () => {
}).as("page_deleted");
cy.get(".codex-editor__redactor .ce-block");
cy.get(".workspace-footer .btn-secondary[data-label=Edit]").click();
cy.get(".btn-edit-workspace").click();
cy.get('.sidebar-item-container[item-name="Duplicate Page"]')
.find(".sidebar-item-control .setting-btn")

View file

@ -18,7 +18,7 @@ context("Workspace Blocks", () => {
cy.visit("/app/website");
cy.get(".codex-editor__redactor .ce-block");
cy.get('.workspace-footer button[data-label="New"]:visible').click();
cy.get(".btn-new-workspace").click();
cy.fill_field("title", "Test Block Page", "Data");
cy.get_open_dialog().find(".modal-header").click();
cy.get_open_dialog().find(".btn-primary").click();
@ -71,7 +71,7 @@ context("Workspace Blocks", () => {
}).as("get_doctype");
cy.get(".codex-editor__redactor .ce-block");
cy.get(".standard-actions .btn-secondary[data-label=Edit]").click();
cy.get(".standard-actions .btn[data-label=Edit]").click();
// test quick list creation
cy.get(".ce-block").first().click({ force: true }).type("{enter}");
@ -159,7 +159,7 @@ context("Workspace Blocks", () => {
]);
cy.get(".codex-editor__redactor .ce-block");
cy.get(".workspace-footer .btn[data-label=Edit]").click();
cy.get(".btn-edit-workspace").click();
cy.get(".ce-block").first().click({ force: true }).type("{enter}");
cy.get(".block-list-container .block-list-item").contains("Number Card").click();