seitime-frappe/cypress/integration/customize_form.js
Ankush Menat 7b7c6390f4 fix!: Swap old style naming with new one
"new" style of naming uses `format:` which is broken and unfixable. This
commit discourages use of the new style.

What was referred to as "old style" already works just fine and supports
all the same things.

ref https://github.com/frappe/frappe/issues/21212
2025-12-15 12:12:09 +05:30

23 lines
720 B
JavaScript

context("Customize Form", () => {
before(() => {
cy.login();
cy.visit("/desk/customize-form");
});
it("Changing to naming rule should update autoname", () => {
cy.fill_field("doc_type", "ToDo", "Link");
cy.findByRole("tab", { name: "Details" }).click();
cy.click_form_section("Naming");
const naming_rule_default_autoname_map = {
"Set by user": "prompt",
"By fieldname": "field:",
Expression: "",
"Expression (old style)": "format:",
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);
});
});
});