You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

customize_form.js 743 B

1 jaar geleden
123456789101112131415161718192021222324
  1. context("Customize Form", () => {
  2. before(() => {
  3. cy.login();
  4. cy.visit("/app/customize-form");
  5. });
  6. it("Changing to naming rule should update autoname", () => {
  7. cy.fill_field("doc_type", "ToDo", "Link").blur();
  8. cy.wait(2000);
  9. cy.findByRole("tab", { name: "Details" }).click();
  10. cy.click_form_section("Naming");
  11. const naming_rule_default_autoname_map = {
  12. "Set by user": "prompt",
  13. "By fieldname": "field:",
  14. Expression: "format:",
  15. "Expression (old style)": "",
  16. Random: "hash",
  17. "By script": "",
  18. };
  19. Cypress._.forOwn(naming_rule_default_autoname_map, (value, naming_rule) => {
  20. cy.fill_field("naming_rule", naming_rule, "Select");
  21. cy.get_field("autoname", "Data").should("have.value", value);
  22. });
  23. });
  24. });