fix(tests): [Workspace] Fix tests for actions in footer
This commit is contained in:
parent
76da422081
commit
40557741b2
3 changed files with 15 additions and 9 deletions
|
|
@ -18,7 +18,7 @@ context("Workspace 2.0", () => {
|
|||
}).as("new_page");
|
||||
|
||||
cy.get(".codex-editor__redactor .ce-block");
|
||||
cy.get('.custom-actions button[data-label="Create%20Workspace"]').click();
|
||||
cy.get('.workspace-footer button[data-label="New"]').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('.custom-actions button[data-label="Create%20Workspace"]').click();
|
||||
cy.get('.workspace-footer button[data-label="New"]').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();
|
||||
|
|
@ -196,7 +196,7 @@ context("Workspace 2.0", () => {
|
|||
}).as("hide_page");
|
||||
|
||||
cy.get(".codex-editor__redactor .ce-block");
|
||||
cy.get(".standard-actions .btn-secondary[data-label=Edit]").click();
|
||||
cy.get(".workspace-footer .btn-secondary[data-label=Edit]").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(".standard-actions .btn-secondary[data-label=Edit]").click();
|
||||
cy.get(".workspace-footer .btn-secondary[data-label=Edit]").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(".standard-actions .btn-secondary[data-label=Edit]").click();
|
||||
cy.get(".workspace-footer .btn-secondary[data-label=Edit]").click();
|
||||
|
||||
cy.get('.sidebar-item-container[item-name="Duplicate Page"]')
|
||||
.find(".sidebar-item-control .setting-btn")
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ context("Workspace Blocks", () => {
|
|||
|
||||
cy.visit("/app/website");
|
||||
cy.get(".codex-editor__redactor .ce-block");
|
||||
cy.get('.custom-actions button[data-label="Create%20Workspace"]').click();
|
||||
cy.get('.workspace-footer button[data-label="New"]').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();
|
||||
|
|
|
|||
|
|
@ -382,13 +382,19 @@ frappe.views.Workspace = class Workspace {
|
|||
this.$page = $(`
|
||||
<div id="editorjs" class="desk-page page-main-content"></div>
|
||||
<div class="workspace-footer">
|
||||
<button data-label="New%20Workspace" class="btn btn-default ellipsis btn-new-workspace">
|
||||
New
|
||||
<button data-label="New" class="btn btn-default ellipsis btn-new-workspace">
|
||||
<svg class="es-icon es-line icon-xs" style="" aria-hidden="true">
|
||||
<use class="" href="#es-line-add"></use>
|
||||
</svg>
|
||||
<span class="hidden-xs" data-label="Edit">New</span>
|
||||
</button>
|
||||
<button class="btn btn-secondary btn-default btn-sm mr-2 btn-edit-workspace" data-label="Edit">
|
||||
<svg class="es-icon es-line icon-xs" style="" aria-hidden="true">
|
||||
<use class="" href="#es-line-edit"></use>
|
||||
</svg> <span class="hidden-xs" data-label="Edit"> <span><span class="alt-underline">E</span>dit</span> </span>
|
||||
</svg>
|
||||
<span class="hidden-xs" data-label="Edit">
|
||||
<span><span class="alt-underline">E</span>dit</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
`).appendTo(this.body);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue