From 3fbacb97f42e06da35ea8747e360566f3a73c388 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Tue, 10 Aug 2021 18:53:20 +0530 Subject: [PATCH 01/11] test: Added test cases for folder navigation and checking if the nested folder contains the added file --- cypress/integration/folder_navigation.js | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 cypress/integration/folder_navigation.js diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js new file mode 100644 index 0000000000..4a389101b5 --- /dev/null +++ b/cypress/integration/folder_navigation.js @@ -0,0 +1,79 @@ +context('Folder Navigation', () => { + before(() => { + cy.visit('/login'); + cy.login(); + cy.visit('/app/file'); + }); + + it('Adding Folders', () => { + //Adding filter to go into the home folder + cy.get('.filter-selector > .btn').click(); + cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); + cy.get('.filter-action-buttons > .text-muted').click(); + cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); + cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); + cy.get('.filter-action-buttons > div > .btn-primary').click(); + + //Adding folder (Test Folder) + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + }); + + it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { + //Navigating inside the Attachments folder + cy.get('[title="Attachments"] > span').click(); + + //To check if the URL formed after visiting the attachments folder is correct + cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); + cy.visit('/app/file/view/home/Attachments'); + + //Adding folder inside the attachments folder + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + + //Navigating inside the added folder in the Attachments folder + cy.get('[title="Test Folder"] > span').click(); + + //To check if the URL is correct after visiting the Test Folder + cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); + cy.visit('/app/file/view/home/Attachments/Test%20Folder'); + + //Adding a file inside the Test Folder + cy.get('.primary-action').contains('Add File').eq(0).click({force : true}); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.get('.btn-primary').contains('Upload').click(); + + //To check if the added file is present in the Test Folder + cy.get('span.level-item > span').should('contain','Test Folder'); + cy.get('.list-row-container').eq(0).should('contain.text','72402.jpg'); + cy.get('.list-row-checkbox').eq(0).click(); + + //Deleting the added file from the Test folder + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.wait(700); + cy.click_modal_primary_button('Yes', {force : true, delay: 700}); + cy.wait(700); + + //Deleting the Test Folder + cy.visit('/app/file/view/home/Attachments'); + cy.get('.list-row-checkbox').eq(0).click(); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes'); + }); + + it('Deleting Test Folder from the home', () => { + //Deleting the Test Folder added in the home directory + cy.visit('/app/file/view/home'); + cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force : true, delay : 500}); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes', {force : true}); + }); +}); \ No newline at end of file From 166574b1d065ac0c0461a671d7fe837a9d35b7ce Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Tue, 10 Aug 2021 19:10:27 +0530 Subject: [PATCH 02/11] test: Fixed sider issues --- cypress/integration/folder_navigation.js | 122 +++++++++++------------ 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js index 4a389101b5..d4fe569828 100644 --- a/cypress/integration/folder_navigation.js +++ b/cypress/integration/folder_navigation.js @@ -5,75 +5,75 @@ context('Folder Navigation', () => { cy.visit('/app/file'); }); - it('Adding Folders', () => { - //Adding filter to go into the home folder - cy.get('.filter-selector > .btn').click(); - cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); - cy.get('.filter-action-buttons > .text-muted').click(); - cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); - cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); - cy.get('.filter-action-buttons > div > .btn-primary').click(); - - //Adding folder (Test Folder) - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); - }); + it('Adding Folders', () => { + //Adding filter to go into the home folder + cy.get('.filter-selector > .btn').click(); + cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); + cy.get('.filter-action-buttons > .text-muted').click(); + cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); + cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); + cy.get('.filter-action-buttons > div > .btn-primary').click(); - it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { - //Navigating inside the Attachments folder - cy.get('[title="Attachments"] > span').click(); + //Adding folder (Test Folder) + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + }); - //To check if the URL formed after visiting the attachments folder is correct - cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); - cy.visit('/app/file/view/home/Attachments'); + it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { + //Navigating inside the Attachments folder + cy.get('[title="Attachments"] > span').click(); - //Adding folder inside the attachments folder - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + //To check if the URL formed after visiting the attachments folder is correct + cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); + cy.visit('/app/file/view/home/Attachments'); - //Navigating inside the added folder in the Attachments folder - cy.get('[title="Test Folder"] > span').click(); + //Adding folder inside the attachments folder + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); - //To check if the URL is correct after visiting the Test Folder - cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); - cy.visit('/app/file/view/home/Attachments/Test%20Folder'); + //Navigating inside the added folder in the Attachments folder + cy.get('[title="Test Folder"] > span').click(); - //Adding a file inside the Test Folder - cy.get('.primary-action').contains('Add File').eq(0).click({force : true}); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); - cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); - cy.get('.btn-primary').contains('Upload').click(); + //To check if the URL is correct after visiting the Test Folder + cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); + cy.visit('/app/file/view/home/Attachments/Test%20Folder'); - //To check if the added file is present in the Test Folder - cy.get('span.level-item > span').should('contain','Test Folder'); - cy.get('.list-row-container').eq(0).should('contain.text','72402.jpg'); - cy.get('.list-row-checkbox').eq(0).click(); + //Adding a file inside the Test Folder + cy.get('.primary-action').contains('Add File').eq(0).click({force: true}); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.get('.btn-primary').contains('Upload').click(); - //Deleting the added file from the Test folder - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.wait(700); - cy.click_modal_primary_button('Yes', {force : true, delay: 700}); - cy.wait(700); + //To check if the added file is present in the Test Folder + cy.get('span.level-item > span').should('contain', 'Test Folder'); + cy.get('.list-row-container').eq(0).should('contain.text', '72402.jpg'); + cy.get('.list-row-checkbox').eq(0).click(); - //Deleting the Test Folder - cy.visit('/app/file/view/home/Attachments'); - cy.get('.list-row-checkbox').eq(0).click(); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes'); - }); + //Deleting the added file from the Test folder + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.wait(700); + cy.click_modal_primary_button('Yes', {force: true, delay: 700}); + cy.wait(700); - it('Deleting Test Folder from the home', () => { - //Deleting the Test Folder added in the home directory - cy.visit('/app/file/view/home'); - cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force : true, delay : 500}); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes', {force : true}); - }); + //Deleting the Test Folder + cy.visit('/app/file/view/home/Attachments'); + cy.get('.list-row-checkbox').eq(0).click(); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes'); + }); + + it('Deleting Test Folder from the home', () => { + //Deleting the Test Folder added in the home directory + cy.visit('/app/file/view/home'); + cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force: true, delay: 500}); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes', {force: true}); + }); }); \ No newline at end of file From b7e42fdc910592e3b0a55500914420eb6668c4e8 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Tue, 10 Aug 2021 18:53:20 +0530 Subject: [PATCH 03/11] test: Added test cases for folder navigation and checking if the nested folder contains the added file --- cypress/integration/folder_navigation.js | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 cypress/integration/folder_navigation.js diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js new file mode 100644 index 0000000000..4a389101b5 --- /dev/null +++ b/cypress/integration/folder_navigation.js @@ -0,0 +1,79 @@ +context('Folder Navigation', () => { + before(() => { + cy.visit('/login'); + cy.login(); + cy.visit('/app/file'); + }); + + it('Adding Folders', () => { + //Adding filter to go into the home folder + cy.get('.filter-selector > .btn').click(); + cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); + cy.get('.filter-action-buttons > .text-muted').click(); + cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); + cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); + cy.get('.filter-action-buttons > div > .btn-primary').click(); + + //Adding folder (Test Folder) + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + }); + + it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { + //Navigating inside the Attachments folder + cy.get('[title="Attachments"] > span').click(); + + //To check if the URL formed after visiting the attachments folder is correct + cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); + cy.visit('/app/file/view/home/Attachments'); + + //Adding folder inside the attachments folder + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + + //Navigating inside the added folder in the Attachments folder + cy.get('[title="Test Folder"] > span').click(); + + //To check if the URL is correct after visiting the Test Folder + cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); + cy.visit('/app/file/view/home/Attachments/Test%20Folder'); + + //Adding a file inside the Test Folder + cy.get('.primary-action').contains('Add File').eq(0).click({force : true}); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.get('.btn-primary').contains('Upload').click(); + + //To check if the added file is present in the Test Folder + cy.get('span.level-item > span').should('contain','Test Folder'); + cy.get('.list-row-container').eq(0).should('contain.text','72402.jpg'); + cy.get('.list-row-checkbox').eq(0).click(); + + //Deleting the added file from the Test folder + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.wait(700); + cy.click_modal_primary_button('Yes', {force : true, delay: 700}); + cy.wait(700); + + //Deleting the Test Folder + cy.visit('/app/file/view/home/Attachments'); + cy.get('.list-row-checkbox').eq(0).click(); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes'); + }); + + it('Deleting Test Folder from the home', () => { + //Deleting the Test Folder added in the home directory + cy.visit('/app/file/view/home'); + cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force : true, delay : 500}); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes', {force : true}); + }); +}); \ No newline at end of file From a881e85cb36e634bb3af0301736d87273089eb2c Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Tue, 10 Aug 2021 19:10:27 +0530 Subject: [PATCH 04/11] test: Fixed sider issues --- cypress/integration/folder_navigation.js | 122 +++++++++++------------ 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js index 4a389101b5..d4fe569828 100644 --- a/cypress/integration/folder_navigation.js +++ b/cypress/integration/folder_navigation.js @@ -5,75 +5,75 @@ context('Folder Navigation', () => { cy.visit('/app/file'); }); - it('Adding Folders', () => { - //Adding filter to go into the home folder - cy.get('.filter-selector > .btn').click(); - cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); - cy.get('.filter-action-buttons > .text-muted').click(); - cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); - cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); - cy.get('.filter-action-buttons > div > .btn-primary').click(); - - //Adding folder (Test Folder) - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); - }); + it('Adding Folders', () => { + //Adding filter to go into the home folder + cy.get('.filter-selector > .btn').click(); + cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); + cy.get('.filter-action-buttons > .text-muted').click(); + cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); + cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); + cy.get('.filter-action-buttons > div > .btn-primary').click(); - it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { - //Navigating inside the Attachments folder - cy.get('[title="Attachments"] > span').click(); + //Adding folder (Test Folder) + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + }); - //To check if the URL formed after visiting the attachments folder is correct - cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); - cy.visit('/app/file/view/home/Attachments'); + it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { + //Navigating inside the Attachments folder + cy.get('[title="Attachments"] > span').click(); - //Adding folder inside the attachments folder - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + //To check if the URL formed after visiting the attachments folder is correct + cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); + cy.visit('/app/file/view/home/Attachments'); - //Navigating inside the added folder in the Attachments folder - cy.get('[title="Test Folder"] > span').click(); + //Adding folder inside the attachments folder + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); + cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); + cy.get('.modal-footer > .standard-actions > .btn-primary').click(); - //To check if the URL is correct after visiting the Test Folder - cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); - cy.visit('/app/file/view/home/Attachments/Test%20Folder'); + //Navigating inside the added folder in the Attachments folder + cy.get('[title="Test Folder"] > span').click(); - //Adding a file inside the Test Folder - cy.get('.primary-action').contains('Add File').eq(0).click({force : true}); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); - cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); - cy.get('.btn-primary').contains('Upload').click(); + //To check if the URL is correct after visiting the Test Folder + cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); + cy.visit('/app/file/view/home/Attachments/Test%20Folder'); - //To check if the added file is present in the Test Folder - cy.get('span.level-item > span').should('contain','Test Folder'); - cy.get('.list-row-container').eq(0).should('contain.text','72402.jpg'); - cy.get('.list-row-checkbox').eq(0).click(); + //Adding a file inside the Test Folder + cy.get('.primary-action').contains('Add File').eq(0).click({force: true}); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.get('.btn-primary').contains('Upload').click(); - //Deleting the added file from the Test folder - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.wait(700); - cy.click_modal_primary_button('Yes', {force : true, delay: 700}); - cy.wait(700); + //To check if the added file is present in the Test Folder + cy.get('span.level-item > span').should('contain', 'Test Folder'); + cy.get('.list-row-container').eq(0).should('contain.text', '72402.jpg'); + cy.get('.list-row-checkbox').eq(0).click(); - //Deleting the Test Folder - cy.visit('/app/file/view/home/Attachments'); - cy.get('.list-row-checkbox').eq(0).click(); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes'); - }); + //Deleting the added file from the Test folder + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.wait(700); + cy.click_modal_primary_button('Yes', {force: true, delay: 700}); + cy.wait(700); - it('Deleting Test Folder from the home', () => { - //Deleting the Test Folder added in the home directory - cy.visit('/app/file/view/home'); - cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force : true, delay : 500}); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes', {force : true}); - }); + //Deleting the Test Folder + cy.visit('/app/file/view/home/Attachments'); + cy.get('.list-row-checkbox').eq(0).click(); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes'); + }); + + it('Deleting Test Folder from the home', () => { + //Deleting the Test Folder added in the home directory + cy.visit('/app/file/view/home'); + cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force: true, delay: 500}); + cy.get('.actions-btn-group > .btn').click(); + cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); + cy.click_modal_primary_button('Yes', {force: true}); + }); }); \ No newline at end of file From 9fce3c60943ea003f719ca5a809b399cb13efb96 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Thu, 8 Jul 2021 18:57:34 +0530 Subject: [PATCH 05/11] test: Added test cases for Email testing --- cypress/integration/email_testing.js | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 cypress/integration/email_testing.js diff --git a/cypress/integration/email_testing.js b/cypress/integration/email_testing.js new file mode 100644 index 0000000000..15cc895600 --- /dev/null +++ b/cypress/integration/email_testing.js @@ -0,0 +1,44 @@ +context('Email Feature Test', () => { + before(() => { + cy.visit('/login'); + cy.login(); + cy.visit('/app/todo'); + }); + + it('Saving and Deleting Email Template', () => { + cy.get('.level-item.ellipsis > .ellipsis').click(); + cy.get('.timeline-actions > .btn').click(); + cy.fill_field('recipients','test@example.com','MultiSelect'); + cy.get('.modal.show > .modal-dialog > .modal-content > .modal-body > :nth-child(1) > .form-layout > .form-page > :nth-child(3) > .section-body > .form-column > form > [data-fieldtype="Text Editor"] > .form-group > .control-input-wrapper > .control-input > .ql-container > .ql-editor').type('Test Mail'); + + cy.get('.add-more-attachments > .btn').click(); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.get('.btn-primary').contains('Upload').click(); + cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Send').click({delay:500}); + cy.get('[data-doctype="Communication"] > .timeline-content').should('contain','Test Mail'); + cy.get('.timeline-content').should('contain','Added 72402.jpg'); + cy.get('[title="Open Communication"] > .icon').click(); + cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .btn').click(); + cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .dropdown-menu > :nth-child(11) > .grey-link').click(); + cy.get('.modal.show > .modal-dialog > .modal-content > .modal-footer > .standard-actions > .btn-primary').click(); + cy.visit('/app/todo'); + cy.get('.level-item.ellipsis > .ellipsis').click(); + cy.get('.attachment-row > .data-pill > .remove-btn > .icon').click(); + cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Yes').click(); + cy.get('.timeline-content').should('contain','Removed 72402.jpg'); + }); + + it('Discarding Email Template', () => { + cy.visit('/app/todo'); + cy.get('.level-item.ellipsis > .ellipsis').click(); + cy.get('.timeline-actions > .btn').click(); + cy.fill_field('recipients','test@example.com','MultiSelect'); + cy.get('.modal-footer > .standard-actions > .btn-secondary').contains('Discard').click(); + cy.get('.timeline-actions > .btn').click(); + cy.get_field('recipients','MultiSelect').should('have.value',''); + cy.get('.modal.show > .modal-dialog > .modal-content > .modal-header > .modal-actions > .btn-modal-close > .icon').click(); + }); + + +}); From f047a5517daea95a1408061fe9d47786aec94d74 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Thu, 19 Aug 2021 20:24:03 +0530 Subject: [PATCH 06/11] test: corrected the selectors and shorten them (using the newly added API's) --- cypress/integration/folder_navigation.js | 134 +++++++++++------------ 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js index d4fe569828..1ff38005ad 100644 --- a/cypress/integration/folder_navigation.js +++ b/cypress/integration/folder_navigation.js @@ -1,79 +1,79 @@ context('Folder Navigation', () => { - before(() => { - cy.visit('/login'); - cy.login(); - cy.visit('/app/file'); - }); - - it('Adding Folders', () => { - //Adding filter to go into the home folder - cy.get('.filter-selector > .btn').click(); - cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); - cy.get('.filter-action-buttons > .text-muted').click(); - cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); - cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); - cy.get('.filter-action-buttons > div > .btn-primary').click(); + before(() => { + cy.visit('/login'); + cy.login(); + cy.visit('/app/file'); + }); - //Adding folder (Test Folder) - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); - }); + it('Adding Folders', () => { + //Adding filter to go into the home folder + cy.get('.filter-selector > .btn').click(); + cy.findByRole('button', {name: 'Clear Filters'}).click(); + cy.get('.filter-action-buttons > .text-muted').click(); + cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); + cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); + cy.get('.filter-action-buttons > div > .btn-primary').click(); - it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { - //Navigating inside the Attachments folder - cy.get('[title="Attachments"] > span').click(); + //Adding folder (Test Folder) + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group [data-label="New Folder"]').click(); + cy.get('form > [data-fieldname="value"]').type('Test Folder'); + cy.findByRole('button', {name: 'Create'}).click(); + }); - //To check if the URL formed after visiting the attachments folder is correct - cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); - cy.visit('/app/file/view/home/Attachments'); + it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { + //Navigating inside the Attachments folder + cy.get('[title="Attachments"] > span').click(); - //Adding folder inside the attachments folder - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); + //To check if the URL formed after visiting the attachments folder is correct + cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); + cy.visit('/app/file/view/home/Attachments'); - //Navigating inside the added folder in the Attachments folder - cy.get('[title="Test Folder"] > span').click(); + //Adding folder inside the attachments folder + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group [data-label="New Folder"]').click(); + cy.get('form > [data-fieldname="value"]').type('Test Folder'); + cy.findByRole('button', {name: 'Create'}).click(); - //To check if the URL is correct after visiting the Test Folder - cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); - cy.visit('/app/file/view/home/Attachments/Test%20Folder'); + //Navigating inside the added folder in the Attachments folder + cy.get('[title="Test Folder"] > span').click(); - //Adding a file inside the Test Folder - cy.get('.primary-action').contains('Add File').eq(0).click({force: true}); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); - cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); - cy.get('.btn-primary').contains('Upload').click(); + //To check if the URL is correct after visiting the Test Folder + cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); + cy.visit('/app/file/view/home/Attachments/Test%20Folder'); - //To check if the added file is present in the Test Folder - cy.get('span.level-item > span').should('contain', 'Test Folder'); - cy.get('.list-row-container').eq(0).should('contain.text', '72402.jpg'); - cy.get('.list-row-checkbox').eq(0).click(); + //Adding a file inside the Test Folder + cy.findByRole('button', {name: 'Add File'}).eq(0).click({force: true}); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.findByRole('button', {name: 'Upload'}).click(); - //Deleting the added file from the Test folder - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.wait(700); - cy.click_modal_primary_button('Yes', {force: true, delay: 700}); - cy.wait(700); + //To check if the added file is present in the Test Folder + cy.get('span.level-item > span').should('contain', 'Test Folder'); + cy.get('.list-row-container').eq(0).should('contain.text', '72402.jpg'); + cy.get('.list-row-checkbox').eq(0).click(); - //Deleting the Test Folder - cy.visit('/app/file/view/home/Attachments'); - cy.get('.list-row-checkbox').eq(0).click(); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes'); - }); + //Deleting the added file from the Test folder + cy.findByRole('button', {name: 'Actions'}).click(); + cy.get('.actions-btn-group [data-label="Delete"]').click(); + cy.wait(700); + cy.findByRole('button', {name: 'Yes'}).click(); + cy.wait(700); - it('Deleting Test Folder from the home', () => { - //Deleting the Test Folder added in the home directory - cy.visit('/app/file/view/home'); - cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force: true, delay: 500}); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes', {force: true}); - }); -}); \ No newline at end of file + //Deleting the Test Folder + cy.visit('/app/file/view/home/Attachments'); + cy.get('.list-row-checkbox').eq(0).click(); + cy.findByRole('button', {name: 'Actions'}).click(); + cy.get('.actions-btn-group [data-label="Delete"]').click(); + cy.findByRole('button', {name: 'Yes'}).click(); + }); + + it('Deleting Test Folder from the home', () => { + //Deleting the Test Folder added in the home directory + cy.visit('/app/file/view/home'); + cy.get('.level-left > .list-subject > .list-row-checkbox').eq(0).click({force: true, delay: 500}); + cy.findByRole('button', {name: 'Actions'}).click(); + cy.get('.actions-btn-group [data-label="Delete"]').click(); + cy.findByRole('button', {name: 'Yes'}).click(); + }); +}); From 8a6b8a5348d48444d8acc278bcfe83c844dbf246 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Thu, 19 Aug 2021 20:41:31 +0530 Subject: [PATCH 07/11] test: corrected selectors and shorten them (using the newly added API's) --- cypress/integration/folder_navigation.js | 81 ------------------------ 1 file changed, 81 deletions(-) diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js index 987bddce7c..1ff38005ad 100644 --- a/cypress/integration/folder_navigation.js +++ b/cypress/integration/folder_navigation.js @@ -1,5 +1,4 @@ context('Folder Navigation', () => { -<<<<<<< HEAD before(() => { cy.visit('/login'); cy.login(); @@ -78,83 +77,3 @@ context('Folder Navigation', () => { cy.findByRole('button', {name: 'Yes'}).click(); }); }); -======= - before(() => { - cy.visit('/login'); - cy.login(); - cy.visit('/app/file'); - }); - - it('Adding Folders', () => { - //Adding filter to go into the home folder - cy.get('.filter-selector > .btn').click(); - cy.get('.filter-action-buttons > div > .btn-secondary').contains('Clear Filters').click(); - cy.get('.filter-action-buttons > .text-muted').click(); - cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); - cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); - cy.get('.filter-action-buttons > div > .btn-primary').click(); - - //Adding folder (Test Folder) - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); - }); - - it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { - //Navigating inside the Attachments folder - cy.get('[title="Attachments"] > span').click(); - - //To check if the URL formed after visiting the attachments folder is correct - cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); - cy.visit('/app/file/view/home/Attachments'); - - //Adding folder inside the attachments folder - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group > .dropdown-menu > .user-action > .grey-link').eq(2).click(); - cy.get('form > .frappe-control > .form-group > .control-input-wrapper > .control-input > .input-with-feedback').type('Test Folder'); - cy.get('.modal-footer > .standard-actions > .btn-primary').click(); - - //Navigating inside the added folder in the Attachments folder - cy.get('[title="Test Folder"] > span').click(); - - //To check if the URL is correct after visiting the Test Folder - cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); - cy.visit('/app/file/view/home/Attachments/Test%20Folder'); - - //Adding a file inside the Test Folder - cy.get('.primary-action').contains('Add File').eq(0).click({force: true}); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); - cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); - cy.get('.btn-primary').contains('Upload').click(); - - //To check if the added file is present in the Test Folder - cy.get('span.level-item > span').should('contain', 'Test Folder'); - cy.get('.list-row-container').eq(0).should('contain.text', '72402.jpg'); - cy.get('.list-row-checkbox').eq(0).click(); - - //Deleting the added file from the Test folder - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.wait(700); - cy.click_modal_primary_button('Yes', {force: true, delay: 700}); - cy.wait(700); - - //Deleting the Test Folder - cy.visit('/app/file/view/home/Attachments'); - cy.get('.list-row-checkbox').eq(0).click(); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes'); - }); - - it('Deleting Test Folder from the home', () => { - //Deleting the Test Folder added in the home directory - cy.visit('/app/file/view/home'); - cy.get('.list-row-container > .list-row > .level-left > .list-subject > .list-row-checkbox').eq(0).click({force: true, delay: 500}); - cy.get('.actions-btn-group > .btn').click(); - cy.get('.actions-btn-group > .dropdown-menu > li > .grey-link').eq(5).click(); - cy.click_modal_primary_button('Yes', {force: true}); - }); -}); ->>>>>>> 166574b1d065ac0c0461a671d7fe837a9d35b7ce From 533b0147b28b069bd3d4ed4c41e4d20528b6a572 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Thu, 19 Aug 2021 20:58:12 +0530 Subject: [PATCH 08/11] test: Fixed sider issues --- cypress/integration/folder_navigation.js | 130 +++++++++++------------ 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js index 1ff38005ad..09df8d2d20 100644 --- a/cypress/integration/folder_navigation.js +++ b/cypress/integration/folder_navigation.js @@ -1,79 +1,79 @@ context('Folder Navigation', () => { - before(() => { - cy.visit('/login'); - cy.login(); - cy.visit('/app/file'); - }); + before(() => { + cy.visit('/login'); + cy.login(); + cy.visit('/app/file'); + }); - it('Adding Folders', () => { - //Adding filter to go into the home folder - cy.get('.filter-selector > .btn').click(); - cy.findByRole('button', {name: 'Clear Filters'}).click(); - cy.get('.filter-action-buttons > .text-muted').click(); - cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); - cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); - cy.get('.filter-action-buttons > div > .btn-primary').click(); + it('Adding Folders', () => { + //Adding filter to go into the home folder + cy.get('.filter-selector > .btn').click(); + cy.findByRole('button', {name: 'Clear Filters'}).click(); + cy.get('.filter-action-buttons > .text-muted').click(); + cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); + cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); + cy.get('.filter-action-buttons > div > .btn-primary').click(); - //Adding folder (Test Folder) - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group [data-label="New Folder"]').click(); - cy.get('form > [data-fieldname="value"]').type('Test Folder'); - cy.findByRole('button', {name: 'Create'}).click(); - }); + //Adding folder (Test Folder) + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group [data-label="New Folder"]').click(); + cy.get('form > [data-fieldname="value"]').type('Test Folder'); + cy.findByRole('button', {name: 'Create'}).click(); + }); - it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { - //Navigating inside the Attachments folder - cy.get('[title="Attachments"] > span').click(); + it('Navigating the nested folders, checking if the URL formed is correct, checking if the added content in the child folder is correct', () => { + //Navigating inside the Attachments folder + cy.get('[title="Attachments"] > span').click(); - //To check if the URL formed after visiting the attachments folder is correct - cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); - cy.visit('/app/file/view/home/Attachments'); + //To check if the URL formed after visiting the attachments folder is correct + cy.location('pathname').should('eq', '/app/file/view/home/Attachments'); + cy.visit('/app/file/view/home/Attachments'); - //Adding folder inside the attachments folder - cy.get('.menu-btn-group > .btn').click(); - cy.get('.menu-btn-group [data-label="New Folder"]').click(); - cy.get('form > [data-fieldname="value"]').type('Test Folder'); - cy.findByRole('button', {name: 'Create'}).click(); + //Adding folder inside the attachments folder + cy.get('.menu-btn-group > .btn').click(); + cy.get('.menu-btn-group [data-label="New Folder"]').click(); + cy.get('form > [data-fieldname="value"]').type('Test Folder'); + cy.findByRole('button', {name: 'Create'}).click(); - //Navigating inside the added folder in the Attachments folder - cy.get('[title="Test Folder"] > span').click(); + //Navigating inside the added folder in the Attachments folder + cy.get('[title="Test Folder"] > span').click(); - //To check if the URL is correct after visiting the Test Folder - cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); - cy.visit('/app/file/view/home/Attachments/Test%20Folder'); + //To check if the URL is correct after visiting the Test Folder + cy.location('pathname').should('eq', '/app/file/view/home/Attachments/Test%20Folder'); + cy.visit('/app/file/view/home/Attachments/Test%20Folder'); - //Adding a file inside the Test Folder - cy.findByRole('button', {name: 'Add File'}).eq(0).click({force: true}); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); - cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); - cy.findByRole('button', {name: 'Upload'}).click(); + //Adding a file inside the Test Folder + cy.findByRole('button', {name: 'Add File'}).eq(0).click({force: true}); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.findByRole('button', {name: 'Upload'}).click(); - //To check if the added file is present in the Test Folder - cy.get('span.level-item > span').should('contain', 'Test Folder'); - cy.get('.list-row-container').eq(0).should('contain.text', '72402.jpg'); - cy.get('.list-row-checkbox').eq(0).click(); + //To check if the added file is present in the Test Folder + cy.get('span.level-item > span').should('contain', 'Test Folder'); + cy.get('.list-row-container').eq(0).should('contain.text', '72402.jpg'); + cy.get('.list-row-checkbox').eq(0).click(); - //Deleting the added file from the Test folder - cy.findByRole('button', {name: 'Actions'}).click(); - cy.get('.actions-btn-group [data-label="Delete"]').click(); - cy.wait(700); - cy.findByRole('button', {name: 'Yes'}).click(); - cy.wait(700); + //Deleting the added file from the Test folder + cy.findByRole('button', {name: 'Actions'}).click(); + cy.get('.actions-btn-group [data-label="Delete"]').click(); + cy.wait(700); + cy.findByRole('button', {name: 'Yes'}).click(); + cy.wait(700); - //Deleting the Test Folder - cy.visit('/app/file/view/home/Attachments'); - cy.get('.list-row-checkbox').eq(0).click(); - cy.findByRole('button', {name: 'Actions'}).click(); - cy.get('.actions-btn-group [data-label="Delete"]').click(); - cy.findByRole('button', {name: 'Yes'}).click(); - }); + //Deleting the Test Folder + cy.visit('/app/file/view/home/Attachments'); + cy.get('.list-row-checkbox').eq(0).click(); + cy.findByRole('button', {name: 'Actions'}).click(); + cy.get('.actions-btn-group [data-label="Delete"]').click(); + cy.findByRole('button', {name: 'Yes'}).click(); + }); - it('Deleting Test Folder from the home', () => { - //Deleting the Test Folder added in the home directory - cy.visit('/app/file/view/home'); - cy.get('.level-left > .list-subject > .list-row-checkbox').eq(0).click({force: true, delay: 500}); - cy.findByRole('button', {name: 'Actions'}).click(); - cy.get('.actions-btn-group [data-label="Delete"]').click(); - cy.findByRole('button', {name: 'Yes'}).click(); - }); + it('Deleting Test Folder from the home', () => { + //Deleting the Test Folder added in the home directory + cy.visit('/app/file/view/home'); + cy.get('.level-left > .list-subject > .list-row-checkbox').eq(0).click({force: true, delay: 500}); + cy.findByRole('button', {name: 'Actions'}).click(); + cy.get('.actions-btn-group [data-label="Delete"]').click(); + cy.findByRole('button', {name: 'Yes'}).click(); + }); }); From a8846d52df900ae71539cc0b06f83ec0aad96833 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Thu, 19 Aug 2021 21:04:02 +0530 Subject: [PATCH 09/11] test: Fixed sider issues --- cypress/integration/email_testing.js | 66 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/cypress/integration/email_testing.js b/cypress/integration/email_testing.js index 15cc895600..cdc7a90af5 100644 --- a/cypress/integration/email_testing.js +++ b/cypress/integration/email_testing.js @@ -5,40 +5,38 @@ context('Email Feature Test', () => { cy.visit('/app/todo'); }); - it('Saving and Deleting Email Template', () => { - cy.get('.level-item.ellipsis > .ellipsis').click(); - cy.get('.timeline-actions > .btn').click(); - cy.fill_field('recipients','test@example.com','MultiSelect'); - cy.get('.modal.show > .modal-dialog > .modal-content > .modal-body > :nth-child(1) > .form-layout > .form-page > :nth-child(3) > .section-body > .form-column > form > [data-fieldtype="Text Editor"] > .form-group > .control-input-wrapper > .control-input > .ql-container > .ql-editor').type('Test Mail'); - - cy.get('.add-more-attachments > .btn').click(); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); - cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); - cy.get('.btn-primary').contains('Upload').click(); - cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Send').click({delay:500}); - cy.get('[data-doctype="Communication"] > .timeline-content').should('contain','Test Mail'); - cy.get('.timeline-content').should('contain','Added 72402.jpg'); - cy.get('[title="Open Communication"] > .icon').click(); - cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .btn').click(); - cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .dropdown-menu > :nth-child(11) > .grey-link').click(); - cy.get('.modal.show > .modal-dialog > .modal-content > .modal-footer > .standard-actions > .btn-primary').click(); - cy.visit('/app/todo'); - cy.get('.level-item.ellipsis > .ellipsis').click(); - cy.get('.attachment-row > .data-pill > .remove-btn > .icon').click(); - cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Yes').click(); - cy.get('.timeline-content').should('contain','Removed 72402.jpg'); - }); + it('Saving and Deleting Email Template', () => { + cy.get('.level-item.ellipsis > .ellipsis').click(); + cy.get('.timeline-actions > .btn').click(); + cy.fill_field('recipients','test@example.com','MultiSelect'); + cy.get('.modal.show > .modal-dialog > .modal-content > .modal-body > :nth-child(1) > .form-layout > .form-page > :nth-child(3) > .section-body > .form-column > form > [data-fieldtype="Text Editor"] > .form-group > .control-input-wrapper > .control-input > .ql-container > .ql-editor').type('Test Mail'); - it('Discarding Email Template', () => { - cy.visit('/app/todo'); - cy.get('.level-item.ellipsis > .ellipsis').click(); - cy.get('.timeline-actions > .btn').click(); - cy.fill_field('recipients','test@example.com','MultiSelect'); - cy.get('.modal-footer > .standard-actions > .btn-secondary').contains('Discard').click(); - cy.get('.timeline-actions > .btn').click(); - cy.get_field('recipients','MultiSelect').should('have.value',''); - cy.get('.modal.show > .modal-dialog > .modal-content > .modal-header > .modal-actions > .btn-modal-close > .icon').click(); - }); + cy.get('.add-more-attachments > .btn').click(); + cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); + cy.get('.btn-primary').contains('Upload').click(); + cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Send').click({delay:500}); + cy.get('[data-doctype="Communication"] > .timeline-content').should('contain','Test Mail'); + cy.get('.timeline-content').should('contain','Added 72402.jpg'); + cy.get('[title="Open Communication"] > .icon').click(); + cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .btn').click(); + cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .dropdown-menu > :nth-child(11) > .grey-link').click(); + cy.get('.modal.show > .modal-dialog > .modal-content > .modal-footer > .standard-actions > .btn-primary').click(); + cy.visit('/app/todo'); + cy.get('.level-item.ellipsis > .ellipsis').click(); + cy.get('.attachment-row > .data-pill > .remove-btn > .icon').click(); + cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Yes').click(); + cy.get('.timeline-content').should('contain','Removed 72402.jpg'); + }); - + it('Discarding Email Template', () => { + cy.visit('/app/todo'); + cy.get('.level-item.ellipsis > .ellipsis').click(); + cy.get('.timeline-actions > .btn').click(); + cy.fill_field('recipients','test@example.com','MultiSelect'); + cy.get('.modal-footer > .standard-actions > .btn-secondary').contains('Discard').click(); + cy.get('.timeline-actions > .btn').click(); + cy.get_field('recipients','MultiSelect').should('have.value',''); + cy.get('.modal.show > .modal-dialog > .modal-content > .modal-header > .modal-actions > .btn-modal-close > .icon').click(); + }); }); From f53622d21ecd69a1565354fd6b540f5d4b2db84c Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Thu, 19 Aug 2021 21:10:08 +0530 Subject: [PATCH 10/11] test: Deleted the file email_testing.js --- cypress/integration/email_testing.js | 42 ---------------------------- 1 file changed, 42 deletions(-) delete mode 100644 cypress/integration/email_testing.js diff --git a/cypress/integration/email_testing.js b/cypress/integration/email_testing.js deleted file mode 100644 index cdc7a90af5..0000000000 --- a/cypress/integration/email_testing.js +++ /dev/null @@ -1,42 +0,0 @@ -context('Email Feature Test', () => { - before(() => { - cy.visit('/login'); - cy.login(); - cy.visit('/app/todo'); - }); - - it('Saving and Deleting Email Template', () => { - cy.get('.level-item.ellipsis > .ellipsis').click(); - cy.get('.timeline-actions > .btn').click(); - cy.fill_field('recipients','test@example.com','MultiSelect'); - cy.get('.modal.show > .modal-dialog > .modal-content > .modal-body > :nth-child(1) > .form-layout > .form-page > :nth-child(3) > .section-body > .form-column > form > [data-fieldtype="Text Editor"] > .form-group > .control-input-wrapper > .control-input > .ql-container > .ql-editor').type('Test Mail'); - - cy.get('.add-more-attachments > .btn').click(); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); - cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); - cy.get('.btn-primary').contains('Upload').click(); - cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Send').click({delay:500}); - cy.get('[data-doctype="Communication"] > .timeline-content').should('contain','Test Mail'); - cy.get('.timeline-content').should('contain','Added 72402.jpg'); - cy.get('[title="Open Communication"] > .icon').click(); - cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .btn').click(); - cy.get('#page-Communication > .page-head > .container > .row > .col > .standard-actions > .menu-btn-group > .dropdown-menu > :nth-child(11) > .grey-link').click(); - cy.get('.modal.show > .modal-dialog > .modal-content > .modal-footer > .standard-actions > .btn-primary').click(); - cy.visit('/app/todo'); - cy.get('.level-item.ellipsis > .ellipsis').click(); - cy.get('.attachment-row > .data-pill > .remove-btn > .icon').click(); - cy.get('.modal-footer > .standard-actions > .btn-primary').contains('Yes').click(); - cy.get('.timeline-content').should('contain','Removed 72402.jpg'); - }); - - it('Discarding Email Template', () => { - cy.visit('/app/todo'); - cy.get('.level-item.ellipsis > .ellipsis').click(); - cy.get('.timeline-actions > .btn').click(); - cy.fill_field('recipients','test@example.com','MultiSelect'); - cy.get('.modal-footer > .standard-actions > .btn-secondary').contains('Discard').click(); - cy.get('.timeline-actions > .btn').click(); - cy.get_field('recipients','MultiSelect').should('have.value',''); - cy.get('.modal.show > .modal-dialog > .modal-content > .modal-header > .modal-actions > .btn-modal-close > .icon').click(); - }); -}); From 9df31cfed1594c4aca4629b22e741959de84c042 Mon Sep 17 00:00:00 2001 From: Komal-Saraf0609 Date: Sat, 28 Aug 2021 01:55:46 +0530 Subject: [PATCH 11/11] test: Corrected the selectors for clicking of a button to make it more readable --- cypress/integration/folder_navigation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/integration/folder_navigation.js b/cypress/integration/folder_navigation.js index 09df8d2d20..1b7c02d98c 100644 --- a/cypress/integration/folder_navigation.js +++ b/cypress/integration/folder_navigation.js @@ -7,12 +7,12 @@ context('Folder Navigation', () => { it('Adding Folders', () => { //Adding filter to go into the home folder - cy.get('.filter-selector > .btn').click(); + cy.get('.filter-selector > .btn').findByText('1 filter').click(); cy.findByRole('button', {name: 'Clear Filters'}).click(); - cy.get('.filter-action-buttons > .text-muted').click(); + cy.get('.filter-action-buttons > .text-muted').findByText('+ Add a Filter').click(); cy.get('.fieldname-select-area > .awesomplete > .form-control').type('Fol{enter}'); cy.get('.filter-field > .form-group > .link-field > .awesomplete > .input-with-feedback').type('Home{enter}'); - cy.get('.filter-action-buttons > div > .btn-primary').click(); + cy.get('.filter-action-buttons > div > .btn-primary').findByText('Apply Filters').click(); //Adding folder (Test Folder) cy.get('.menu-btn-group > .btn').click(); @@ -44,7 +44,7 @@ context('Folder Navigation', () => { //Adding a file inside the Test Folder cy.findByRole('button', {name: 'Add File'}).eq(0).click({force: true}); - cy.get('.mt-2 > .btn > .mt-1').eq(2).click(); + cy.get('.file-uploader').findByText('Link').click(); cy.get('.input-group > .form-control').type('https://wallpaperplay.com/walls/full/8/2/b/72402.jpg'); cy.findByRole('button', {name: 'Upload'}).click();