migrate display_test branch (#34516)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run

This commit is contained in:
Rohan Sharma 2025-11-25 20:32:19 +05:30 committed by GitHub
parent d25da66be5
commit e905a36110
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1064 additions and 2 deletions

View file

@ -5,7 +5,6 @@ import {expect, Locator} from '@playwright/test';
export type DisplaySettingsSection =
| 'theme'
| 'collapsedReplyThreads'
| 'clockDisplay'
| 'teammateNameDisplay'
| 'availabilityStatusOnPosts'
@ -13,14 +12,15 @@ export type DisplaySettingsSection =
| 'timezone'
| 'showLinkPreviews'
| 'collapseImagePreviews'
| 'messageDisplay'
| 'clickToReply'
| 'channelDisplayMode'
| 'oneClickReactions'
| 'emojiPicker'
| 'language';
const sectionTitles: Record<DisplaySettingsSection, string> = {
theme: 'Theme',
collapsedReplyThreads: 'Threaded Discussions',
clockDisplay: 'Clock Display',
teammateNameDisplay: 'Teammate Name Display',
availabilityStatusOnPosts: 'Show online availability on profile images',
@ -28,17 +28,58 @@ const sectionTitles: Record<DisplaySettingsSection, string> = {
timezone: 'Timezone',
showLinkPreviews: 'Website Link Previews',
collapseImagePreviews: 'Default Appearance of Image Previews',
messageDisplay: 'Message Display',
clickToReply: 'Click to open threads',
channelDisplayMode: 'Channel Display',
oneClickReactions: 'Quick reactions on messages',
emojiPicker: 'Render emoticons as emojis',
language: 'Language',
};
export default class DisplaySettings {
readonly container: Locator;
readonly title;
public id = '#displaySettings';
readonly expandedSection;
public expandedSectionId = '.section-max';
readonly themeEditButton;
readonly clockDisplayEditButton;
readonly teammateNameDisplayEditButton;
readonly availabilityStatusOnPostsEditButton;
readonly lastActiveTimeEditButton;
readonly timezoneEditButton;
readonly showLinkPreviewsEditButton;
readonly collapseImagePreviewsEditButton;
readonly messageDisplayEditButton;
readonly clickToReplyEditButton;
readonly channelDisplayModeEditButton;
readonly oneClickReactionsEditButton;
readonly emojiPickerEditButton;
readonly languageEditButton;
constructor(container: Locator) {
this.container = container;
this.title = container.getByRole('heading', {name: 'Display Settings', exact: true});
this.expandedSection = container.locator(this.expandedSectionId);
// Edit buttons for each setting section - IDs are {section}Edit pattern from webapp
this.themeEditButton = container.locator('#themeEdit');
this.clockDisplayEditButton = container.locator('#clockEdit');
this.teammateNameDisplayEditButton = container.locator('#name_formatEdit');
this.availabilityStatusOnPostsEditButton = container.locator('#availabilityStatusEdit');
this.lastActiveTimeEditButton = container.locator('#lastactiveEdit');
this.timezoneEditButton = container.locator('#timezoneEdit');
this.showLinkPreviewsEditButton = container.locator('#linkpreviewEdit');
this.collapseImagePreviewsEditButton = container.locator('#collapseEdit');
this.messageDisplayEditButton = container.locator('#message_displayEdit');
this.clickToReplyEditButton = container.locator('#click_to_replyEdit');
this.channelDisplayModeEditButton = container.locator('#channel_display_modeEdit');
this.oneClickReactionsEditButton = container.locator('#one_click_reactions_enabledEdit');
this.emojiPickerEditButton = container.locator('#renderEmoticonsAsEmojiEdit');
this.languageEditButton = container.locator('#languagesEdit');
}
async toBeVisible() {

File diff suppressed because it is too large Load diff