drop the browser tests for consoles that are gone

Two Playwright tests drove the upsell pages directly -- one opened Mobile
Security without a licence and asserted the sales pitch, the other opened
Localization and asserted the auto-translation discovery block -- so they now
navigate to screens that do not render. Their page objects go with them,
along with the Edition and License model, which described a console page that
no longer exists and had no test driving it.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-14 00:27:39 -07:00
co-authored by Hanzo Dev
parent b165bc03c6
commit d213e4bdb6
9 changed files with 1 additions and 140 deletions
-1
View File
@@ -95,7 +95,6 @@ export {
ScheduledDraftModal,
ScheduledPost,
SendMessageNowModal,
SystemConsoleFeatureDiscovery,
MessagePriority,
UserProfilePopover,
UserAccountMenu,
@@ -76,11 +76,9 @@ import {
} from './system_console/base_components';
import DelegatedGranularAdministration from './system_console/sections/user_management/delegated_granular_administration';
import UserDetail from './system_console/sections/user_management/user_detail';
import EditionAndLicense from './system_console/sections/about/edition_and_license';
import MobileSecurity from './system_console/sections/environment/mobile_security';
import Notifications from './system_console/sections/site_configuration/notifications';
import UsersAndTeams from './system_console/sections/site_configuration/users_and_teams';
import SystemConsoleFeatureDiscovery from './system_console/sections/system_users/feature_discovery';
import SystemConsoleHeader from './system_console/header';
import SystemConsoleNavbar from './system_console/navbar';
import SystemConsoleSidebar from './system_console/sidebar';
@@ -161,13 +159,11 @@ const components = {
AdminSectionPanel,
DelegatedGranularAdministration,
DropdownSetting,
EditionAndLicense,
MobileSecurity,
Notifications,
NumberInputSetting,
RadioSetting,
UsersAndTeams,
SystemConsoleFeatureDiscovery,
SystemConsoleHeader,
SystemConsoleNavbar,
SystemConsoleSidebar,
@@ -253,13 +249,11 @@ export {
AdminSectionPanel,
DelegatedGranularAdministration,
DropdownSetting,
EditionAndLicense,
MobileSecurity,
Notifications,
NumberInputSetting,
RadioSetting,
UsersAndTeams,
SystemConsoleFeatureDiscovery,
SystemConsoleHeader,
SystemConsoleNavbar,
SystemConsoleSidebar,
@@ -1,23 +0,0 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import type {Locator} from '@playwright/test';
import {expect} from '@playwright/test';
/**
* System Console -> About -> Edition and License
*/
export default class EditionAndLicense {
readonly container: Locator;
readonly header: Locator;
constructor(container: Locator) {
this.container = container;
this.header = container.getByText('Edition and License', {exact: true});
}
async toBeVisible() {
await expect(this.container).toBeVisible();
await expect(this.header).toBeVisible();
}
}
@@ -6,13 +6,12 @@ import {expect} from '@playwright/test';
/**
* System Console -> Site Configuration -> Localization
* Covers Languages section and Auto-translation block (or feature discovery when no EA license).
* Covers the Languages section and the Auto-translation block.
*/
export default class Localization {
readonly container: Locator;
readonly header: Locator;
readonly featureDiscoveryBlock: Locator;
readonly autoTranslationSection: Locator;
readonly autoTranslationToggle: Locator;
readonly providerDropdown: Locator;
@@ -27,7 +26,6 @@ export default class Localization {
this.container = container;
this.header = container.getByText('Localization', {exact: true});
this.featureDiscoveryBlock = container.getByText('Remove language barriers with auto-translation');
this.autoTranslationSection = container.getByTestId('autotranslation-section-header');
this.autoTranslationToggle = container.getByTestId('autotranslation-section-toggle').locator('button');
this.providerDropdown = container.getByTestId('Providerdropdown');
@@ -1,24 +0,0 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import type {Locator} from '@playwright/test';
import {expect} from '@playwright/test';
/**
* System Console -> Feature Discovery
*/
export default class FeatureDiscovery {
readonly container: Locator;
constructor(container: Locator) {
this.container = container;
}
async toBeVisible() {
await expect(this.container).toBeVisible();
}
async toHaveTitle(title: string) {
await expect(this.container.getByTestId('featureDiscovery_title')).toHaveText(title);
}
}
@@ -11,7 +11,6 @@ export default class SystemConsoleSidebar {
readonly header: SystemConsoleSidebarHeader;
readonly searchInput: Locator;
readonly about: AboutCategory;
readonly reporting: ReportingCategory;
readonly userManagement: UserManagementCategory;
readonly systemAttributes: SystemAttributesCategory;
@@ -28,7 +27,6 @@ export default class SystemConsoleSidebar {
this.header = new SystemConsoleSidebarHeader(container.locator('#admin-sidebar-header'));
this.searchInput = container.getByPlaceholder('Find settings');
this.about = new AboutCategory(container.getByTestId('about'));
this.reporting = new ReportingCategory(container.getByTestId('reporting'));
this.userManagement = new UserManagementCategory(container.getByTestId('user_management'));
this.systemAttributes = new SystemAttributesCategory(container.getByTestId('system_attributes'));
@@ -56,9 +54,6 @@ export default class SystemConsoleSidebar {
}
// Convenience shortcuts
get editionAndLicense() {
return this.about.editionAndLicense;
}
get users() {
return this.userManagement.users;
}
@@ -134,15 +129,6 @@ class SidebarCategory {
}
}
class AboutCategory extends SidebarCategory {
readonly editionAndLicense: SidebarSection;
constructor(container: Locator) {
super(container);
this.editionAndLicense = this.section('Edition and License');
}
}
class ReportingCategory extends SidebarCategory {
readonly workspaceOptimization: SidebarSection;
readonly siteStatistics: SidebarSection;
@@ -6,7 +6,6 @@ import type {Page} from '@playwright/test';
import SystemConsoleNavbar from '@/ui/components/system_console/navbar';
import SystemConsoleSidebar from '@/ui/components/system_console/sidebar';
import SystemConsoleHeader from '@/ui/components/system_console/header';
import EditionAndLicense from '@/ui/components/system_console/sections/about/edition_and_license';
import TeamStatistics from '@/ui/components/system_console/sections/reporting/team_statistics';
import Users from '@/ui/components/system_console/sections/user_management/users';
import DelegatedGranularAdministration from '@/ui/components/system_console/sections/user_management/delegated_granular_administration';
@@ -18,7 +17,6 @@ import UsersAndTeams from '@/ui/components/system_console/sections/site_configur
import BoardAttributes from '@/ui/components/system_console/sections/system_attributes/board_attributes';
import SystemProperties from '@/ui/components/system_console/sections/system_attributes/system_properties';
import SessionAttributes from '@/ui/components/system_console/sections/system_attributes/session_attributes';
import FeatureDiscovery from '@/ui/components/system_console/sections/system_users/feature_discovery';
import PluginManagement from '@/ui/components/system_console/sections/plugins/plugin_management';
export default class SystemConsolePage {
@@ -29,9 +27,6 @@ export default class SystemConsolePage {
readonly sidebar: SystemConsoleSidebar;
readonly header: SystemConsoleHeader;
// About
readonly editionAndLicense: EditionAndLicense;
// Reporting
readonly teamStatistics: TeamStatistics;
@@ -53,9 +48,6 @@ export default class SystemConsolePage {
readonly sessionAttributes: SessionAttributes;
readonly boardAttributes: BoardAttributes;
// Feature Discovery (license-gated features)
readonly featureDiscovery: FeatureDiscovery;
// Plugins
readonly pluginManagement: PluginManagement;
@@ -69,9 +61,6 @@ export default class SystemConsolePage {
const adminConsoleWrapper = page.locator('#adminConsoleWrapper');
this.header = new SystemConsoleHeader(adminConsoleWrapper);
// About
this.editionAndLicense = new EditionAndLicense(adminConsoleWrapper);
// Reporting
this.teamStatistics = new TeamStatistics(adminConsoleWrapper);
@@ -93,9 +82,6 @@ export default class SystemConsolePage {
this.sessionAttributes = new SessionAttributes(adminConsoleWrapper);
this.boardAttributes = new BoardAttributes(adminConsoleWrapper);
// Feature Discovery
this.featureDiscovery = new FeatureDiscovery(adminConsoleWrapper);
// Plugins
this.pluginManagement = new PluginManagement(adminConsoleWrapper);
}
@@ -162,35 +162,6 @@ test('should be able to enable mobile security settings when licensed', async ({
}
});
test('should show mobile security upsell when not licensed', async ({pw}) => {
const {adminUser, adminClient} = await pw.initSetup();
const license = await adminClient.getClientLicenseOld();
test.skip(
license.SkuShortName !== 'enterprise' || license.short_sku_name !== 'advanced',
'Skipping test - server has no enterprise or enterprise advanced license',
);
if (!adminUser) {
throw new Error('Failed to create admin user');
}
// # Log in as admin
const {systemConsolePage} = await pw.testBrowser.login(adminUser);
// # Visit system console
await systemConsolePage.goto();
await systemConsolePage.toBeVisible();
// # Go to Mobile Security section
await systemConsolePage.sidebar.mobileSecurity.click();
await systemConsolePage.featureDiscovery.toBeVisible();
// * Verify title is correct
await systemConsolePage.featureDiscovery.toHaveTitle('Enhance mobile app security with Mattermost Enterprise');
});
test('should show and enable Intune MAM when Enterprise Advanced licensed and Office365 configured', async ({pw}) => {
const {adminUser, adminClient} = await pw.initSetup();
@@ -13,32 +13,6 @@
import {expect, test, hasAutotranslationLicense} from '@mattermost/playwright-lib';
test.describe('System Console - Autotranslation (Localization)', () => {
test(
'without EA license, auto-translation shows feature discovery block',
{
tag: ['@autotranslation', '@system_console'],
},
async ({pw}) => {
const {adminUser, adminClient} = await pw.initSetup();
const license = await adminClient.getClientLicenseOld();
test.skip(
hasAutotranslationLicense(license.SkuShortName),
'Skipping test - this test requires non-Entry/Advanced license to see feature discovery',
);
const {systemConsolePage} = await pw.testBrowser.login(adminUser);
await systemConsolePage.goto();
await systemConsolePage.toBeVisible();
await systemConsolePage.sidebar.siteConfiguration.localization.click();
await systemConsolePage.page.waitForURL(/\/admin_console\/site_config\/localization/);
await expect(systemConsolePage.localization.featureDiscoveryBlock).toBeVisible();
await expect(systemConsolePage.localization.autoTranslationSection).not.toBeVisible();
},
);
test(
'with EA license, Auto-translation toggle is visible and off by default',
{