Merge pull request #10299 from scmmishra/rename-onboarding
refactor: rename onboarding to module onboarding
This commit is contained in:
commit
70fc9e6c83
13 changed files with 33 additions and 22 deletions
|
|
@ -21,15 +21,6 @@ context('Login', () => {
|
|||
cy.location('pathname').should('eq', '/login');
|
||||
});
|
||||
|
||||
it('logs in using correct credentials', () => {
|
||||
cy.get('#login_email').type('Administrator');
|
||||
cy.get('#login_password').type(Cypress.config('adminPassword'));
|
||||
|
||||
cy.get('.btn-login').click();
|
||||
cy.location('pathname').should('eq', '/desk');
|
||||
cy.window().its('frappe.session.user').should('eq', 'Administrator');
|
||||
});
|
||||
|
||||
it('shows invalid login if incorrect credentials', () => {
|
||||
cy.get('#login_email').type('Administrator');
|
||||
cy.get('#login_password').type('qwer');
|
||||
|
|
@ -38,4 +29,13 @@ context('Login', () => {
|
|||
cy.get('.page-card-head').contains('Invalid Login. Try again.');
|
||||
cy.location('pathname').should('eq', '/login');
|
||||
});
|
||||
|
||||
it('logs in using correct credentials', () => {
|
||||
cy.get('#login_email').type('Administrator');
|
||||
cy.get('#login_password').type(Cypress.config('adminPassword'));
|
||||
|
||||
cy.get('.btn-login').click();
|
||||
cy.location('pathname').should('eq', '/desk');
|
||||
cy.window().its('frappe.session.user').should('eq', 'Administrator');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ class Workspace:
|
|||
if not self.doc.onboarding:
|
||||
return None
|
||||
|
||||
if frappe.db.get_value("Onboarding", self.doc.onboarding, "is_complete"):
|
||||
if frappe.db.get_value("Module Onboarding", self.doc.onboarding, "is_complete"):
|
||||
return None
|
||||
|
||||
doc = frappe.get_doc("Onboarding", self.doc.onboarding)
|
||||
doc = frappe.get_doc("Module Onboarding", self.doc.onboarding)
|
||||
|
||||
# Check if user is allowed
|
||||
allowed_roles = set(doc.get_allowed_roles())
|
||||
|
|
|
|||
|
|
@ -188,11 +188,11 @@
|
|||
"fieldname": "onboarding",
|
||||
"fieldtype": "Link",
|
||||
"label": "Onboarding",
|
||||
"options": "Onboarding"
|
||||
"options": "Module Onboarding"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-04-26 12:21:46.205079",
|
||||
"modified": "2020-05-12 16:12:20.708394",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Desk Page",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2020, Frappe Technologies and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on("Onboarding", {
|
||||
frappe.ui.form.on("Module Onboarding", {
|
||||
refresh: function(frm) {
|
||||
frappe.boot.developer_mode &&
|
||||
frm.set_intro(
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
"modified": "2020-05-01 19:37:21.492405",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Onboarding",
|
||||
"name": "Module Onboarding",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
|
|
@ -8,10 +8,10 @@ from frappe.model.document import Document
|
|||
from frappe.modules.export_file import export_to_files
|
||||
|
||||
|
||||
class Onboarding(Document):
|
||||
class ModuleOnboarding(Document):
|
||||
def on_update(self):
|
||||
if frappe.conf.developer_mode:
|
||||
export_to_files(record_list=[['Onboarding', self.name]], record_module=self.module)
|
||||
export_to_files(record_list=[['Module Onboarding', self.name]], record_module=self.module)
|
||||
|
||||
for step in self.steps:
|
||||
export_to_files(record_list=[['Onboarding Step', step.step]], record_module=self.module)
|
||||
|
|
@ -6,5 +6,5 @@ from __future__ import unicode_literals
|
|||
# import frappe
|
||||
import unittest
|
||||
|
||||
class TestOnboarding(unittest.TestCase):
|
||||
class TestModuleOnboarding(unittest.TestCase):
|
||||
pass
|
||||
|
|
@ -51,7 +51,7 @@ def sync_for(app_name, force=0, sync_everything = False, verbose=False, reset_pe
|
|||
("desk", "onboarding_permission"),
|
||||
("desk", "onboarding_step"),
|
||||
("desk", "onboarding_step_map"),
|
||||
("desk", "onboarding"),
|
||||
("desk", "module_onboarding"),
|
||||
("desk", "desk_card"),
|
||||
("desk", "desk_chart"),
|
||||
("desk", "desk_shortcut"),
|
||||
|
|
@ -85,7 +85,7 @@ def get_doc_files(files, start_path, force=0, sync_everything = False, verbose=F
|
|||
document_types = ['doctype', 'page', 'report', 'dashboard_chart_source', 'print_format',
|
||||
'website_theme', 'web_form', 'web_template', 'notification', 'print_style',
|
||||
'data_migration_mapping', 'data_migration_plan', 'desk_page',
|
||||
'onboarding_step', 'onboarding']
|
||||
'onboarding_step', 'module_onboarding']
|
||||
|
||||
for doctype in document_types:
|
||||
doctype_path = os.path.join(start_path, doctype)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ ignore_values = {
|
|||
"Print Format": ["disabled"],
|
||||
"Notification": ["enabled"],
|
||||
"Print Style": ["disabled"],
|
||||
"Onboarding": ['is_complete'],
|
||||
"Module Onboarding": ['is_complete'],
|
||||
"Onboarding Step": ['is_complete', 'is_skipped']
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -279,3 +279,4 @@ frappe.patches.v13_0.migrate_translation_column_data
|
|||
frappe.patches.v13_0.set_read_times
|
||||
frappe.patches.v13_0.remove_web_view
|
||||
frappe.patches.v13_0.remove_tailwind_from_page_builder
|
||||
frappe.patches.v13_0.rename_onboarding
|
||||
|
|
|
|||
10
frappe/patches/v13_0/rename_onboarding.py
Normal file
10
frappe/patches/v13_0/rename_onboarding.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# MIT License. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
if frappe.db.exists("DocType", "Onboarding"):
|
||||
frappe.rename_doc("DocType", "Onboarding", "Module Onboarding", ignore_if_exists=True)
|
||||
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
],
|
||||
"creation": "2020-04-26 13:03:30.405135",
|
||||
"docstatus": 0,
|
||||
"doctype": "Onboarding",
|
||||
"doctype": "Module Onboarding",
|
||||
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/website",
|
||||
"idx": 0,
|
||||
"is_complete": 0,
|
||||
Loading…
Add table
Reference in a new issue