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.
 
 
 
 
 
 

45 righe
1.8 KiB

  1. context('Form', () => {
  2. before(() => {
  3. cy.login();
  4. cy.visit('/desk');
  5. cy.window().its('frappe').then(frappe => {
  6. frappe.call("frappe.tests.ui_test_helpers.create_contact_records");
  7. });
  8. });
  9. beforeEach(() => {
  10. cy.visit('/desk');
  11. });
  12. it('create a new form', () => {
  13. cy.visit('/desk#Form/ToDo/New ToDo 1');
  14. cy.fill_field('description', 'this is a test todo', 'Text Editor').blur();
  15. cy.get('.page-title').should('contain', 'Not Saved');
  16. cy.get('.primary-action').click();
  17. cy.visit('/desk#List/ToDo');
  18. cy.location('hash').should('eq', '#List/ToDo/List');
  19. cy.get('h1').should('be.visible').and('contain', 'To Do');
  20. cy.get('.list-row').should('contain', 'this is a test todo');
  21. });
  22. it('navigates between documents with child table list filters applied', () => {
  23. cy.visit('/desk#List/Contact');
  24. cy.location('hash').should('eq', '#List/Contact/List');
  25. cy.get('.tag-filters-area .btn:contains("Add Filter")').click();
  26. cy.get('.fieldname-select-area').should('exist');
  27. cy.get('.fieldname-select-area input').type('Number{enter}', { force: true });
  28. cy.get('.filter-field .input-with-feedback.form-control').type('123', { force: true });
  29. cy.get('.filter-box .btn:contains("Apply")').click({ force: true });
  30. cy.visit('/desk#Form/Contact/Test Form Contact 3');
  31. cy.get('.prev-doc').should('be.visible').click();
  32. cy.get('.msgprint-dialog .modal-body').contains('No further records').should('be.visible');
  33. cy.get('.btn-modal-close:visible').click();
  34. cy.get('.next-doc').click();
  35. cy.wait(200);
  36. cy.contains('Test Form Contact 2').should('not.exist');
  37. cy.get('.page-title .title-text').should('contain', 'Test Form Contact 1');
  38. // clear filters
  39. cy.window().its('frappe').then((frappe) => {
  40. let list_view = frappe.get_list_view('Contact');
  41. list_view.filter_area.filter_list.clear_filters();
  42. });
  43. });
  44. });