Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

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 anni fa
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 anni fa
12345678910111213141516171819202122232425262728293031323334353637383940414243
  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']])
  16. .then(body => {
  17. expect(body).to.have.property('data');
  18. expect(body.data).to.have.lengthOf(1);
  19. expect(body.data[0]).to.have.property('content');
  20. expect(body.data[0]).to.have.property('name');
  21. });
  22. });
  23. it('Gets each Comment', () => {
  24. cy.get_list('Comment').then(body => body.data.forEach(comment => {
  25. cy.get_doc('Comment', comment.name);
  26. }));
  27. });
  28. it('Removes the Comments', () => {
  29. cy.get_list('Comment').then(body => {
  30. let comment_names = [];
  31. body.data.map(comment => comment_names.push(comment.name));
  32. comment_names = [...new Set(comment_names)]; // remove duplicates
  33. comment_names.forEach((comment_name) => {
  34. cy.remove_doc('Comment', comment_name);
  35. });
  36. });
  37. });
  38. });