From 372b64709bc084937c8ecc6f0417c3d165129ac4 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 2 Mar 2020 19:11:32 +0530 Subject: [PATCH] refactor: set base desk url for cypress tests --- cypress/integration/api.js | 2 +- cypress/integration/awesome_bar.js | 2 +- cypress/integration/control_barcode.js | 2 +- cypress/integration/control_link.js | 2 +- cypress/integration/control_rating.js | 2 +- cypress/integration/datetime.js | 2 +- cypress/integration/depends_on.js | 4 ++-- cypress/integration/file_uploader.js | 2 +- cypress/integration/form.js | 4 ++-- cypress/integration/grid_pagination.js | 4 ++-- cypress/integration/list_view.js | 2 +- cypress/integration/list_view_settings.js | 2 +- cypress/integration/query_report.js | 2 +- cypress/integration/recorder.js | 2 +- cypress/integration/relative_filters.js | 4 ++-- cypress/integration/report_view.js | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cypress/integration/api.js b/cypress/integration/api.js index 11e18d07c9..2279dc399d 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'); + cy.visit('/desk#workspace/Website'); }); it('Creates two Comments', () => { diff --git a/cypress/integration/awesome_bar.js b/cypress/integration/awesome_bar.js index fcadf3d569..15e85976fc 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'); + cy.visit('/desk#workspace/Website'); }); beforeEach(() => { diff --git a/cypress/integration/control_barcode.js b/cypress/integration/control_barcode.js index ac2a687bae..4e05d864e6 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'); + cy.visit('/desk#workspace/Website'); }); function get_dialog_with_barcode() { diff --git a/cypress/integration/control_link.js b/cypress/integration/control_link.js index 63c99c4d1b..658a7fe320 100644 --- a/cypress/integration/control_link.js +++ b/cypress/integration/control_link.js @@ -1,7 +1,7 @@ context('Control Link', () => { beforeEach(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); cy.create_records({ doctype: 'ToDo', description: 'this is a test todo for link' diff --git a/cypress/integration/control_rating.js b/cypress/integration/control_rating.js index 5fa479b888..e89ab2d3be 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'); + cy.visit('/desk#workspace/Website'); }); function get_dialog_with_rating() { diff --git a/cypress/integration/datetime.js b/cypress/integration/datetime.js index 90043434cd..ebc70b83f6 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'); + cy.visit('/desk#workspace/Website'); cy.insert_doc('DocType', datetime_doctype, true); }); diff --git a/cypress/integration/depends_on.js b/cypress/integration/depends_on.js index 8cb4e42d3e..88f835daf9 100644 --- a/cypress/integration/depends_on.js +++ b/cypress/integration/depends_on.js @@ -1,11 +1,11 @@ context('Depends On', () => { beforeEach(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); }); before(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); cy.window().its('frappe').then(frappe => { 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 787644b596..f4ef2a19f0 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'); + cy.visit('/desk#workspace/Website'); }); function open_upload_dialog() { diff --git a/cypress/integration/form.js b/cypress/integration/form.js index 81b52c4421..4502bc0537 100644 --- a/cypress/integration/form.js +++ b/cypress/integration/form.js @@ -1,13 +1,13 @@ context('Form', () => { before(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); cy.window().its('frappe').then(frappe => { frappe.call("frappe.tests.ui_test_helpers.create_contact_records"); }); }); beforeEach(() => { - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); }); it('create a new form', () => { cy.visit('/desk#Form/ToDo/New ToDo 1'); diff --git a/cypress/integration/grid_pagination.js b/cypress/integration/grid_pagination.js index 67fdb8acf0..bc2947a5d1 100644 --- a/cypress/integration/grid_pagination.js +++ b/cypress/integration/grid_pagination.js @@ -1,11 +1,11 @@ context('Grid Pagination', () => { beforeEach(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); }); before(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); cy.window().its('frappe').then(frappe => { frappe.call("frappe.tests.ui_test_helpers.create_contact_phone_nos_records"); }); diff --git a/cypress/integration/list_view.js b/cypress/integration/list_view.js index d6627ea9c4..0d26ca90a2 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'); + cy.visit('/desk#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 84131386f6..51cba94a70 100644 --- a/cypress/integration/list_view_settings.js +++ b/cypress/integration/list_view_settings.js @@ -1,7 +1,7 @@ context('List View Settings', () => { beforeEach(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); }); it('Default settings', () => { cy.visit('/desk#List/DocType/List'); diff --git a/cypress/integration/query_report.js b/cypress/integration/query_report.js index 375b13fd9f..8ce510173c 100644 --- a/cypress/integration/query_report.js +++ b/cypress/integration/query_report.js @@ -1,7 +1,7 @@ context('Form', () => { before(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); }); it('add custom column in report', () => { diff --git a/cypress/integration/recorder.js b/cypress/integration/recorder.js index e8b55a9d12..878d8af848 100644 --- a/cypress/integration/recorder.js +++ b/cypress/integration/recorder.js @@ -4,7 +4,7 @@ context('Recorder', () => { }); it('Navigate to Recorder', () => { - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); cy.awesomebar('recorder'); cy.get('h1').should('contain', 'Recorder'); cy.location('hash').should('eq', '#recorder'); diff --git a/cypress/integration/relative_filters.js b/cypress/integration/relative_filters.js index 27f594f96e..986c5ce342 100644 --- a/cypress/integration/relative_filters.js +++ b/cypress/integration/relative_filters.js @@ -1,11 +1,11 @@ context('Relative Timeframe', () => { beforeEach(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); }); before(() => { cy.login(); - cy.visit('/desk'); + cy.visit('/desk#workspace/Website'); cy.window().its('frappe').then(frappe => { frappe.call("frappe.tests.ui_test_helpers.create_todo_records"); }); diff --git a/cypress/integration/report_view.js b/cypress/integration/report_view.js index 5ce853c730..deeef6bdd5 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'); + cy.visit('/desk#workspace/Website'); cy.insert_doc('DocType', custom_submittable_doctype, true); cy.clear_cache(); cy.insert_doc(doctype_name, {