fix(test): empty my workspaces before test starts
This commit is contained in:
parent
86d8a3d9b9
commit
0d18a4d00e
2 changed files with 13 additions and 0 deletions
|
|
@ -2,6 +2,12 @@ context("Workspace 2.0", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.visit("/login");
|
cy.visit("/login");
|
||||||
cy.login();
|
cy.login();
|
||||||
|
return cy
|
||||||
|
.window()
|
||||||
|
.its("frappe")
|
||||||
|
.then((frappe) => {
|
||||||
|
return frappe.xcall("frappe.tests.ui_test_helpers.empty_my_workspaces");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Navigate to page from sidebar", () => {
|
it("Navigate to page from sidebar", () => {
|
||||||
|
|
|
||||||
|
|
@ -650,3 +650,10 @@ def slow_task(duration, title, doctype, docname):
|
||||||
for i in range(steps + 1):
|
for i in range(steps + 1):
|
||||||
frappe.publish_progress(i * 10, title=title, doctype=doctype, docname=docname)
|
frappe.publish_progress(i * 10, title=title, doctype=doctype, docname=docname)
|
||||||
time.sleep(int(duration) / steps)
|
time.sleep(int(duration) / steps)
|
||||||
|
|
||||||
|
|
||||||
|
@whitelist_for_tests
|
||||||
|
def empty_my_workspaces():
|
||||||
|
my_workspaces = frappe.get_doc("Workspace Sidebar", "My Workspaces")
|
||||||
|
my_workspaces.items = []
|
||||||
|
my_workspaces.save()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue