snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Nightly Race / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 1s
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Nightly Race / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 1s
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Group: @channels @not_cloud @plugin_marketplace @plugin @plugins_uninstall
|
||||
|
||||
import {githubPlugin} from '@/utils/plugins';
|
||||
|
||||
describe('Plugin Marketplace', () => {
|
||||
let townsquareLink;
|
||||
|
||||
before(() => {
|
||||
cy.shouldNotRunOnCloudEdition();
|
||||
cy.shouldHavePluginUploadEnabled();
|
||||
cy.apiUninstallAllPlugins();
|
||||
|
||||
cy.apiInitSetup().then(({team}) => {
|
||||
townsquareLink = `/${team.name}/channels/town-square`;
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Enable Plugin Marketplace
|
||||
// # Disable Plugin Remote Marketplace
|
||||
// # Disable Automatic Prepackaged Plugins to make sure no plugins are loaded
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: true,
|
||||
EnableRemoteMarketplace: false,
|
||||
AutomaticPrepackagedPlugins: false,
|
||||
},
|
||||
});
|
||||
|
||||
// # Visit town-square channel
|
||||
cy.visit(townsquareLink);
|
||||
|
||||
// # Open up marketplace
|
||||
cy.uiOpenProductMenu('Marketplace');
|
||||
});
|
||||
|
||||
it('not display any plugins and no error bar', () => {
|
||||
// * Verify no plugins should be visible
|
||||
cy.get('#marketplaceTabs-pane-allListing').findByText('There are no plugins available at this time.');
|
||||
|
||||
// * Verify no error bar should be visible
|
||||
cy.get('#error_bar').should('not.exist');
|
||||
});
|
||||
|
||||
it('MM-T1979 display installed plugins', () => {
|
||||
// # Install one plugin
|
||||
cy.apiInstallPluginFromUrl(githubPlugin.url);
|
||||
|
||||
// # Scroll to GitHub plugin
|
||||
cy.get('#marketplace-plugin-github').scrollIntoView().should('be.visible');
|
||||
|
||||
// * Verify the installed plugin shows up in "Installed" tab
|
||||
cy.uiCloseAnnouncementBar().then(() => {
|
||||
cy.get('#marketplaceTabs-tab-installed').scrollIntoView().should('be.visible').click();
|
||||
cy.get('#marketplaceTabs-pane-installed').find('.more-modal__row').should('have.length', 1);
|
||||
});
|
||||
|
||||
// * Verify no error bar should be visible
|
||||
cy.get('#error_bar').should('not.exist');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
export function verifyPluginMarketplaceVisibility(shouldBeVisible) {
|
||||
cy.uiOpenProductMenu().within(() => {
|
||||
if (shouldBeVisible) {
|
||||
// * Verify Marketplace button should exist
|
||||
cy.findByText('App Marketplace').should('exist');
|
||||
} else {
|
||||
// * Verify Marketplace button should not exist
|
||||
cy.findByText('App Marketplace').should('not.exist');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Group: @channels @not_cloud @plugin_marketplace @plugin @plugins_uninstall
|
||||
|
||||
import {githubPlugin} from '@/utils/plugins';
|
||||
|
||||
describe('Plugin Marketplace', () => {
|
||||
let townsquareLink;
|
||||
|
||||
before(() => {
|
||||
cy.shouldNotRunOnCloudEdition();
|
||||
cy.shouldHavePluginUploadEnabled();
|
||||
|
||||
cy.apiInitSetup().then(({team}) => {
|
||||
townsquareLink = `/${team.name}/channels/town-square`;
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Login as sysadmin
|
||||
cy.apiAdminLogin();
|
||||
|
||||
// # Enable Plugin Marketplace and Remote Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: true,
|
||||
EnableRemoteMarketplace: true,
|
||||
MarketplaceURL: 'example.com',
|
||||
},
|
||||
});
|
||||
|
||||
// # Cleanup installed plugins
|
||||
cy.apiUninstallAllPlugins();
|
||||
|
||||
// # Visit the Town Square channel
|
||||
cy.visit(townsquareLink);
|
||||
|
||||
// # Open up marketplace
|
||||
cy.uiOpenProductMenu('Marketplace');
|
||||
});
|
||||
|
||||
it('render an error bar', () => {
|
||||
// * Verify should be an error connecting to the marketplace server
|
||||
cy.get('#error_bar').contains('Error connecting to the marketplace server');
|
||||
});
|
||||
|
||||
it('show an error bar on failing to filter', () => {
|
||||
// # Enable Plugin Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: true,
|
||||
MarketplaceURL: 'example.com',
|
||||
},
|
||||
});
|
||||
|
||||
// # Filter to jira plugin only
|
||||
cy.get('#searchMarketplaceTextbox').typeWithForce('jira');
|
||||
|
||||
// * Verify should be an error connecting to the marketplace server
|
||||
cy.get('#error_bar').contains('Error connecting to the marketplace server');
|
||||
});
|
||||
|
||||
it('display installed plugins and error bar', () => {
|
||||
// # Install one plugin
|
||||
cy.apiInstallPluginFromUrl(githubPlugin.url, true);
|
||||
|
||||
// # Scroll to GitHub plugin
|
||||
cy.get('#marketplace-plugin-github').scrollIntoView().should('be.visible');
|
||||
|
||||
// * Verify the installed plugin shows up in "Installed" tab
|
||||
cy.get('#marketplaceTabs-tab-installed').scrollIntoView().should('be.visible').click();
|
||||
cy.get('#marketplaceTabs-pane-installed').find('.more-modal__row').should('have.length', 1);
|
||||
|
||||
// * Verify should be an error connecting to the marketplace server
|
||||
cy.get('#error_bar').contains('Error connecting to the marketplace server');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,84 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @plugin_marketplace @not_cloud
|
||||
|
||||
import {verifyPluginMarketplaceVisibility} from './helpers';
|
||||
|
||||
describe('Plugin Marketplace', () => {
|
||||
let townsquareLink;
|
||||
let regularUser;
|
||||
|
||||
before(() => {
|
||||
cy.apiInitSetup().then(({team, user}) => {
|
||||
regularUser = user;
|
||||
townsquareLink = `/${team.name}/channels/town-square`;
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Login as sysadmin
|
||||
cy.apiAdminLogin();
|
||||
});
|
||||
|
||||
it('MM-T1952 Plugin Marketplace is not available to normal users', () => {
|
||||
// # Enable Plugin Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: true,
|
||||
MarketplaceURL: 'https://api.integrations.mattermost.com',
|
||||
},
|
||||
});
|
||||
|
||||
// # Login as non admin user
|
||||
cy.apiLogin(regularUser);
|
||||
cy.visit(townsquareLink);
|
||||
|
||||
// * Verify Plugin Marketplace does not exist
|
||||
verifyPluginMarketplaceVisibility(false);
|
||||
});
|
||||
|
||||
it('MM-T1957 Marketplace is not available when "Enable Marketplace" is set to false', () => {
|
||||
// # Enable Plugins
|
||||
// # Disable Plugin Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: false,
|
||||
MarketplaceURL: 'https://api.integrations.mattermost.com',
|
||||
},
|
||||
});
|
||||
|
||||
// # Visit town-square channel
|
||||
cy.visit(townsquareLink);
|
||||
|
||||
// * Verify Plugin Marketplace does not exist
|
||||
verifyPluginMarketplaceVisibility(false);
|
||||
});
|
||||
|
||||
it('MM-T1959 Marketplace is not available when "Enable Plugins" is false', () => {
|
||||
// # Disable Plugins
|
||||
// # Enable Plugin Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: false,
|
||||
EnableMarketplace: true,
|
||||
MarketplaceURL: 'https://api.integrations.mattermost.com',
|
||||
},
|
||||
});
|
||||
|
||||
// # Visit town-square channel
|
||||
cy.visit(townsquareLink);
|
||||
|
||||
// * Verify Plugin Marketplace does not exist
|
||||
verifyPluginMarketplaceVisibility(false);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,69 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @plugin_marketplace @not_cloud
|
||||
|
||||
import {verifyPluginMarketplaceVisibility} from './helpers';
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
|
||||
describe('Plugin Marketplace', () => {
|
||||
let townsquareLink;
|
||||
let pluginManagementPage;
|
||||
|
||||
before(() => {
|
||||
cy.apiInitSetup().then(({team}) => {
|
||||
townsquareLink = `/${team.name}/channels/town-square`;
|
||||
pluginManagementPage = '/admin_console/plugins/plugin_management';
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T1960 Marketplace is available when "Enable Plugins" is true', () => {
|
||||
// # Disable Plugins
|
||||
// # Enable Plugin Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: false,
|
||||
EnableMarketplace: true,
|
||||
MarketplaceURL: 'https://api.integrations.mattermost.com',
|
||||
},
|
||||
});
|
||||
cy.visit(pluginManagementPage);
|
||||
|
||||
cy.wait(TIMEOUTS.HALF_SEC).get('input[data-testid="enablefalse"]').should('be.checked');
|
||||
cy.get('input[data-testid="enabletrue"]').check();
|
||||
cy.get('#saveSetting').click();
|
||||
|
||||
// Verify that the Plugin Marketplace is available
|
||||
cy.visit(townsquareLink);
|
||||
verifyPluginMarketplaceVisibility(true);
|
||||
});
|
||||
|
||||
it('MM-T1958 Marketplace is available when "Enable Marketplace" is set to true', () => {
|
||||
// # Enable Plugins
|
||||
// # Disable Plugin Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: false,
|
||||
MarketplaceURL: 'https://api.integrations.mattermost.com',
|
||||
},
|
||||
});
|
||||
cy.visit(pluginManagementPage);
|
||||
|
||||
cy.wait(TIMEOUTS.HALF_SEC).get('input[data-testid="enableMarketplacefalse"]').should('be.checked');
|
||||
cy.get('input[data-testid="enableMarketplacetrue"]').check();
|
||||
cy.get('#saveSetting').click();
|
||||
|
||||
// Verify that the Plugin Marketplace is available
|
||||
cy.visit(townsquareLink);
|
||||
verifyPluginMarketplaceVisibility(true);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,254 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Group: @channels @not_cloud @plugin_marketplace @plugin @plugins_uninstall
|
||||
|
||||
import * as TIMEOUTS from '@/fixtures/timeouts';
|
||||
import {githubPluginOld} from '@/utils/plugins';
|
||||
|
||||
describe('Plugin Marketplace', () => {
|
||||
let townsquareLink;
|
||||
|
||||
before(() => {
|
||||
cy.shouldNotRunOnCloudEdition();
|
||||
cy.shouldHavePluginUploadEnabled();
|
||||
|
||||
cy.apiInitSetup().then(({team}) => {
|
||||
townsquareLink = `/${team.name}/channels/town-square`;
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Enable Plugin Marketplace and Remote Marketplace
|
||||
// # Disable Plugin State Github and Webex
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: true,
|
||||
EnableRemoteMarketplace: true,
|
||||
MarketplaceURL: 'https://api.integrations.mattermost.com',
|
||||
PluginStates: {
|
||||
github: {
|
||||
Enable: false,
|
||||
},
|
||||
'com.mattermost.webex': {
|
||||
Enable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// # Cleanup installed plugins
|
||||
cy.apiUninstallAllPlugins();
|
||||
|
||||
// # Visit the Town Square channel
|
||||
cy.visit(townsquareLink);
|
||||
|
||||
// # Open up marketplace
|
||||
cy.uiOpenProductMenu('Marketplace');
|
||||
|
||||
// * Verify error bar should not be visible
|
||||
cy.get('#error_bar').should('not.exist');
|
||||
|
||||
// * Verify search should be visible
|
||||
cy.findByPlaceholderText('Search Marketplace').scrollIntoView().should('be.visible');
|
||||
|
||||
// * Verify tabs should be visible
|
||||
cy.get('#marketplaceTabs').should('be.visible');
|
||||
|
||||
// * Verify all plugins tab button should be visible
|
||||
cy.get('#marketplaceTabs-tab-allListing').should('be.visible');
|
||||
|
||||
// * Verify installed plugins tabs button should be visible
|
||||
cy.get('#marketplaceTabs-tab-installed').should('be.visible');
|
||||
|
||||
// * Verify list of all plugins are visible
|
||||
cy.get('#marketplaceTabs-pane-allListing').should('be.visible');
|
||||
});
|
||||
|
||||
// https://mattermost.atlassian.net/browse/MM-54230
|
||||
it('MM-T2001 autofocus on search plugin input box', () => {
|
||||
cy.uiClose();
|
||||
|
||||
// # Open up marketplace
|
||||
cy.uiOpenProductMenu('Marketplace');
|
||||
|
||||
// * Verify search plugins should be focused
|
||||
cy.findByPlaceholderText('Search Marketplace').should('be.focused');
|
||||
});
|
||||
|
||||
// https://mattermost.atlassian.net/browse/MM-54230
|
||||
it('render the list of all plugins by default', () => {
|
||||
// * Verify all plugins tab should be active
|
||||
cy.get('#marketplaceTabs-tab-allListing').should('be.visible').parent().should('have.class', 'active');
|
||||
cy.get('#marketplaceTabs-pane-allListing').should('be.visible');
|
||||
|
||||
// * Verify installed plugins tab should not be active
|
||||
cy.get('#marketplaceTabs-tab-installed').should('be.visible').parent().should('not.have.class', 'active');
|
||||
cy.get('#marketplaceTabs-pane-installed').should('not.exist');
|
||||
});
|
||||
|
||||
// https://mattermost.atlassian.net/browse/MM-54230
|
||||
// this test uses exist, not visible, due to issues with Cypress
|
||||
it('render the list of installed plugins on demand', () => {
|
||||
// # Click on installed plugins tab
|
||||
cy.get('#marketplaceTabs-tab-installed').should('be.visible').click();
|
||||
|
||||
// * Verify all plugins tab should not be active
|
||||
cy.get('#marketplaceTabs-tab-allListing').should('be.visible').parent().should('not.have.class', 'active');
|
||||
cy.get('#marketplaceTabs-pane-allListing').should('not.exist');
|
||||
|
||||
// * Verify installed plugins tab is shown
|
||||
cy.get('#marketplaceTabs-tab-installed').should('be.visible').parent().should('have.class', 'active');
|
||||
cy.get('#marketplaceTabs-pane-installed').should('be.visible');
|
||||
});
|
||||
|
||||
it('should close the modal on demand', () => {
|
||||
// * Verify marketplace is be visible
|
||||
cy.get('#modal_marketplace').should('be.visible');
|
||||
|
||||
// # Close marketplace modal
|
||||
cy.uiClose();
|
||||
|
||||
// * Verify marketplace should not be visible
|
||||
cy.get('#modal_marketplace').should('not.exist');
|
||||
});
|
||||
|
||||
// https://mattermost.atlassian.net/browse/MM-54230
|
||||
it('should filter all on search', () => {
|
||||
// # Load all plugins before searching
|
||||
cy.get('.more-modal__row').should('have.length', 15);
|
||||
|
||||
// # Filter to jira plugin only
|
||||
cy.findByPlaceholderText('Search Marketplace').
|
||||
scrollIntoView().
|
||||
should('be.visible').
|
||||
type('jira');
|
||||
|
||||
// * Verify jira plugin should be visible
|
||||
cy.get('#marketplace-plugin-jira').should('be.visible');
|
||||
|
||||
// * Verify no other plugins should be visible
|
||||
cy.get('#marketplaceTabs-pane-allListing').
|
||||
find('.more-modal__row').
|
||||
should('have.length', 1);
|
||||
});
|
||||
|
||||
// https://mattermost.atlassian.net/browse/MM-54230
|
||||
it('should show an error bar on failing to filter', () => {
|
||||
// # Enable Plugin Marketplace
|
||||
cy.apiUpdateConfig({
|
||||
PluginSettings: {
|
||||
Enable: true,
|
||||
EnableMarketplace: true,
|
||||
MarketplaceURL: 'example.com',
|
||||
},
|
||||
});
|
||||
|
||||
// # Filter to jira plugin only
|
||||
cy.findByPlaceholderText('Search Marketplace').scrollIntoView().should('be.visible').type('jira');
|
||||
|
||||
// * Verify should be an error connecting to the marketplace server
|
||||
cy.get('#error_bar').contains('Error connecting to the marketplace server');
|
||||
});
|
||||
|
||||
it('should install a plugin on demand', () => {
|
||||
// # Uninstall any existing webex plugin
|
||||
cy.apiRemovePluginById('com.mattermost.webex');
|
||||
|
||||
// * Verify webex plugin should be visible
|
||||
cy.findByText('Next').click();
|
||||
cy.get('#marketplace-plugin-com\\.mattermost\\.webex').scrollIntoView().should('be.visible');
|
||||
|
||||
// # Install the webex plugin
|
||||
cy.get('#marketplace-plugin-com\\.mattermost\\.webex').find('.btn.btn-primary').click();
|
||||
|
||||
// * Verify should show "Configure" after installation
|
||||
cy.get('#marketplace-plugin-com\\.mattermost\\.webex').find('.btn.btn-outline', {timeout: TIMEOUTS.ONE_MIN}).scrollIntoView().should('be.visible').and('have.text', 'Configure');
|
||||
});
|
||||
|
||||
// https://mattermost.atlassian.net/browse/MM-54230
|
||||
it('should install a plugin from search results on demand', () => {
|
||||
// # Uninstall any existing webex plugin
|
||||
cy.apiRemovePluginById('com.mattermost.webex');
|
||||
|
||||
// # Filter to webex plugin only
|
||||
cy.findByPlaceholderText('Search Marketplace').scrollIntoView().should('be.visible').type('webex');
|
||||
|
||||
// * Verify no other plugins should be visible
|
||||
cy.get('#marketplaceTabs-pane-allListing').find('.more-modal__row').should('have.length', 1);
|
||||
|
||||
// * Verify webex plugin should be visible
|
||||
cy.get('#marketplace-plugin-com\\.mattermost\\.webex').scrollIntoView().should('be.visible');
|
||||
|
||||
// # Install the webex plugin
|
||||
cy.get('#marketplace-plugin-com\\.mattermost\\.webex').find('.btn.btn-primary').click();
|
||||
|
||||
// * Verify should show "Configure" after installation
|
||||
cy.get('#marketplace-plugin-com\\.mattermost\\.webex').find('.btn.btn-outline', {timeout: TIMEOUTS.ONE_MIN}).scrollIntoView().should('be.visible').and('have.text', 'Configure');
|
||||
|
||||
// * Verify search filter should be maintained
|
||||
cy.get('#marketplaceTabs-pane-allListing').find('.more-modal__row').should('have.length', 1);
|
||||
});
|
||||
|
||||
it('should prompt to update an old GitHub plugin from all plugins', () => {
|
||||
// # Install old version of GitHub plugin
|
||||
cy.apiInstallPluginFromUrl(githubPluginOld.url, true);
|
||||
|
||||
// # Scroll to GitHub plugin
|
||||
cy.get('#marketplace-plugin-github').scrollIntoView().should('be.visible');
|
||||
|
||||
// * Verify github plugin should have update prompt
|
||||
cy.get('#marketplace-plugin-github').find('.update').should('be.visible').and('to.contain', 'Update available');
|
||||
|
||||
// * Verify github plugin should have update link
|
||||
cy.get('#marketplace-plugin-github').find('.update b a').should('be.visible').and('have.text', 'Update');
|
||||
|
||||
// # Update GitHub plugin
|
||||
cy.get('#marketplace-plugin-github .update b a').click();
|
||||
|
||||
// * Verify confirmation modal should be visible
|
||||
cy.get('#confirmModal').should('be.visible');
|
||||
|
||||
// # Confirm update
|
||||
cy.get('#confirmModal').find('.btn.btn-primary').click();
|
||||
|
||||
// * Verify confirmation modal should not be visible
|
||||
cy.get('#confirmModal').should('not.exist');
|
||||
|
||||
// * Verify github plugin update prompt should not be visible
|
||||
cy.get('#marketplace-plugin-github').find('.update').should('not.exist');
|
||||
|
||||
// * Verify should show "Configure" after installation
|
||||
cy.get('#marketplace-plugin-github').find('.btn.btn-outline', {timeout: TIMEOUTS.ONE_MIN}).scrollIntoView().should('be.visible').and('have.text', 'Configure');
|
||||
|
||||
// * Verify github plugin should still be visible
|
||||
cy.get('#marketplace-plugin-github').should('be.visible');
|
||||
});
|
||||
|
||||
// https://mattermost.atlassian.net/browse/MM-54230
|
||||
it('MM-T1986 change tab to "All Plugins" when "Install Plugins" link is clicked', () => {
|
||||
cy.get('#marketplaceTabs').scrollIntoView().should('be.visible').within(() => {
|
||||
// # Switch tab to installed plugin
|
||||
cy.findByRole('tab', {name: /Installed/}).should('be.visible').and('have.attr', 'aria-selected', 'false').click();
|
||||
|
||||
// * Verify installed plugins tab should be active
|
||||
cy.get('#marketplaceTabs-tab-allListing').should('be.visible').parent().should('not.have.class', 'active');
|
||||
cy.get('#marketplaceTabs-tab-installed').should('be.visible').parent().should('have.class', 'active');
|
||||
|
||||
// # Click on Install Plugins should change current tab
|
||||
cy.findByText('Install Plugins').should('be.visible').click();
|
||||
|
||||
// * Verify all plugins tab should be active
|
||||
cy.findByRole('tab', {name: 'All'}).should('be.visible').and('have.attr', 'aria-selected', 'true');
|
||||
cy.get('#marketplaceTabs-tab-allListing').should('be.visible').parent().should('have.class', 'active');
|
||||
cy.get('#marketplaceTabs-tab-installed').should('be.visible').parent().should('not.have.class', 'active');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user