Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand All @@ -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').
Expand All @@ -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}`);
Expand Down
Loading
Loading