Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

71 Zeilen
2.1 KiB

  1. context('Recorder', () => {
  2. before(() => {
  3. cy.login();
  4. });
  5. beforeEach(() => {
  6. cy.visit('/app/recorder');
  7. return cy.window().its('frappe').then(frappe => {
  8. // reset recorder
  9. return frappe.xcall("frappe.recorder.stop").then(() => {
  10. return frappe.xcall("frappe.recorder.delete");
  11. });
  12. });
  13. });
  14. it('Navigate to Recorder', () => {
  15. cy.visit('/app');
  16. cy.awesomebar('recorder');
  17. cy.findByTitle('Recorder').should('exist');
  18. cy.url().should('include', '/recorder/detail');
  19. });
  20. it('Recorder Empty State', () => {
  21. cy.findByTitle('Recorder').should('exist');
  22. cy.get('.indicator-pill').should('contain', 'Inactive').should('have.class', 'red');
  23. cy.findByRole('button', {name: 'Start'}).should('exist');
  24. cy.findByRole('button', {name: 'Clear'}).should('exist');
  25. cy.get('.msg-box').should('contain', 'Inactive');
  26. cy.findByRole('button', {name: 'Start Recording'}).should('exist');
  27. });
  28. it('Recorder Start', () => {
  29. cy.findByRole('button', {name: 'Start'}).click();
  30. cy.get('.indicator-pill').should('contain', 'Active').should('have.class', 'green');
  31. cy.get('.msg-box').should('contain', 'No Requests');
  32. cy.visit('/app/List/DocType/List');
  33. cy.intercept('POST', '/api/method/frappe.desk.reportview.get').as('list_refresh');
  34. cy.wait('@list_refresh');
  35. cy.get('.title-text').should('contain', 'DocType');
  36. cy.get('.list-count').should('contain', '20 of ');
  37. cy.visit('/app/recorder');
  38. cy.findByTitle('Recorder').should('exist');
  39. cy.get('.result-list').should('contain', '/api/method/frappe.desk.reportview.get');
  40. });
  41. it('Recorder View Request', () => {
  42. cy.findByRole('button', {name: 'Start'}).click();
  43. cy.visit('/app/List/DocType/List');
  44. cy.intercept('POST', '/api/method/frappe.desk.reportview.get').as('list_refresh');
  45. cy.wait('@list_refresh');
  46. cy.get('.title-text').should('contain', 'DocType');
  47. cy.get('.list-count').should('contain', '20 of ');
  48. cy.visit('/app/recorder');
  49. cy.get('.list-row-container span').contains('/api/method/frappe').click();
  50. cy.url().should('include', '/recorder/request');
  51. cy.get('form').should('contain', '/api/method/frappe');
  52. });
  53. });