Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- context('Recorder', () => {
- before(() => {
- cy.login('Administrator', 'qwe');
- });
- it('Navigate to Recorder', () => {
- cy.visit('/desk');
- cy.awesomebar('recorder');
- cy.get('h1').should('contain', 'Recorder');
- cy.location('hash').should('eq', '#recorder');
- });
- it('Recorder Empty State', () => {
- cy.visit('/desk#recorder');
- cy.get('.title-text').should('contain', 'Recorder');
- cy.get('.indicator').should('contain', 'Inactive').should('have.class', 'red');
- cy.get('.primary-action').should('contain', 'Start');
- cy.get('.btn-secondary').should('contain', 'Clear');
- cy.get('.msg-box').should('contain', 'Inactive');
- cy.get('.msg-box .btn-primary').should('contain', 'Start Recording');
- });
- it('Recorder Start', () => {
- cy.visit('/desk#recorder');
- cy.get('.primary-action').should('contain', 'Start').click();
- cy.get('.indicator').should('contain', 'Active').should('have.class', 'green');
- cy.get('.msg-box').should('contain', 'No Requests');
- cy.visit('/desk#Form/User/Administrator');
- cy.get('.title-text').should('contain', 'Administrator');
- cy.visit('/desk#recorder');
- cy.get('.title-text').should('contain', 'Recorder');
- cy.get('.result-list').should('contain', 'frappe.desk.form.load.getdoc');
- cy.get('#page-recorder .primary-action').should('contain', 'Stop').click();
- cy.get('#page-recorder .btn-secondary').should('contain', 'Clear').click();
- cy.get('.msg-box').should('contain', 'Inactive');
- });
- it('Recorder View Request', () => {
- cy.visit('/desk#recorder');
- cy.get('.primary-action').should('contain', 'Start').click();
- cy.visit('/desk#Form/User/Administrator');
- cy.get('.title-text').should('contain', 'Administrator');
- cy.visit('/desk#recorder');
- cy.contains('.list-row-container', 'frappe.desk.form.load.getdoc').click();
- cy.location('hash').should('contain', '#recorder/request/');
- cy.get('form').should('contain', 'frappe.desk.form.load.getdoc')
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement