test: route to form

Test routing to User form instead of Note
This commit is contained in:
barredterra 2023-03-08 18:21:25 +01:00
parent f3c30065a2
commit cff29e23b0
2 changed files with 7 additions and 14 deletions

View file

@ -215,14 +215,13 @@ context("View", () => {
});
it("Route to Form", () => {
cy.call("frappe.tests.ui_test_helpers.create_note").then(() => {
cy.visit("/app/note/Routing Test");
cy.window()
.its("cur_frm")
.then((frm) => {
expect(frm.doc.title).to.equal("Routing Test");
});
});
const test_user = cy.config("testUser");
cy.visit(`/app/user/${test_user}`);
cy.window()
.its("cur_frm")
.then((frm) => {
expect(frm.doc.name).to.equal(test_user);
});
});
it("Route to Settings Workspace", () => {

View file

@ -535,12 +535,6 @@ def setup_default_view(view, force_reroute=None):
).insert()
@whitelist_for_tests
def create_note():
if not frappe.db.exists("Note", "Routing Test"):
frappe.get_doc({"doctype": "Note", "title": "Routing Test"}).insert()
@whitelist_for_tests
def create_kanban():
if not frappe.db.exists("Custom Field", "Note-kanban"):