MM-62426: Remove form-data from @mattermost/client (#29792)

Этот коммит содержится в:
Saturnino Abril
2025-01-10 13:28:32 +08:00
коммит произвёл GitHub
родитель 0c213eae9e
Коммит 95b22f47a0
26 изменённых файлов: 322 добавлений и 14 удалений

Просмотреть файл

@@ -1,11 +1,11 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import path from 'node:path';
import {expect} from '@playwright/test';
import {PreferenceType} from '@mattermost/types/preferences';
import testConfig from '@e2e-test.config';
import {getFileDataFromAsset} from '@e2e-support/file';
import {makeClient} from '.';
import {getOnPremServerConfig} from './default_config';
@@ -42,9 +42,8 @@ export async function initSetup({
const {client: userClient} = await makeClient(user);
if (withDefaultProfileImage) {
// Set user profile image
const fullPath = path.join(path.resolve(__dirname), '../', 'asset/mattermost-icon_128x128.png');
await userClient.uploadProfileImageX(user.id, fullPath);
const {file} = getFileDataFromAsset('mattermost-icon_128x128.png', 'image/png');
await userClient.uploadProfileImage(user.id, file);
}
// Update user preference