Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

feat: Optionally remove seconds from datetime (#8531) * fix: Add updated datepicker; fixed seconds formatting bug. Seconds between 0 and 9 were not zero-padded. * feat: Add framework for time format * feat: datetime server-side formatters. * tests: Added server-side datetime formatter tests * feat: Update client-side datetime formatters * tests: Add Cypress client-side formatting tests. * fix: JSON errors * fix: Update to not hard-code admin password * fix: Change to using bulk_update rather than the REST API * tests: Use Custom doctype for testing, not Standard * fix: Codacy style fixes * fix: Commonify update_datetime_picker in date.js, datetime.js, time.js Fix order of time_format in System Settings Restore get_user_fmt in utils/datetime.js * feat: Drastically reduce scale of Cypress testing (to make tests faster) Full testing is possible by setting 'fast_mode' to false in the spec file. * fix: Fix issues with datepicker/timepicker expansion * fix: typo * style: Various style fixes as requested by DeppSource: Python * fix: Timepicker not hiding on 'now' button. Force hiding on click. * style: Codacy style fixes. * fix: Use datepicker from node_modules * test: Refactor Datetime UI tests - cy.get_field - cy.set_value - cy.insert_doc with ignore_duplicate - Nominal datetime tests to cover most formats - Formatting with prettier * test: Datetime UI tests; wait for cur_frm.doc.datetime to update * tests: Add whitespace to typed input - Clear input only for Time field * test: Wait timeout 200 * test: Fix form test Co-authored-by: Faris Ansari <netchampfaris@users.noreply.github.com>
5 лет назад
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. context("API Resources", () => {
  2. before(() => {
  3. cy.visit("/login");
  4. cy.login();
  5. cy.visit("/app/website");
  6. });
  7. it("Creates two Comments", () => {
  8. cy.insert_doc("Comment", { comment_type: "Comment", content: "hello" });
  9. cy.insert_doc("Comment", { comment_type: "Comment", content: "world" });
  10. });
  11. it("Lists the Comments", () => {
  12. cy.get_list("Comment")
  13. .its("data")
  14. .then((data) => expect(data.length).to.be.at.least(2));
  15. cy.get_list("Comment", ["name", "content"], [["content", "=", "hello"]]).then((body) => {
  16. expect(body).to.have.property("data");
  17. expect(body.data).to.have.lengthOf(1);
  18. expect(body.data[0]).to.have.property("content");
  19. expect(body.data[0]).to.have.property("name");
  20. });
  21. });
  22. it("Gets each Comment", () => {
  23. cy.get_list("Comment").then((body) =>
  24. body.data.forEach((comment) => {
  25. cy.get_doc("Comment", comment.name);
  26. })
  27. );
  28. });
  29. it("Removes the Comments", () => {
  30. cy.get_list("Comment").then((body) => {
  31. let comment_names = [];
  32. body.data.map((comment) => comment_names.push(comment.name));
  33. comment_names = [...new Set(comment_names)]; // remove duplicates
  34. comment_names.forEach((comment_name) => {
  35. cy.remove_doc("Comment", comment_name);
  36. });
  37. });
  38. });
  39. });