* test: fix get_field command * test: Add timeline email test cases * test: Add sidebar test cases * test: Add timeline test cases * test: Added new commands * test: Added proper name for test case, added comments and removed redundancy * test: Added proper name for test case, added comments and removed redundancy * test: Added proper name for test case, added comments and removed redundancy * test: Added new commands * test: Added proper name for test case, added comments and removed redundancy * test: Added proper name for test case, added comments and removed redundancy * fix: Sider issues * fix: Sider issues * fix: Sider issues * fix: UI Tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI tests * fix: UI test * fix: UI tests * fix: UI tests * fix: Context correction * test: fix fill_field command * test: fixed get_field command (removed :visible for code) * test: Fixed fill_field command (removed .blur()) Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
57 lines
No EOL
2.3 KiB
JavaScript
57 lines
No EOL
2.3 KiB
JavaScript
context('Sidebar', () => {
|
|
before(() => {
|
|
cy.visit('/login');
|
|
cy.login();
|
|
cy.visit('/app/doctype');
|
|
});
|
|
|
|
it('Test for checking "Assigned To" counter value, adding filter and adding & removing an assignment', () => {
|
|
cy.click_sidebar_button(0);
|
|
|
|
//To check if no filter is available in "Assigned To" dropdown
|
|
cy.get('.empty-state').should('contain', 'No filters found');
|
|
|
|
cy.click_sidebar_button(1);
|
|
|
|
//To check if "Created By" dropdown contains filter
|
|
cy.get('.group-by-item > .dropdown-item').should('contain', 'Me');
|
|
|
|
//Assigning a doctype to a user
|
|
cy.click_listview_row_item(0);
|
|
cy.get('.form-assignments > .flex > .text-muted').click();
|
|
cy.get_field('assign_to_me', 'Check').click();
|
|
cy.get('.modal-footer > .standard-actions > .btn-primary').click();
|
|
cy.visit('/app/doctype');
|
|
cy.click_sidebar_button(0);
|
|
|
|
//To check if filter is added in "Assigned To" dropdown after assignment
|
|
cy.get('.group-by-field.show > .dropdown-menu > .group-by-item > .dropdown-item').should('contain', '1');
|
|
|
|
//To check if there is no filter added to the listview
|
|
cy.get('.filter-selector > .btn').should('contain', 'Filter');
|
|
|
|
//To add a filter to display data into the listview
|
|
cy.get('.group-by-field.show > .dropdown-menu > .group-by-item > .dropdown-item').click();
|
|
|
|
//To check if filter is applied
|
|
cy.click_filter_button().should('contain', '1 filter');
|
|
cy.get('.fieldname-select-area > .awesomplete > .form-control').should('have.value', 'Assigned To');
|
|
cy.get('.condition').should('have.value', 'like');
|
|
cy.get('.filter-field > .form-group > .input-with-feedback').should('have.value', '%Administrator%');
|
|
|
|
//To remove the applied filter
|
|
cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click();
|
|
cy.click_filter_button();
|
|
cy.get('.filter-selector > .btn').should('contain', 'Filter');
|
|
|
|
//To remove the assignment
|
|
cy.visit('/app/doctype');
|
|
cy.click_listview_row_item(0);
|
|
cy.get('.assignments > .avatar-group > .avatar > .avatar-frame').click();
|
|
cy.get('.remove-btn').click({force: true});
|
|
cy.get('.modal.show > .modal-dialog > .modal-content > .modal-header > .modal-actions > .btn-modal-close').click();
|
|
cy.visit('/app/doctype');
|
|
cy.click_sidebar_button(0);
|
|
cy.get('.empty-state').should('contain', 'No filters found');
|
|
});
|
|
}); |