2
0
mirror of https://github.com/frappe/frappe.git synced 2024-06-03 03:40:48 +00:00
frappe/cypress/integration/customize_form.js
2022-08-04 14:51:01 +05:30

24 lines
722 B
JavaScript

context("Customize Form", () => {
before(() => {
cy.login();
cy.visit("/app/customize-form");
});
it("Changing to naming rule should update autoname", () => {
cy.fill_field("doc_type", "ToDo", "Link").blur();
cy.click_form_section("Naming");
const naming_rule_default_autoname_map = {
"Set by user": "prompt",
"By fieldname": "field:",
'By "Naming Series" field': "naming_series:",
Expression: "format:",
"Expression (old style)": "",
Random: "hash",
"By script": "",
};
Cypress._.forOwn(naming_rule_default_autoname_map, (value, naming_rule) => {
cy.fill_field("naming_rule", naming_rule, "Select");
cy.get_field("autoname", "Data").should("have.value", value);
});
});
});