Files
0418acb65a MM-66362 feat: run e2e full tests after successful smoke tests both in cypress and playwright (#34868)
* feat: run e2e full tests after successful smoke tests both in cypress and playwright

* fix lint check on jsdoc req in playwright test

* update smoke test filter

* update test filter for cypress tests

* update docker services, fix branch convention and rearrange secrets

* update e2e-test workflow docs

* reorganized

* fix lint

* fix playwright template

* fix results assertion

* add retest, e2e-test-verified, gh comments of failed tests, path filters, run e2e-tests check first and demote unstable tests

* run using master image for e2e-only changes, add ts/js actions for cypress and playwright calculations, add verified by label

---------

Co-authored-by: Mattermost Build <[email protected]>
2026-02-02 08:37:55 +08:00

69 lines
2.8 KiB
JavaScript

// 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 @plugin @plugins_uninstall @not_cloud
import * as TIMEOUTS from '../../../fixtures/timeouts';
import {demoPlugin, testPlugin} from '../../../utils/plugins';
describe('collapse on 15 plugin buttons', () => {
let testTeam;
before(() => {
cy.shouldNotRunOnCloudEdition();
cy.shouldHavePluginUploadEnabled();
// # Login as Admin
cy.apiInitSetup().then(({team}) => {
testTeam = team;
});
// # Uninstall all plugins
cy.apiUninstallAllPlugins();
});
it('MM-T1649 Greater than 15 plugin buttons collapse to one icon in top nav', () => {
// # Go to town square
cy.visit(`/${testTeam.name}/channels/town-square`);
// # Upload and enable test plugin with 15 channel header icons
cy.apiUploadAndEnablePlugin(testPlugin).then(() => {
cy.wait(TIMEOUTS.TWO_SEC);
// # Get number of channel header icons
cy.get('.channel-header__icon').its('length').then((icons) => {
// # Upload and enable demo plugin with one additional channel header icon
cy.apiUploadAndEnablePlugin(demoPlugin).then(() => {
cy.wait(TIMEOUTS.TWO_SEC);
const maxPluginHeaderCount = 15;
// * Validate that channel header icons collapsed and number is reduced by 14
cy.get('.channel-header__icon').should('have.length', icons - (maxPluginHeaderCount - 1));
// * Validate that plugin count is 16 (15 from test plugin and 1 from demo plugin)
cy.get('#pluginCount').should('have.text', maxPluginHeaderCount + 1);
// # click plugin channel header
cy.get('#pluginChannelHeaderButtonDropdown').click();
// * Verify dropdown menu exists
cy.get('ul.dropdown-menu.channel-header_plugin-dropdown').should('exist');
// * Verify the plugin icons expand out to show individually rather than being collapsed behind one icon
cy.apiDisablePluginById(demoPlugin.id).then(() => {
cy.wait(TIMEOUTS.TWO_SEC);
cy.get('.channel-header__icon').should('have.length', icons);
});
});
});
});
});
});