diff --git a/e2e-tests/cypress/tests/integration/channels/plugins/plugin_install_spec.js b/e2e-tests/cypress/tests/integration/channels/plugins/plugin_install_spec.js index 445b81193308..f010f6485a64 100644 --- a/e2e-tests/cypress/tests/integration/channels/plugins/plugin_install_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/plugins/plugin_install_spec.js @@ -41,9 +41,6 @@ describe('Plugins Management', () => { cy.get('input[type=file]').attachFile({fileContent, fileName: demoPlugin.filename, mimeType}); }); - // # Upload plugin - cy.get('#uploadPlugin').scrollIntoView().should('be.visible').click().wait(TIMEOUTS.HALF_SEC); - // * Verify initial disabled state after upload cy.findByTestId(demoPlugin.id, {timeout: TIMEOUTS.FIVE_MIN}).scrollIntoView().should('be.visible').within(() => { cy.findByText('Enable').should('be.visible'); diff --git a/e2e-tests/cypress/tests/integration/channels/plugins/plugin_startup_fail_spec.js b/e2e-tests/cypress/tests/integration/channels/plugins/plugin_startup_fail_spec.js index f8b8b1c0d253..5fcdc96475ae 100644 --- a/e2e-tests/cypress/tests/integration/channels/plugins/plugin_startup_fail_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/plugins/plugin_startup_fail_spec.js @@ -38,17 +38,8 @@ describe('If plugins fail to start, they can be disabled', () => { cy.get('input[type=file]').attachFile({fileContent, fileName: gitlabPlugin.filename, mimeType}); }); - cy.get('#uploadPlugin').scrollIntoView().should('be.visible').click().wait(TIMEOUTS.HALF_SEC); - - // * Verify that the button shows correct text while uploading - cy.findByText('Uploading...', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible'); - - // * Verify that the button shows correct text and is disabled after upload - cy.findByText('Upload', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible'); - cy.get('#uploadPlugin').and('be.disabled'); - // # Enable GitLab plugin - cy.findByTestId(gitlabPlugin.id).scrollIntoView().should('be.visible').within(() => { + cy.findByTestId(gitlabPlugin.id, {timeout: TIMEOUTS.FIVE_MIN}).scrollIntoView().should('be.visible').within(() => { // * Verify GitLab Plugin title is shown cy.waitUntil(() => cy.get('strong').scrollIntoView().should('be.visible').then((title) => { return title[0].innerText === 'GitLab'; diff --git a/e2e-tests/cypress/tests/integration/channels/plugins/upgrade_spec.js b/e2e-tests/cypress/tests/integration/channels/plugins/upgrade_spec.js index c52b17e4e3f1..f7f83449cb0f 100644 --- a/e2e-tests/cypress/tests/integration/channels/plugins/upgrade_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/plugins/upgrade_spec.js @@ -53,15 +53,8 @@ describe('Plugin remains enabled when upgraded', () => { cy.get('input[type=file]').attachFile({fileContent, fileName: demoPluginOld.filename, mimeType}); }); - cy.get('#uploadPlugin').scrollIntoView().should('be.visible').click().wait(TIMEOUTS.HALF_SEC); - - // * Verify that the button shows correct text while uploading - cy.findByText('Uploading...', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible'); - - // * Verify that the button shows correct text and is disabled after upload + // * Verify the old demo plugin is installed after selecting the file waitForServerStatus(demoPluginOld.id, demoPluginOld.version, {isInstalled: true}); - cy.findByText('Upload', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible'); - cy.get('#uploadPlugin', {timeout: TIMEOUTS.ONE_MIN}).should('be.disabled'); // * Verify that the old demo plugin is successfully uploaded cy.findByText(`Successfully uploaded plugin from ${demoPluginOld.filename}`); @@ -80,7 +73,7 @@ describe('Plugin remains enabled when upgraded', () => { // * Verify older version of demo plugin cy.findByText(new RegExp(`${demoPluginOld.id} - ${demoPluginOld.version}`)).scrollIntoView().should('be.visible'); - cy.get('#uploadPlugin').scrollIntoView().should('be.visible'); + cy.findByText('Click or drop plugin bundle to upload').scrollIntoView().should('be.visible'); // # Upgrade plugin cy.fixture(demoPlugin.filename, 'binary'). @@ -89,16 +82,11 @@ describe('Plugin remains enabled when upgraded', () => { cy.get('input[type=file]').attachFile({fileContent, fileName: demoPlugin.filename, mimeType}); }); - // * Verify that the button shows correct text while uploading - cy.get('#uploadPlugin').should('be.visible').click().wait(TIMEOUTS.HALF_SEC); - // # Confirm overwrite of plugin with same name cy.get('#confirmModalButton').should('be.visible').click(); - // * Verify that the button shows correct text and is disabled after upload + // * Verify that the latest demo plugin is uploaded and remains active after overwrite waitForServerStatus(demoPlugin.id, demoPlugin.version, {isActive: true}); - cy.findByText('Upload', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible'); - cy.get('#uploadPlugin', {timeout: TIMEOUTS.ONE_MIN}).should('be.disabled'); // * Verify that the latest demo plugin is successfully uploaded cy.findByText(`Successfully updated plugin from ${demoPlugin.filename}`); diff --git a/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap b/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap index af8f9da2f83e..d7a188a17d43 100644 --- a/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/plugin_management/__snapshots__/plugin_management.test.tsx.snap @@ -16,7 +16,7 @@ exports[`components/PluginManagement should match snapshot 1`] = ` Plugin Management
-
- - -