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.
 
 
 
 
 
 

72 lines
2.4 KiB

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