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.
 
 
 
 
 
 

52 lines
2.3 KiB

  1. context('Table MultiSelect', () => {
  2. // ToDo does not have any "assign_to" property, hence commented
  3. // beforeEach(() => {
  4. // cy.login('Administrator', 'qwe');
  5. // });
  6. // let todo_description = 'table multiselect' + Math.random().toString().slice(2, 8);
  7. // it('select value from multiselect dropdown', () => {
  8. // cy.visit('/desk#Form/ToDo/New ToDo 1');
  9. // cy.fill_field('description', todo_description, 'Text Editor').blur();
  10. // cy.get('input[data-fieldname="assign_to"]').focus().as('input');
  11. // cy.get('input[data-fieldname="assign_to"] + ul').should('be.visible');
  12. // cy.get('@input').type('faris{enter}', { delay: 100 });
  13. // cy.get('.frappe-control[data-fieldname="assign_to"] .form-control .tb-selected-value')
  14. // .first().as('selected-value');
  15. // cy.get('@selected-value').should('contain', 'faris@erpnext.com');
  16. // cy.server();
  17. // cy.route('POST', '/api/method/frappe.desk.form.save.savedocs').as('save_form');
  18. // // trigger save
  19. // cy.get('.primary-action').click();
  20. // cy.wait('@save_form').its('status').should('eq', 200);
  21. // cy.get('@selected-value').should('contain', 'faris@erpnext.com');
  22. // });
  23. // it('delete value using backspace', () => {
  24. // cy.visit('/desk#List/ToDo/List');
  25. // cy.get(`.list-subject:contains("table multiselect")`).last().find('a').click();
  26. // cy.get('input[data-fieldname="assign_to"]').focus().type('{backspace}');
  27. // cy.get('.frappe-control[data-fieldname="assign_to"] .form-control .tb-selected-value')
  28. // .should('not.exist');
  29. // });
  30. // it('delete value using x', () => {
  31. // cy.visit('/desk#List/ToDo/List');
  32. // cy.get(`.list-subject:contains("table multiselect")`).last().find('a').click();
  33. // cy.get('.frappe-control[data-fieldname="assign_to"] .form-control .tb-selected-value').as('existing_value');
  34. // cy.get('@existing_value').find('.btn-remove').click();
  35. // cy.get('@existing_value').should('not.exist');
  36. // });
  37. // it('navigate to selected value', () => {
  38. // cy.visit('/desk#List/ToDo/List');
  39. // cy.get(`.list-subject:contains("table multiselect")`).last().find('a').click();
  40. // cy.get('.frappe-control[data-fieldname="assign_to"] .form-control .tb-selected-value').as('existing_value');
  41. // cy.get('@existing_value').find('.btn-link-to-form').click();
  42. // cy.location('hash').should('contain', 'Form/User/faris@erpnext.com');
  43. // });
  44. });