Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. context('Recorder', () => {
  2. before(() => {
  3. cy.login('Administrator', 'qwe');
  4. });
  5.  
  6. it('Navigate to Recorder', () => {
  7. cy.visit('/desk');
  8. cy.awesomebar('recorder');
  9. cy.get('h1').should('contain', 'Recorder');
  10. cy.location('hash').should('eq', '#recorder');
  11. });
  12.  
  13. it('Recorder Empty State', () => {
  14. cy.visit('/desk#recorder');
  15. cy.get('.title-text').should('contain', 'Recorder');
  16.  
  17. cy.get('.indicator').should('contain', 'Inactive').should('have.class', 'red');
  18.  
  19. cy.get('.primary-action').should('contain', 'Start');
  20. cy.get('.btn-secondary').should('contain', 'Clear');
  21.  
  22. cy.get('.msg-box').should('contain', 'Inactive');
  23. cy.get('.msg-box .btn-primary').should('contain', 'Start Recording');
  24. });
  25.  
  26. it('Recorder Start', () => {
  27. cy.visit('/desk#recorder');
  28. cy.get('.primary-action').should('contain', 'Start').click();
  29. cy.get('.indicator').should('contain', 'Active').should('have.class', 'green');
  30.  
  31. cy.get('.msg-box').should('contain', 'No Requests');
  32.  
  33. cy.visit('/desk#Form/User/Administrator');
  34. cy.get('.title-text').should('contain', 'Administrator');
  35.  
  36. cy.visit('/desk#recorder');
  37. cy.get('.title-text').should('contain', 'Recorder');
  38. cy.get('.result-list').should('contain', 'frappe.desk.form.load.getdoc');
  39.  
  40. cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
  41. cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
  42. cy.get('.msg-box').should('contain', 'Inactive');
  43. });
  44.  
  45. it('Recorder View Request', () => {
  46. cy.visit('/desk#recorder');
  47. cy.get('.primary-action').should('contain', 'Start').click();
  48.  
  49. cy.visit('/desk#Form/User/Administrator');
  50. cy.get('.title-text').should('contain', 'Administrator');
  51.  
  52. cy.visit('/desk#recorder');
  53.  
  54. cy.contains('.list-row-container', 'frappe.desk.form.load.getdoc').click();
  55.  
  56. cy.location('hash').should('contain', '#recorder/request/');
  57. cy.get('form').should('contain', 'frappe.desk.form.load.getdoc')
  58. });
  59. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement