diff --git a/cypress/integration/view_routing.js b/cypress/integration/view_routing.js index 9267974154..72fb6836ec 100644 --- a/cypress/integration/view_routing.js +++ b/cypress/integration/view_routing.js @@ -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", () => { diff --git a/frappe/tests/ui_test_helpers.py b/frappe/tests/ui_test_helpers.py index 26d6b2d5da..b153181b27 100644 --- a/frappe/tests/ui_test_helpers.py +++ b/frappe/tests/ui_test_helpers.py @@ -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"):