|
|
@@ -53,7 +53,7 @@ context('Timeline', () => { |
|
|
|
cy.get('.modal.show > .modal-dialog > .modal-content > .modal-footer > .standard-actions > .btn-primary').contains('Yes').click({force: true}); |
|
|
|
}); |
|
|
|
|
|
|
|
it('Cancel functionality for timeline', () => { |
|
|
|
it('Timeline should have submit and cancel activity information', () => { |
|
|
|
cy.visit('/app/doctype'); |
|
|
|
|
|
|
|
//Creating custom doctype |
|
|
@@ -64,31 +64,31 @@ context('Timeline', () => { |
|
|
|
|
|
|
|
//Adding a new entry for the created custom doctype |
|
|
|
cy.fill_field('title', 'Test'); |
|
|
|
cy.get('.modal.show > .modal-dialog > .modal-content > .modal-footer > .standard-actions > .btn-primary').click(); |
|
|
|
cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Save').click(); |
|
|
|
cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Submit').click(); |
|
|
|
cy.visit('/app/custom-submittable-doctype'); |
|
|
|
cy.get('.list-row > .level-left > .list-subject > .bold > .ellipsis').eq(0).click(); |
|
|
|
cy.get('.list-subject > .bold > .ellipsis').eq(0).click(); |
|
|
|
|
|
|
|
//To check if the submission of the documemt is visible in the timeline content |
|
|
|
cy.get('.timeline-content').should('contain', 'Administrator submitted this document'); |
|
|
|
cy.get('.page-head > .container > .row > .col > .standard-actions > .btn-secondary').contains('Cancel').click({delay: 900}); cy.get('.modal.show > .modal-dialog > .modal-content > .modal-footer > .standard-actions > .btn-primary').contains('Yes').click(); |
|
|
|
cy.get('.page-actions > .standard-actions > .btn-secondary').contains('Cancel').click({delay: 900}); |
|
|
|
cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Yes').click(); |
|
|
|
|
|
|
|
//To check if the cancellation of the documemt is visible in the timeline content |
|
|
|
cy.get('.timeline-content').should('contain', 'Administrator cancelled this document'); |
|
|
|
|
|
|
|
//Deleting the document |
|
|
|
cy.visit('/app/custom-submittable-doctype'); |
|
|
|
cy.get('.list-row > .level-left > .list-subject > .select-like > .list-row-checkbox').eq(0).click(); |
|
|
|
cy.get('.page-head > .container > .row > .col > .standard-actions > .actions-btn-group > .btn').contains('Actions').click(); |
|
|
|
cy.get('.list-subject > .select-like > .list-row-checkbox').eq(0).click(); |
|
|
|
cy.get('.page-actions > .standard-actions > .actions-btn-group > .btn').contains('Actions').click(); |
|
|
|
cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(7).click(); |
|
|
|
cy.click_modal_primary_button('Yes', {force: true, delay: 700}); |
|
|
|
|
|
|
|
//Deleting the custom doctype |
|
|
|
cy.visit('/app/doctype'); |
|
|
|
cy.get('.list-row > .level-left > .list-subject > .select-like > .list-row-checkbox').eq(0).click(); |
|
|
|
cy.get('.page-head > .container > .row > .col > .standard-actions > .actions-btn-group > .btn').contains('Actions').click(); |
|
|
|
cy.get('.list-subject > .select-like > .list-row-checkbox').eq(0).click(); |
|
|
|
cy.get('.page-actions > .standard-actions > .actions-btn-group > .btn').contains('Actions').click(); |
|
|
|
cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); |
|
|
|
cy.click_modal_primary_button('Yes'); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |