From cff29e23b0aee1198120f1b415af26db53f8af17 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Wed, 8 Mar 2023 18:21:25 +0100 Subject: [PATCH] test: route to form Test routing to User form instead of Note --- cypress/integration/view_routing.js | 15 +++++++-------- frappe/tests/ui_test_helpers.py | 6 ------ 2 files changed, 7 insertions(+), 14 deletions(-) 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"):