mattermost-mobile/detox/e2e/test/account_settings/language_settings.e2e.js
Joseph Baylon 53050595dd
MM-35355 Detox/E2E: Add e2e for channels settings (#5377)
* MM-35355 Detox/E2E: Add e2e for channels settings

* Added disabling of non prepackaged plugins to init

* Fix apiGetChannelByName doc parameter
2021-05-12 08:04:01 -07:00

43 lines
1.4 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 screen)
// - [*] indicates an assertion (e.g. * Check the title)
// - Use element testID when selecting an element. Create one if none.
// *******************************************************************
import {ChannelScreen} from '@support/ui/screen';
import {
Channel,
Setup,
User,
} from '@support/server_api';
describe('Language Settings', () => {
let testUser;
let townSquareChannel;
beforeAll(async () => {
const {team, user} = await Setup.apiInit();
testUser = user;
({channel: townSquareChannel} = await Channel.apiGetChannelByName(team.id, 'town-square'));
});
afterAll(async () => {
await ChannelScreen.logout();
});
it('MM-T304 no crash when setting language to zh-TW (Chinese Traditional)', async () => { // related issue https://mattermost.atlassian.net/browse/MM-35329
// # Set user's locale
await User.apiPatchUser(testUser.id, {locale: 'zh-TW'});
// # Open channel screen
await ChannelScreen.open(testUser);
// * Verify town square channel loads
await ChannelScreen.toBeVisible();
await expect(ChannelScreen.channelNavBarTitle).toHaveText(townSquareChannel.display_name);
});
});