chore: fixed settings
This commit is contained in:
1
.github/workflows/ui-tests.yml
vendored
1
.github/workflows/ui-tests.yml
vendored
@@ -100,6 +100,7 @@ jobs:
|
||||
bench --site lms.test execute frappe.utils.install.complete_setup_wizard
|
||||
bench --site lms.test execute frappe.tests.ui_test_helpers.create_test_user
|
||||
bench --site lms.test set-password frappe@example.com admin
|
||||
bench --site lms.test execute lms.lms.utils.persona_captured
|
||||
|
||||
- name: cypress pre-requisites
|
||||
run: |
|
||||
|
||||
@@ -13,6 +13,6 @@ module.exports = defineConfig({
|
||||
openMode: 0,
|
||||
},
|
||||
e2e: {
|
||||
baseUrl: "http://testui:8000",
|
||||
baseUrl: "http://pertest:8000",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -2,10 +2,7 @@ describe("Course Creation", () => {
|
||||
it("creates a new course", () => {
|
||||
cy.login();
|
||||
cy.wait(1000);
|
||||
cy.visit("/lms");
|
||||
cy.wait(1000);
|
||||
cy.get("div").contains("Skip").click();
|
||||
cy.wait(1000);
|
||||
cy.visit("/lms/courses");
|
||||
|
||||
// Create a course
|
||||
cy.get("button").contains("New").click();
|
||||
|
||||
@@ -322,11 +322,11 @@ const tabsStructure = computed(() => {
|
||||
icon: 'LogIn',
|
||||
fields: [
|
||||
{
|
||||
label: 'Identify User Persona',
|
||||
label: 'Identify User Category',
|
||||
name: 'user_category',
|
||||
type: 'checkbox',
|
||||
description:
|
||||
'Enable this option to identify the user persona during signup.',
|
||||
'Enable this option to identify the user category during signup.',
|
||||
},
|
||||
{
|
||||
label: 'Disable signup',
|
||||
|
||||
@@ -172,6 +172,11 @@ const isPersonaCaptured = async () => {
|
||||
|
||||
const identifyUserPersona = async () => {
|
||||
let personaCaptured = await isPersonaCaptured()
|
||||
debugger
|
||||
console.log('personaCaptured', personaCaptured)
|
||||
console.log('user.data?.is_system_manager', user.data?.is_system_manager)
|
||||
console.log('user.data?.developer_mode', user.data?.developer_mode)
|
||||
|
||||
if (
|
||||
user.data?.is_system_manager &&
|
||||
!user.data?.developer_mode &&
|
||||
|
||||
@@ -61,7 +61,10 @@
|
||||
"column_break_uwsp",
|
||||
"payment_reminder_template",
|
||||
"seo_tab",
|
||||
"meta_description"
|
||||
"meta_description",
|
||||
"meta_image",
|
||||
"column_break_xijv",
|
||||
"meta_keywords"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@@ -106,7 +109,7 @@
|
||||
"default": "0",
|
||||
"fieldname": "user_category",
|
||||
"fieldtype": "Check",
|
||||
"label": "Identify User Persona"
|
||||
"label": "Identify User Category"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
@@ -372,6 +375,22 @@
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Meta Description"
|
||||
},
|
||||
{
|
||||
"description": "This image will be shown on lists and pages that don't have an image by default",
|
||||
"fieldname": "meta_image",
|
||||
"fieldtype": "Attach Image",
|
||||
"label": "Meta Image"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_xijv",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"description": "Common keywords that will be used for all pages",
|
||||
"fieldname": "meta_keywords",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Meta Keywords"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "persona_captured",
|
||||
@@ -384,8 +403,8 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2025-04-22 14:34:19.656896",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2025-04-22 16:05:27.914422",
|
||||
"modified_by": "sayali@frappe.io",
|
||||
"module": "LMS",
|
||||
"name": "LMS Settings",
|
||||
"owner": "Administrator",
|
||||
|
||||
@@ -2167,3 +2167,7 @@ def get_palette(full_name):
|
||||
hash_name = hashlib.md5(encoded_name).hexdigest()
|
||||
idx = cint((int(hash_name[4:6], 16) + 1) / 5.33)
|
||||
return palette[idx % 8]
|
||||
|
||||
|
||||
def persona_captured():
|
||||
frappe.db.set_single_value("LMS Settings", "persona_captured", 1)
|
||||
|
||||
Reference in New Issue
Block a user