diff --git a/cypress/integration/control_attach.js b/cypress/integration/control_attach.js index 726a1ef036..7df17f4d05 100644 --- a/cypress/integration/control_attach.js +++ b/cypress/integration/control_attach.js @@ -118,7 +118,7 @@ context("Attach Control", () => { //Navigating to the new form for the newly created doctype let doctype = "Test Attach Control"; let dt_in_route = doctype.toLowerCase().replace(/ /g, "-"); - cy.visit(`/app/${dt_in_route}/new`, { + cy.visit(`/desk/${dt_in_route}/new`, { onBeforeLoad(win) { // Mock "window.navigator.mediaDevices" property // to return mock mediaDevices object @@ -144,7 +144,7 @@ context("Attach Control", () => { //Navigating to the new form for the newly created doctype let doctype = "Test Attach Control"; let dt_in_route = doctype.toLowerCase().replace(/ /g, "-"); - cy.visit(`/app/${dt_in_route}/new`, { + cy.visit(`/desk/${dt_in_route}/new`, { onBeforeLoad(win) { // Delete "window.navigator.mediaDevices" property delete win.navigator.mediaDevices; diff --git a/cypress/integration/dashboard.js b/cypress/integration/dashboard.js index 21e3f3f789..8d037b44c8 100644 --- a/cypress/integration/dashboard.js +++ b/cypress/integration/dashboard.js @@ -42,7 +42,7 @@ describe("Dashboard view", { scrollBehavior: false }, () => { true ); - cy.visit(`/app/dashboard-view/${dashboard}`); + cy.visit(`/desk/dashboard-view/${dashboard}`); // expect chart to be loaded cy.findByText(chart).should("be.visible"); diff --git a/cypress/integration/dashboard_links.js b/cypress/integration/dashboard_links.js index 627273ea35..842b2ff12e 100644 --- a/cypress/integration/dashboard_links.js +++ b/cypress/integration/dashboard_links.js @@ -27,7 +27,7 @@ context("Dashboard links", () => { cy.visit("/desk/contact"); cy.clear_filters(); - cy.visit(`/app/user/${cy.config("testUser")}`); + cy.visit(`/desk/user/${cy.config("testUser")}`); //To check if initially the dashboard contains only the "Contact" link and there is no counter cy.select_form_tab("Connections"); @@ -40,7 +40,7 @@ context("Dashboard links", () => { cy.findByRole("button", { name: "Add Contact" }).click(); cy.get('[data-doctype="Contact"][data-fieldname="first_name"]').type("Admin"); cy.findByRole("button", { name: "Save" }).click(); - cy.visit(`/app/user/${cy.config("testUser")}`); + cy.visit(`/desk/user/${cy.config("testUser")}`); //To check if the counter for contact doc is "2" after adding additional contact cy.select_form_tab("Connections"); @@ -62,7 +62,7 @@ context("Dashboard links", () => { }); it("Report link in dashboard", () => { - cy.visit(`/app/user/${cy.config("testUser")}`); + cy.visit(`/desk/user/${cy.config("testUser")}`); cy.select_form_tab("Connections"); cy.get('.document-link[data-doctype="Contact"]').contains("Contact"); cy.window() diff --git a/cypress/integration/form_builder.js b/cypress/integration/form_builder.js index 37780eefce..9faa2072d5 100644 --- a/cypress/integration/form_builder.js +++ b/cypress/integration/form_builder.js @@ -20,7 +20,7 @@ context("Form Builder", () => { }); it("Save without change, check form dirty", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); // Save without change @@ -37,7 +37,7 @@ context("Form Builder", () => { it("Check if Filters are applied to the link field", () => { // Visit the Form Builder - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); cy.get("[data-fieldname='gender']").click(); @@ -81,7 +81,7 @@ context("Form Builder", () => { }); it("Add empty section and save", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); let first_section = ".tab-content.active .form-section-container:first"; @@ -97,7 +97,9 @@ context("Form Builder", () => { }); it("Add Table field and check if columns are rendered", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.intercept("POST", "/api/method/frappe.desk.search.search_link").as("search_link"); + + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); let first_column = ".tab-content.active .section-columns-container:first .column:first"; @@ -157,7 +159,7 @@ context("Form Builder", () => { }); // not important and was flaky on CI it.skip("Drag Field/Column/Section & Tab", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); let first_column = ".tab-content.active .section-columns-container:first .column:first"; @@ -218,7 +220,7 @@ context("Form Builder", () => { }); it("Add New Tab/Section/Column to Form", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); let first_section = ".tab-content.active .form-section-container:first"; @@ -261,7 +263,7 @@ context("Form Builder", () => { }); it("Update Title field Label to New Title through Customize Form", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); let first_field = @@ -279,7 +281,7 @@ context("Form Builder", () => { }); it("Validate Duplicate Name & reqd + hidden without default logic", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); let first_column = ".tab-content.active .section-columns-container:first .column:first"; @@ -325,7 +327,7 @@ context("Form Builder", () => { }); it.skip("Undo/Redo", () => { - cy.visit(`/app/doctype/${doctype_name}`); + cy.visit(`/desk/doctype/${doctype_name}`); cy.findByRole("tab", { name: "Form" }).click(); // click on second tab diff --git a/cypress/integration/grid_pagination.js b/cypress/integration/grid_pagination.js index 6a6a3d2d2b..c5763430cc 100644 --- a/cypress/integration/grid_pagination.js +++ b/cypress/integration/grid_pagination.js @@ -70,7 +70,7 @@ context("Grid Pagination", () => { cy.get("@table").find(".current-page-number").should("have.value", "1"); }); // it('deletes all rows', ()=> { - // cy.visit('/app/contact/Test Contact'); + // cy.visit('/desk/contact/Test Contact'); // cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table'); // cy.get('@table').find('.grid-heading-row .grid-row-check').click({force: true}); // cy.get('@table').find('button.grid-remove-all-rows').click(); diff --git a/cypress/integration/relative_time_filters.js b/cypress/integration/relative_time_filters.js index 362d3a219b..8c5aefc9da 100644 --- a/cypress/integration/relative_time_filters.js +++ b/cypress/integration/relative_time_filters.js @@ -4,13 +4,13 @@ // context('Relative Timeframe', () => { // before(() => { // cy.login(); -// cy.visit('/app/website'); +// cy.visit('/desk/website'); // cy.window().its('frappe').then(frappe => { // frappe.call("frappe.tests.ui_test_helpers.create_todo_records"); // }); // }); // it('sets relative timespan filter for last week and filters list', () => { -// cy.visit('/app/List/ToDo/List'); +// cy.visit('/desk/List/ToDo/List'); // cy.clear_filters(); // cy.get('.list-row:contains("this is fourth todo")').should('exist'); // cy.add_filter(); @@ -29,7 +29,7 @@ // cy.wait('@save_user_settings'); // }); // it('sets relative timespan filter for next week and filters list', () => { -// cy.visit('/app/List/ToDo/List'); +// cy.visit('/desk/List/ToDo/List'); // cy.clear_filters(); // cy.get('.list-row:contains("this is fourth todo")').should('exist'); // cy.add_filter(); diff --git a/cypress/integration/report_view.js b/cypress/integration/report_view.js index 8311511e87..25ac7a999e 100644 --- a/cypress/integration/report_view.js +++ b/cypress/integration/report_view.js @@ -21,7 +21,7 @@ context("Report View", () => { it("Field with enabled allow_on_submit should be editable.", () => { cy.intercept("POST", "api/method/frappe.client.set_value").as("value-update"); - cy.visit(`/app/List/${doctype_name}/Report`); + cy.visit(`/desk/List/${doctype_name}/Report`); // check status column added from docstatus cy.get(".dt-row-0 > .dt-cell--col-3").should("contain", "Submitted"); diff --git a/cypress/integration/sidebar.js b/cypress/integration/sidebar.js index aa159dd9c4..72fe152678 100644 --- a/cypress/integration/sidebar.js +++ b/cypress/integration/sidebar.js @@ -1,5 +1,5 @@ const verify_attachment_visibility = (document, is_private) => { - cy.visit(`/app/${document}`); + cy.visit(`/desk/${document}`); const assertion = is_private ? "be.checked" : "not.be.checked"; cy.get(".add-attachment-btn").click(); @@ -60,7 +60,7 @@ context("Sidebar", () => { cy.call("frappe.tests.ui_test_helpers.create_todo_with_attachment_limit", { description: "Sidebar Attachment Access Test ToDo", }).then((todo) => { - cy.visit(`/app/todo/${todo.message.name}`); + cy.visit(`/desk/todo/${todo.message.name}`); attach_file("cypress/fixtures/sample_image.jpg"); cy.get(".explore-link").should("be.visible"); diff --git a/cypress/integration/socket_updates.js b/cypress/integration/socket_updates.js index 4b892d95c7..cb85574f2c 100644 --- a/cypress/integration/socket_updates.js +++ b/cypress/integration/socket_updates.js @@ -13,7 +13,7 @@ context("Realtime updates", () => { it("Shows version conflict warning", { scrollBehavior: false }, () => { cy.insert_doc("ToDo", { description: "old" }).then((doc) => { - cy.visit(`/app/todo/${doc.name}`); + cy.visit(`/desk/todo/${doc.name}`); // make form dirty cy.fill_field("status", "Cancelled", "Select"); diff --git a/cypress/integration/workspace_blocks.js b/cypress/integration/workspace_blocks.js index 842103ec83..589962f344 100644 --- a/cypress/integration/workspace_blocks.js +++ b/cypress/integration/workspace_blocks.js @@ -143,7 +143,7 @@ context("Workspace Blocks", () => { }); it("Number Card Block", () => { - cy.visit("/app/private/test-block-page"); + cy.visit("/desk/private/test-block-page"); cy.create_records([ { doctype: "Number Card", diff --git a/cypress/support/commands.js b/cypress/support/commands.js index b7fa6d1003..8b494a858d 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -263,7 +263,7 @@ Cypress.Commands.add("awesomebar", (text) => { Cypress.Commands.add("new_form", (doctype) => { let dt_in_route = doctype.toLowerCase().replace(/ /g, "-"); - cy.visit(`/app/${dt_in_route}/new`); + cy.visit(`/desk/${dt_in_route}/new`); cy.get("body").should(($body) => { const dataRoute = $body.attr("data-route"); expect(dataRoute).to.match(new RegExp(`^Form/${doctype}/new-${dt_in_route}-`)); @@ -277,7 +277,7 @@ Cypress.Commands.add("select_form_tab", (label) => { Cypress.Commands.add("go_to_list", (doctype) => { let dt_in_route = doctype.toLowerCase().replace(/ /g, "-"); - cy.visit(`/app/${dt_in_route}`); + cy.visit(`/desk/${dt_in_route}`); }); Cypress.Commands.add("clear_cache", () => { diff --git a/frappe/__init__.py b/frappe/__init__.py index f0c299552e..7c20ca44b4 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -1483,9 +1483,9 @@ def get_desk_link(doctype, name, show_title_with_name=False, open_in_new_tab=Fal encoded_name = quote(name) if show_title_with_name and name != title: - html = '{doctype_local} {name}: {title_local}' + html = '{doctype_local} {name}: {title_local}' else: - html = '{doctype_local} {title_local}' + html = '{doctype_local} {title_local}' return html.format( doctype=doctype, diff --git a/frappe/apps.py b/frappe/apps.py index fa43856313..e6eec57126 100644 --- a/frappe/apps.py +++ b/frappe/apps.py @@ -11,8 +11,8 @@ from frappe.core.doctype.installed_applications.installed_applications import ( get_setup_wizard_not_required_apps, ) -# check if route is /app or /app/* and not /app1 or /app1/* -DESK_APP_PATTERN = re.compile(r"^/app(/.*)?$") +# check if route is /desk or /desk/* and not /app1 or /app1/* +DESK_APP_PATTERN = re.compile(r"^/desk(/.*)?$") @frappe.whitelist() diff --git a/frappe/automation/doctype/auto_repeat/auto_repeat.js b/frappe/automation/doctype/auto_repeat/auto_repeat.js index a651b80afa..da86a156f8 100644 --- a/frappe/automation/doctype/auto_repeat/auto_repeat.js +++ b/frappe/automation/doctype/auto_repeat/auto_repeat.js @@ -30,7 +30,7 @@ frappe.ui.form.on("Auto Repeat", { refresh: function (frm) { // auto repeat message if (frm.is_new()) { - let customize_form_link = `${__("Customize Form")}`; + let customize_form_link = `${__("Customize Form")}`; frm.dashboard.set_headline( __('To configure Auto Repeat, enable "Allow Auto Repeat" from {0}.', [ customize_form_link, diff --git a/frappe/core/doctype/deleted_document/deleted_document_list.js b/frappe/core/doctype/deleted_document/deleted_document_list.js index 6a271f5ae9..d3f0843d03 100644 --- a/frappe/core/doctype/deleted_document/deleted_document_list.js +++ b/frappe/core/doctype/deleted_document/deleted_document_list.js @@ -11,7 +11,7 @@ frappe.listview_settings["Deleted Document"] = { if (r.message) { let body = (docnames) => { const html = docnames.map((docname) => { - return `
  • ${docname}
  • `; + return `
  • ${docname}
  • `; }); return "