Upgrade Playwright's dependencies (#28125)

* upgrade playwright's dependencies

* fix test

* fix types

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Saturnino Abril 2024-09-10 14:54:10 +08:00 committed by GitHub
parent c2df4e413e
commit eb560fff1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 371 additions and 358 deletions

View File

@ -104,11 +104,11 @@
"CollapsedThreads": "disabled", "CollapsedThreads": "disabled",
"ManagedResourcePaths": "", "ManagedResourcePaths": "",
"EnableCustomGroups": true, "EnableCustomGroups": true,
"SelfHostedPurchase": true,
"AllowSyncedDrafts": true, "AllowSyncedDrafts": true,
"UniqueEmojiReactionLimitPerPost": 50, "UniqueEmojiReactionLimitPerPost": 50,
"RefreshPostStatsRunTime": "00:00", "RefreshPostStatsRunTime": "00:00",
"MaximumPayloadSizeBytes": 100000 "MaximumPayloadSizeBytes": 100000,
"MaximumURLLength": 2048
}, },
"TeamSettings": { "TeamSettings": {
"SiteName": "Mattermost", "SiteName": "Mattermost",
@ -296,8 +296,7 @@
"LoginFieldName": "", "LoginFieldName": "",
"LoginButtonColor": "#0000", "LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7", "LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7", "LoginButtonTextColor": "#2389D7"
"Trace": false
}, },
"ComplianceSettings": { "ComplianceSettings": {
"Enable": false, "Enable": false,
@ -392,7 +391,6 @@
"CustomSMTPPort": "25" "CustomSMTPPort": "25"
} }
}, },
"ProductSettings": {},
"PluginSettings": { "PluginSettings": {
"Enable": true, "Enable": true,
"EnableUploads": true, "EnableUploads": true,

View File

@ -105,11 +105,11 @@
"CollapsedThreads": "disabled", "CollapsedThreads": "disabled",
"ManagedResourcePaths": "", "ManagedResourcePaths": "",
"EnableCustomGroups": true, "EnableCustomGroups": true,
"SelfHostedPurchase": true,
"AllowSyncedDrafts": true, "AllowSyncedDrafts": true,
"UniqueEmojiReactionLimitPerPost": 50, "UniqueEmojiReactionLimitPerPost": 50,
"RefreshPostStatsRunTime": "00:00", "RefreshPostStatsRunTime": "00:00",
"MaximumPayloadSizeBytes": 100000 "MaximumPayloadSizeBytes": 100000,
"MaximumURLLength": 2048
}, },
"TeamSettings": { "TeamSettings": {
"SiteName": "Mattermost", "SiteName": "Mattermost",
@ -173,7 +173,6 @@
"VerboseDiagnostics": false, "VerboseDiagnostics": false,
"EnableSentry": false, "EnableSentry": false,
"AdvancedLoggingJSON": {}, "AdvancedLoggingJSON": {},
"AdvancedLoggingConfig": "",
"MaxFieldSize": 2048 "MaxFieldSize": 2048
}, },
"ExperimentalAuditSettings": { "ExperimentalAuditSettings": {
@ -184,8 +183,7 @@
"FileMaxBackups": 0, "FileMaxBackups": 0,
"FileCompress": false, "FileCompress": false,
"FileMaxQueueSize": 1000, "FileMaxQueueSize": 1000,
"AdvancedLoggingJSON": {}, "AdvancedLoggingJSON": {}
"AdvancedLoggingConfig": ""
}, },
"NotificationLogSettings": { "NotificationLogSettings": {
"EnableConsole": true, "EnableConsole": true,
@ -196,8 +194,7 @@
"FileLevel": "INFO", "FileLevel": "INFO",
"FileJson": true, "FileJson": true,
"FileLocation": "", "FileLocation": "",
"AdvancedLoggingJSON": {}, "AdvancedLoggingJSON": {}
"AdvancedLoggingConfig": ""
}, },
"PasswordSettings": { "PasswordSettings": {
"MinimumLength": 5, "MinimumLength": 5,
@ -404,8 +401,7 @@
"LoginFieldName": "", "LoginFieldName": "",
"LoginButtonColor": "#0000", "LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7", "LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7", "LoginButtonTextColor": "#2389D7"
"Trace": false
}, },
"ComplianceSettings": { "ComplianceSettings": {
"Enable": false, "Enable": false,
@ -509,7 +505,7 @@
"AggregatePostsAfterDays": 365, "AggregatePostsAfterDays": 365,
"PostsAggregatorJobStartTime": "03:00", "PostsAggregatorJobStartTime": "03:00",
"IndexPrefix": "", "IndexPrefix": "",
"LiveIndexingBatchSize": 1, "LiveIndexingBatchSize": 10,
"BatchSize": 10000, "BatchSize": 10000,
"RequestTimeoutSeconds": 30, "RequestTimeoutSeconds": 30,
"SkipTLSVerification": false, "SkipTLSVerification": false,
@ -563,7 +559,6 @@
"CleanupJobsThresholdDays": -1, "CleanupJobsThresholdDays": -1,
"CleanupConfigThresholdDays": -1 "CleanupConfigThresholdDays": -1
}, },
"ProductSettings": {},
"PluginSettings": { "PluginSettings": {
"Enable": true, "Enable": true,
"EnableUploads": true, "EnableUploads": true,

View File

@ -45,7 +45,7 @@ npm run test
Change to root directory, run docker container Change to root directory, run docker container
``` ```
docker run -it --rm -v "$(pwd):/mattermost/" --ipc=host mcr.microsoft.com/playwright:v1.43.0-jammy /bin/bash docker run -it --rm -v "$(pwd):/mattermost/" --ipc=host mcr.microsoft.com/playwright:v1.46.1 /bin/bash
``` ```
#### 2. Inside the docker container #### 2. Inside the docker container

File diff suppressed because it is too large Load Diff

View File

@ -15,18 +15,18 @@
"postinstall": "script/post_install.sh" "postinstall": "script/post_install.sh"
}, },
"dependencies": { "dependencies": {
"@axe-core/playwright": "4.9.0", "@axe-core/playwright": "4.10.0",
"@percy/cli": "1.28.3", "@percy/cli": "1.29.3",
"@percy/playwright": "1.0.5", "@percy/playwright": "1.0.6",
"@playwright/test": "1.43.1", "@playwright/test": "1.46.1",
"async-wait-until": "2.0.12", "async-wait-until": "2.0.12",
"axe-core": "4.9.0", "axe-core": "4.10.0",
"chalk": "4.1.2", "chalk": "4.1.2",
"deepmerge": "4.3.1", "deepmerge": "4.3.1",
"dotenv": "16.4.5", "dotenv": "16.4.5",
"form-data": "4.0.0", "form-data": "4.0.0",
"isomorphic-unfetch": "4.0.2", "isomorphic-unfetch": "4.0.2",
"uuid": "9.0.1" "uuid": "10.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/uuid": "9.0.8", "@types/uuid": "9.0.8",

View File

@ -81,7 +81,7 @@ const onPremServerConfig = (): Partial<TestAdminConfig> => {
}; };
// Should be based only from the generated default config from ./server via "make config-reset" // Should be based only from the generated default config from ./server via "make config-reset"
// Based on v9.8 server // Based on v10.0 server
const defaultServerConfig: AdminConfig = { const defaultServerConfig: AdminConfig = {
ServiceSettings: { ServiceSettings: {
SiteURL: '', SiteURL: '',
@ -133,7 +133,7 @@ const defaultServerConfig: AdminConfig = {
CorsDebug: false, CorsDebug: false,
AllowCookiesForSubdomains: false, AllowCookiesForSubdomains: false,
ExtendSessionLengthWithActivity: true, ExtendSessionLengthWithActivity: true,
TerminateSessionsOnPasswordChange: false, TerminateSessionsOnPasswordChange: true,
SessionLengthWebInDays: 30, SessionLengthWebInDays: 30,
SessionLengthWebInHours: 720, SessionLengthWebInHours: 720,
SessionLengthMobileInDays: 30, SessionLengthMobileInDays: 30,
@ -191,11 +191,11 @@ const defaultServerConfig: AdminConfig = {
CollapsedThreads: CollapsedThreads.ALWAYS_ON, CollapsedThreads: CollapsedThreads.ALWAYS_ON,
ManagedResourcePaths: '', ManagedResourcePaths: '',
EnableCustomGroups: true, EnableCustomGroups: true,
SelfHostedPurchase: true,
AllowSyncedDrafts: true, AllowSyncedDrafts: true,
UniqueEmojiReactionLimitPerPost: 50, UniqueEmojiReactionLimitPerPost: 50,
RefreshPostStatsRunTime: '00:00', RefreshPostStatsRunTime: '00:00',
MaximumPayloadSizeBytes: 300000, MaximumPayloadSizeBytes: 300000,
MaximumURLLength: 2048,
}, },
TeamSettings: { TeamSettings: {
SiteName: 'Mattermost', SiteName: 'Mattermost',
@ -260,7 +260,6 @@ const defaultServerConfig: AdminConfig = {
VerboseDiagnostics: false, VerboseDiagnostics: false,
EnableSentry: true, EnableSentry: true,
AdvancedLoggingJSON: {}, AdvancedLoggingJSON: {},
AdvancedLoggingConfig: '',
MaxFieldSize: 2048, MaxFieldSize: 2048,
}, },
ExperimentalAuditSettings: { ExperimentalAuditSettings: {
@ -272,7 +271,6 @@ const defaultServerConfig: AdminConfig = {
FileCompress: false, FileCompress: false,
FileMaxQueueSize: 1000, FileMaxQueueSize: 1000,
AdvancedLoggingJSON: {}, AdvancedLoggingJSON: {},
AdvancedLoggingConfig: '',
}, },
NotificationLogSettings: { NotificationLogSettings: {
EnableConsole: true, EnableConsole: true,
@ -284,7 +282,6 @@ const defaultServerConfig: AdminConfig = {
FileJson: true, FileJson: true,
FileLocation: '', FileLocation: '',
AdvancedLoggingJSON: {}, AdvancedLoggingJSON: {},
AdvancedLoggingConfig: '',
}, },
PasswordSettings: { PasswordSettings: {
MinimumLength: 8, MinimumLength: 8,
@ -497,7 +494,6 @@ const defaultServerConfig: AdminConfig = {
LoginButtonColor: '#0000', LoginButtonColor: '#0000',
LoginButtonBorderColor: '#2389D7', LoginButtonBorderColor: '#2389D7',
LoginButtonTextColor: '#2389D7', LoginButtonTextColor: '#2389D7',
Trace: false,
}, },
ComplianceSettings: { ComplianceSettings: {
Enable: false, Enable: false,
@ -552,6 +548,12 @@ const defaultServerConfig: AdminConfig = {
AndroidAppDownloadLink: 'https://mattermost.com/pl/android-app/', AndroidAppDownloadLink: 'https://mattermost.com/pl/android-app/',
IosAppDownloadLink: 'https://mattermost.com/pl/ios-app/', IosAppDownloadLink: 'https://mattermost.com/pl/ios-app/',
}, },
CacheSettings: {
CacheType: 'lru',
RedisAddress: '',
RedisPassword: '',
RedisDB: -1,
},
ClusterSettings: { ClusterSettings: {
Enable: false, Enable: false,
ClusterName: '', ClusterName: '',
@ -569,6 +571,8 @@ const defaultServerConfig: AdminConfig = {
Enable: false, Enable: false,
BlockProfileRate: 0, BlockProfileRate: 0,
ListenAddress: ':8067', ListenAddress: ':8067',
EnableClientMetrics: true,
EnableNotificationMetrics: true,
}, },
ExperimentalSettings: { ExperimentalSettings: {
ClientSideCertEnable: false, ClientSideCertEnable: false,
@ -580,6 +584,8 @@ const defaultServerConfig: AdminConfig = {
DisableAppBar: false, DisableAppBar: false,
DisableRefetchingOnBrowserFocus: false, DisableRefetchingOnBrowserFocus: false,
DelayChannelAutocomplete: false, DelayChannelAutocomplete: false,
DisableWakeUpReconnectHandler: false,
UsersStatusAndProfileFetchingPollIntervalMilliseconds: 3000,
YoutubeReferrerPolicy: false, YoutubeReferrerPolicy: false,
}, },
AnalyticsSettings: { AnalyticsSettings: {
@ -587,9 +593,9 @@ const defaultServerConfig: AdminConfig = {
}, },
ElasticsearchSettings: { ElasticsearchSettings: {
ConnectionURL: 'http://localhost:9200', ConnectionURL: 'http://localhost:9200',
Backend: 'elasticsearch',
Username: 'elastic', Username: 'elastic',
Password: 'changeme', Password: 'changeme',
Backend: 'elasticsearch',
EnableIndexing: false, EnableIndexing: false,
EnableSearching: false, EnableSearching: false,
EnableAutocomplete: false, EnableAutocomplete: false,
@ -603,7 +609,7 @@ const defaultServerConfig: AdminConfig = {
AggregatePostsAfterDays: 365, AggregatePostsAfterDays: 365,
PostsAggregatorJobStartTime: '03:00', PostsAggregatorJobStartTime: '03:00',
IndexPrefix: '', IndexPrefix: '',
LiveIndexingBatchSize: 1, LiveIndexingBatchSize: 10,
BatchSize: 10000, BatchSize: 10000,
RequestTimeoutSeconds: 30, RequestTimeoutSeconds: 30,
SkipTLSVerification: false, SkipTLSVerification: false,
@ -657,7 +663,6 @@ const defaultServerConfig: AdminConfig = {
CleanupJobsThresholdDays: -1, CleanupJobsThresholdDays: -1,
CleanupConfigThresholdDays: -1, CleanupConfigThresholdDays: -1,
}, },
ProductSettings: {},
PluginSettings: { PluginSettings: {
Enable: true, Enable: true,
EnableUploads: false, EnableUploads: false,
@ -712,14 +717,12 @@ const defaultServerConfig: AdminConfig = {
TestFeature: 'off', TestFeature: 'off',
TestBoolFeature: false, TestBoolFeature: false,
EnableRemoteClusterService: false, EnableRemoteClusterService: false,
AppsEnabled: true, AppsEnabled: false,
PermalinkPreviews: false, PermalinkPreviews: false,
CallsEnabled: true,
NormalizeLdapDNs: false, NormalizeLdapDNs: false,
WysiwygEditor: false, WysiwygEditor: false,
OnboardingTourTips: true, OnboardingTourTips: true,
DeprecateCloudFree: false, DeprecateCloudFree: false,
CloudReverseTrial: false,
EnableExportDirectDownload: false, EnableExportDirectDownload: false,
MoveThreadsEnabled: false, MoveThreadsEnabled: false,
StreamlinedMarketplace: true, StreamlinedMarketplace: true,
@ -728,8 +731,9 @@ const defaultServerConfig: AdminConfig = {
CloudAnnualRenewals: false, CloudAnnualRenewals: false,
CloudDedicatedExportUI: false, CloudDedicatedExportUI: false,
ChannelBookmarks: false, ChannelBookmarks: false,
WebSocketEventScope: false, WebSocketEventScope: true,
NotificationMonitoring: true, NotificationMonitoring: true,
ExperimentalAuditSettingsSystemConsoleUI: false,
}, },
ImportSettings: { ImportSettings: {
Directory: './import', Directory: './import',

View File

@ -64,13 +64,6 @@ describe('components/admin_console/license_settings/enterprise_edition/enterpris
preferences: { preferences: {
myPreferences: {}, myPreferences: {},
}, },
admin: {
config: {
ServiceSettings: {
SelfHostedPurchase: true,
},
},
},
cloud: { cloud: {
subscription: undefined, subscription: undefined,
}, },

View File

@ -385,7 +385,6 @@ export type ServiceSettings = {
DebugSplit: boolean; DebugSplit: boolean;
ManagedResourcePaths: string; ManagedResourcePaths: string;
EnableCustomGroups: boolean; EnableCustomGroups: boolean;
SelfHostedPurchase: boolean;
AllowSyncedDrafts: boolean; AllowSyncedDrafts: boolean;
AllowPersistentNotifications: boolean; AllowPersistentNotifications: boolean;
AllowPersistentNotificationsForGuests: boolean; AllowPersistentNotificationsForGuests: boolean;
@ -395,6 +394,7 @@ export type ServiceSettings = {
UniqueEmojiReactionLimitPerPost: number; UniqueEmojiReactionLimitPerPost: number;
RefreshPostStatsRunTime: string; RefreshPostStatsRunTime: string;
MaximumPayloadSizeBytes: number; MaximumPayloadSizeBytes: number;
MaximumURLLength: number;
}; };
export type TeamSettings = { export type TeamSettings = {
@ -461,7 +461,6 @@ export type LogSettings = {
EnableDiagnostics: boolean; EnableDiagnostics: boolean;
VerboseDiagnostics: boolean; VerboseDiagnostics: boolean;
EnableSentry: boolean; EnableSentry: boolean;
AdvancedLoggingConfig: string;
AdvancedLoggingJSON: Record<string, any>; AdvancedLoggingJSON: Record<string, any>;
MaxFieldSize: number; MaxFieldSize: number;
}; };
@ -474,7 +473,6 @@ export type ExperimentalAuditSettings = {
FileMaxBackups: number; FileMaxBackups: number;
FileCompress: boolean; FileCompress: boolean;
FileMaxQueueSize: number; FileMaxQueueSize: number;
AdvancedLoggingConfig: string;
AdvancedLoggingJSON: Record<string, any>; AdvancedLoggingJSON: Record<string, any>;
}; };
@ -487,7 +485,6 @@ export type NotificationLogSettings = {
FileLevel: string; FileLevel: string;
FileJson: boolean; FileJson: boolean;
FileLocation: string; FileLocation: string;
AdvancedLoggingConfig: string;
AdvancedLoggingJSON: Record<string, any>; AdvancedLoggingJSON: Record<string, any>;
}; };
@ -697,7 +694,6 @@ export type LdapSettings = {
LoginButtonColor: string; LoginButtonColor: string;
LoginButtonBorderColor: string; LoginButtonBorderColor: string;
LoginButtonTextColor: string; LoginButtonTextColor: string;
Trace: boolean;
}; };
export type ComplianceSettings = { export type ComplianceSettings = {
@ -775,6 +771,8 @@ export type MetricsSettings = {
Enable: boolean; Enable: boolean;
BlockProfileRate: number; BlockProfileRate: number;
ListenAddress: string; ListenAddress: string;
EnableClientMetrics: boolean;
EnableNotificationMetrics: boolean;
}; };
export type ExperimentalSettings = { export type ExperimentalSettings = {
@ -787,6 +785,8 @@ export type ExperimentalSettings = {
DisableAppBar: boolean; DisableAppBar: boolean;
DisableRefetchingOnBrowserFocus: boolean; DisableRefetchingOnBrowserFocus: boolean;
DelayChannelAutocomplete: boolean; DelayChannelAutocomplete: boolean;
DisableWakeUpReconnectHandler: boolean;
UsersStatusAndProfileFetchingPollIntervalMilliseconds: number;
YoutubeReferrerPolicy: boolean; YoutubeReferrerPolicy: boolean;
}; };
@ -794,6 +794,13 @@ export type AnalyticsSettings = {
MaxUsersForStatistics: number; MaxUsersForStatistics: number;
}; };
export type CacheSettings = {
CacheType: string;
RedisAddress: string;
RedisPassword: string;
RedisDB: number;
};
export type ElasticsearchSettings = { export type ElasticsearchSettings = {
ConnectionURL: string; ConnectionURL: string;
Backend: string; Backend: string;
@ -871,8 +878,6 @@ export type JobSettings = {
CleanupConfigThresholdDays: number; CleanupConfigThresholdDays: number;
}; };
export type ProductSettings = Record<string, never>;
export type PluginSettings = { export type PluginSettings = {
Enable: boolean; Enable: boolean;
EnableUploads: boolean; EnableUploads: boolean;
@ -959,12 +964,12 @@ export type AdminConfig = {
MetricsSettings: MetricsSettings; MetricsSettings: MetricsSettings;
ExperimentalSettings: ExperimentalSettings; ExperimentalSettings: ExperimentalSettings;
AnalyticsSettings: AnalyticsSettings; AnalyticsSettings: AnalyticsSettings;
CacheSettings: CacheSettings;
ElasticsearchSettings: ElasticsearchSettings; ElasticsearchSettings: ElasticsearchSettings;
BleveSettings: BleveSettings; BleveSettings: BleveSettings;
DataRetentionSettings: DataRetentionSettings; DataRetentionSettings: DataRetentionSettings;
MessageExportSettings: MessageExportSettings; MessageExportSettings: MessageExportSettings;
JobSettings: JobSettings; JobSettings: JobSettings;
ProductSettings: ProductSettings;
PluginSettings: PluginSettings; PluginSettings: PluginSettings;
DisplaySettings: DisplaySettings; DisplaySettings: DisplaySettings;
GuestAccountsSettings: GuestAccountsSettings; GuestAccountsSettings: GuestAccountsSettings;