diff --git a/cypress/integration/api.js b/cypress/integration/api.js index 2279dc399d..cd91c8fae4 100644 --- a/cypress/integration/api.js +++ b/cypress/integration/api.js @@ -2,7 +2,7 @@ context('API Resources', () => { before(() => { cy.visit('/login'); cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); it('Creates two Comments', () => { diff --git a/cypress/integration/awesome_bar.js b/cypress/integration/awesome_bar.js index 15e85976fc..dd56ca33f7 100644 --- a/cypress/integration/awesome_bar.js +++ b/cypress/integration/awesome_bar.js @@ -2,7 +2,7 @@ context('Awesome Bar', () => { before(() => { cy.visit('/login'); cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); beforeEach(() => { @@ -16,7 +16,7 @@ context('Awesome Bar', () => { cy.get('h1').should('contain', 'To Do'); - cy.location('hash').should('eq', '#List/ToDo/List'); + cy.location('hash').should('eq', '/app/List/ToDo/List'); }); it('find text in doctype list', () => { diff --git a/cypress/integration/control_barcode.js b/cypress/integration/control_barcode.js index 4e05d864e6..ea26f446f4 100644 --- a/cypress/integration/control_barcode.js +++ b/cypress/integration/control_barcode.js @@ -1,7 +1,7 @@ context('Control Barcode', () => { beforeEach(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); function get_dialog_with_barcode() { diff --git a/cypress/integration/control_duration.js b/cypress/integration/control_duration.js index edad759216..fae207890f 100644 --- a/cypress/integration/control_duration.js +++ b/cypress/integration/control_duration.js @@ -1,7 +1,7 @@ context('Control Duration', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); function get_dialog_with_duration(hide_days=0, hide_seconds=0) { diff --git a/cypress/integration/control_link.js b/cypress/integration/control_link.js index 0dc7d5b88e..248271453b 100644 --- a/cypress/integration/control_link.js +++ b/cypress/integration/control_link.js @@ -1,11 +1,11 @@ context('Control Link', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); beforeEach(() => { - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); cy.create_records({ doctype: 'ToDo', description: 'this is a test todo for link' @@ -77,7 +77,7 @@ context('Control Link', () => { cy.get('.frappe-control[data-fieldname=link] .link-btn') .should('be.visible') .click(); - cy.location('hash').should('eq', `#Form/ToDo/${todos[0]}`); + cy.location('hash').should('eq', `/app/Form/ToDo/${todos[0]}`); }); }); }); diff --git a/cypress/integration/control_rating.js b/cypress/integration/control_rating.js index e89ab2d3be..c1e308860e 100644 --- a/cypress/integration/control_rating.js +++ b/cypress/integration/control_rating.js @@ -1,7 +1,7 @@ context('Control Rating', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); function get_dialog_with_rating() { diff --git a/cypress/integration/datetime.js b/cypress/integration/datetime.js index 9bf01632bf..7a9f51fb0d 100644 --- a/cypress/integration/datetime.js +++ b/cypress/integration/datetime.js @@ -4,7 +4,7 @@ const doctype_name = datetime_doctype.name; context('Control Date, Time and DateTime', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); return cy.insert_doc('DocType', datetime_doctype, true); }); diff --git a/cypress/integration/depends_on.js b/cypress/integration/depends_on.js index 93417014c5..919323dcc3 100644 --- a/cypress/integration/depends_on.js +++ b/cypress/integration/depends_on.js @@ -1,7 +1,7 @@ context('Depends On', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); return cy.window().its('frappe').then(frappe => { return frappe.call('frappe.tests.ui_test_helpers.create_doctype', { name: 'Test Depends On', diff --git a/cypress/integration/file_uploader.js b/cypress/integration/file_uploader.js index f9f44675db..4186141870 100644 --- a/cypress/integration/file_uploader.js +++ b/cypress/integration/file_uploader.js @@ -1,7 +1,7 @@ context('FileUploader', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); function open_upload_dialog() { diff --git a/cypress/integration/form.js b/cypress/integration/form.js index ef89a18e7d..d804ec8d99 100644 --- a/cypress/integration/form.js +++ b/cypress/integration/form.js @@ -1,13 +1,13 @@ context('Form', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); return cy.window().its('frappe').then(frappe => { return frappe.call("frappe.tests.ui_test_helpers.create_contact_records"); }); }); it('create a new form', () => { - cy.visit('/desk#Form/ToDo/New ToDo 1'); + cy.visit('/app/Form/ToDo/New ToDo 1'); cy.fill_field('description', 'this is a test todo', 'Text Editor').blur(); cy.wait(300); cy.get('.page-title').should('contain', 'Not Saved'); @@ -18,20 +18,20 @@ context('Form', () => { }).as('form_save'); cy.get('.primary-action').click(); cy.wait('@form_save').its('status').should('eq', 200); - cy.visit('/desk#List/ToDo'); - cy.location('hash').should('eq', '#List/ToDo/List'); + cy.visit('/app/List/ToDo'); + cy.location('hash').should('eq', '/app/List/ToDo/List'); cy.get('h1').should('be.visible').and('contain', 'To Do'); cy.get('.list-row').should('contain', 'this is a test todo'); }); it('navigates between documents with child table list filters applied', () => { - cy.visit('/desk#List/Contact'); - cy.location('hash').should('eq', '#List/Contact/List'); + cy.visit('/app/List/Contact'); + cy.location('hash').should('eq', '/app/List/Contact/List'); cy.get('.tag-filters-area .btn:contains("Add Filter")').click(); cy.get('.fieldname-select-area').should('exist'); cy.get('.fieldname-select-area input').type('Number{enter}', { force: true }); cy.get('.filter-field .input-with-feedback.form-control').type('123', { force: true }); cy.get('.filter-box .btn:contains("Apply")').click({ force: true }); - cy.visit('/desk#Form/Contact/Test Form Contact 3'); + cy.visit('/app/Form/Contact/Test Form Contact 3'); cy.get('.prev-doc').should('be.visible').click(); cy.get('.msgprint-dialog .modal-body').contains('No further records').should('be.visible'); cy.get('.btn-modal-close:visible').click(); @@ -50,7 +50,7 @@ context('Form', () => { let website_input = 'website.in'; let expectBackgroundColor = 'rgb(255, 220, 220)'; - cy.visit('/desk#Form/Contact/New Contact 1'); + cy.visit('/app/Form/Contact/New Contact 1'); cy.get('.frappe-control[data-fieldname="email_ids"]').as('table'); cy.get('@table').find('button.grid-add-row').click(); cy.get('.grid-body .rows [data-fieldname="email_id"]').click(); diff --git a/cypress/integration/grid_pagination.js b/cypress/integration/grid_pagination.js index b383f30bb8..7142dce131 100644 --- a/cypress/integration/grid_pagination.js +++ b/cypress/integration/grid_pagination.js @@ -1,24 +1,24 @@ context('Grid Pagination', () => { beforeEach(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); return cy.window().its('frappe').then(frappe => { return frappe.call("frappe.tests.ui_test_helpers.create_contact_phone_nos_records"); }); }); it('creates pages for child table', () => { - cy.visit('/desk#Form/Contact/Test Contact'); + cy.visit('/app/Form/Contact/Test Contact'); cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table'); cy.get('@table').find('.current-page-number').should('contain', '1'); cy.get('@table').find('.total-page-number').should('contain', '20'); cy.get('@table').find('.grid-body .grid-row').should('have.length', 50); }); it('goes to the next and previous page', () => { - cy.visit('/desk#Form/Contact/Test Contact'); + cy.visit('/app/Form/Contact/Test Contact'); cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table'); cy.get('@table').find('.next-page').click(); cy.get('@table').find('.current-page-number').should('contain', '2'); @@ -28,7 +28,7 @@ context('Grid Pagination', () => { cy.get('@table').find('.grid-body .grid-row').first().should('have.attr', 'data-idx', '1'); }); it('adds and deletes rows and changes page', ()=> { - cy.visit('/desk#Form/Contact/Test Contact'); + cy.visit('/app/Form/Contact/Test Contact'); cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table'); cy.get('@table').find('button.grid-add-row').click(); cy.get('@table').find('.grid-body .row-index').should('contain', 1001); @@ -41,7 +41,7 @@ context('Grid Pagination', () => { cy.get('@table').find('.total-page-number').should('contain', '20'); }); // it('deletes all rows', ()=> { - // cy.visit('/desk#Form/Contact/Test Contact'); + // cy.visit('/app/Form/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/list_view.js b/cypress/integration/list_view.js index 0d26ca90a2..bb93d320bb 100644 --- a/cypress/integration/list_view.js +++ b/cypress/integration/list_view.js @@ -1,7 +1,7 @@ context('List View', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); return cy.window().its('frappe').then(frappe => { return frappe.xcall("frappe.tests.ui_test_helpers.setup_workflow"); }); diff --git a/cypress/integration/list_view_settings.js b/cypress/integration/list_view_settings.js index 47f8efe94b..5979185dcf 100644 --- a/cypress/integration/list_view_settings.js +++ b/cypress/integration/list_view_settings.js @@ -1,16 +1,16 @@ context('List View Settings', () => { beforeEach(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); it('Default settings', () => { - cy.visit('/desk#List/DocType/List'); + cy.visit('/app/List/DocType/List'); cy.get('.list-count').should('contain', "20 of"); cy.get('.sidebar-stat').should('contain', "Tags"); }); it('disable count and sidebar stats then verify', () => { cy.wait(300); - cy.visit('/desk#List/DocType/List'); + cy.visit('/app/List/DocType/List'); cy.wait(300); cy.get('.list-count').should('contain', "20 of"); cy.get('button').contains('Menu').click(); diff --git a/cypress/integration/login.js b/cypress/integration/login.js index 861377444c..e8964768b0 100644 --- a/cypress/integration/login.js +++ b/cypress/integration/login.js @@ -35,7 +35,7 @@ context('Login', () => { cy.get('#login_password').type(Cypress.config('adminPassword')); cy.get('.btn-login').click(); - cy.location('pathname').should('eq', '/desk'); + cy.location('pathname').should('eq', '/app'); cy.window().its('frappe.session.user').should('eq', 'Administrator'); }); diff --git a/cypress/integration/query_report.js b/cypress/integration/query_report.js index 5581a20edc..b06295495a 100644 --- a/cypress/integration/query_report.js +++ b/cypress/integration/query_report.js @@ -1,11 +1,11 @@ context('Query Report', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); }); it('add custom column in report', () => { - cy.visit('/desk#query-report/Permitted Documents For User'); + cy.visit('/app#query-report/Permitted Documents For User'); cy.get('div[class="page-form flex"]', {timeout: 60000}).should('have.length', 1).then(()=>{ cy.get('#page-query-report input[data-fieldname="user"]').as('input'); diff --git a/cypress/integration/recorder.js b/cypress/integration/recorder.js index a0f8cc3621..e89621d936 100644 --- a/cypress/integration/recorder.js +++ b/cypress/integration/recorder.js @@ -4,14 +4,14 @@ context('Recorder', () => { }); it('Navigate to Recorder', () => { - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); cy.awesomebar('recorder'); cy.get('h1').should('contain', 'Recorder'); cy.location('hash').should('eq', '#recorder'); }); it('Recorder Empty State', () => { - cy.visit('/desk#recorder'); + cy.visit('/app#recorder'); cy.get('.title-text').should('contain', 'Recorder'); cy.get('.indicator').should('contain', 'Inactive').should('have.class', 'red'); @@ -24,21 +24,21 @@ context('Recorder', () => { }); it('Recorder Start', () => { - cy.visit('/desk#recorder'); + cy.visit('/app#recorder'); cy.get('.primary-action').should('contain', 'Start').click(); cy.get('.indicator').should('contain', 'Active').should('have.class', 'green'); cy.get('.msg-box').should('contain', 'No Requests'); cy.server(); - cy.visit('/desk#List/DocType/List'); + cy.visit('/app/List/DocType/List'); cy.route('POST', '/api/method/frappe.desk.reportview.get').as('list_refresh'); cy.wait('@list_refresh'); cy.get('.title-text').should('contain', 'DocType'); cy.get('.list-count').should('contain', '20 of '); - cy.visit('/desk#recorder'); + cy.visit('/app#recorder'); cy.get('.title-text').should('contain', 'Recorder'); cy.get('.result-list').should('contain', '/api/method/frappe.desk.reportview.get'); @@ -48,11 +48,11 @@ context('Recorder', () => { }); it('Recorder View Request', () => { - cy.visit('/desk#recorder'); + cy.visit('/app#recorder'); cy.get('.primary-action').should('contain', 'Start').click(); cy.server(); - cy.visit('/desk#List/DocType/List'); + cy.visit('/app/List/DocType/List'); cy.route('POST', '/api/method/frappe.desk.reportview.get').as('list_refresh'); cy.wait('@list_refresh'); @@ -62,7 +62,7 @@ context('Recorder', () => { // temporarily commenting out theses tests as they seem to be // randomly failing maybe due a backround event - // cy.visit('/desk#recorder'); + // cy.visit('/app#recorder'); // cy.get('.list-row-container span').contains('/api/method/frappe').click(); diff --git a/cypress/integration/relative_time_filters.js b/cypress/integration/relative_time_filters.js index ac70c44345..c13c2bbb5e 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('/desk#workspace/Website'); + cy.visit('/app#workspace/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('/desk#List/ToDo/List'); + cy.visit('/app/List/ToDo/List'); cy.get('.list-row:contains("this is fourth todo")').should('exist'); cy.get('.tag-filters-area .btn:contains("Add Filter")').click(); cy.get('.fieldname-select-area').should('exist'); @@ -29,7 +29,7 @@ context('Relative Timeframe', () => { cy.wait('@save_user_settings'); }); it('sets relative timespan filter for next week and filters list', () => { - cy.visit('/desk#List/ToDo/List'); + cy.visit('/app/List/ToDo/List'); cy.get('.list-row:contains("this is fourth todo")').should('exist'); cy.get('.tag-filters-area .btn:contains("Add Filter")').click(); cy.get('.fieldname-select-area input').type("Due Date{enter}", { delay: 100 }); diff --git a/cypress/integration/report_view.js b/cypress/integration/report_view.js index deeef6bdd5..af84c44cdc 100644 --- a/cypress/integration/report_view.js +++ b/cypress/integration/report_view.js @@ -4,7 +4,7 @@ const doctype_name = custom_submittable_doctype.name; context('Report View', () => { before(() => { cy.login(); - cy.visit('/desk#workspace/Website'); + cy.visit('/app#workspace/Website'); cy.insert_doc('DocType', custom_submittable_doctype, true); cy.clear_cache(); cy.insert_doc(doctype_name, { @@ -18,7 +18,7 @@ context('Report View', () => { it('Field with enabled allow_on_submit should be editable.', () => { cy.server(); cy.route('POST', 'api/method/frappe.client.set_value').as('value-update'); - cy.visit(`/desk#List/${doctype_name}/Report`); + cy.visit(`/app/List/${doctype_name}/Report`); // check status column added from docstatus cy.get('.dt-row-0 > .dt-cell--col-3').should('contain', 'Submitted'); let cell = cy.get('.dt-row-0 > .dt-cell--col-4'); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 7816d5526f..c3f2deed20 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -210,13 +210,13 @@ Cypress.Commands.add('awesomebar', text => { Cypress.Commands.add('new_form', doctype => { let route = `Form/${doctype}/New ${doctype} 1`; - cy.visit(`/desk#${route}`); + cy.visit(`/app#${route}`); cy.get('body').should('have.attr', 'data-route', route); cy.get('body').should('have.attr', 'data-ajax-state', 'complete'); }); Cypress.Commands.add('go_to_list', doctype => { - cy.visit(`/desk#List/${doctype}/List`); + cy.visit(`/app/List/${doctype}/List`); }); Cypress.Commands.add('clear_cache', () => { diff --git a/frappe/__init__.py b/frappe/__init__.py index fac0927428..52869be3dc 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -1611,7 +1611,7 @@ def log_error(message=None, title=_("Error")): method=title)).insert(ignore_permissions=True) def get_desk_link(doctype, name): - html = '{doctype_local} {name}' + html = '{doctype_local} {name}' return html.format( doctype=doctype, name=name, diff --git a/frappe/auth.py b/frappe/auth.py index 3b18c8adb9..3f2e12b416 100644 --- a/frappe/auth.py +++ b/frappe/auth.py @@ -167,7 +167,7 @@ class LoginManager: frappe.local.cookie_manager.set_cookie("system_user", "yes") if not resume: frappe.local.response['message'] = 'Logged In' - frappe.local.response["home_page"] = "/desk" + frappe.local.response["home_page"] = "/app" if not resume: frappe.response["full_name"] = self.full_name diff --git a/frappe/automation/doctype/auto_repeat/auto_repeat.js b/frappe/automation/doctype/auto_repeat/auto_repeat.js index 456061ee0b..7d6bf69e3d 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 f5e1147dfb..81a8992a19 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) { function body(docnames) { const html = docnames.map(docname => { - return `
{}
'.format(frappe.bold(doctype)) for doc in docs: - html += ''.format(doctype=doctype, doc=doc) + html += ''.format(doctype=doctype, doc=doc) html += '