* MM-30429 Detox/E2E: Added e2e for MM-T3190, MM-T3212, MM-T3214, MM-T3227 * Merge master * Fix package-lock.json * Upgrade deps * Revert podfile * Update Podfile.lock * Stabilize closing of post options * Merge master * Normalize closing of post options * Enabled MM-T1397 test case Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {EditChannelInfo} from '@support/ui/component';
|
|
import {ChannelInfoScreen} from '@support/ui/screen';
|
|
|
|
class EditChannelScreen {
|
|
testID = {
|
|
editChannelScreen: 'edit_channel.screen',
|
|
saveButton: 'edit_channel.save.button',
|
|
backButton: 'screen.back.button',
|
|
}
|
|
|
|
editChannelScreen = element(by.id(this.testID.editChannelScreen));
|
|
saveButton = element(by.id(this.testID.saveButton));
|
|
backButton = element(by.id(this.testID.backButton));
|
|
|
|
// convenience props
|
|
nameInput = EditChannelInfo.nameInput;
|
|
purposeInput = EditChannelInfo.purposeInput;
|
|
headerInput = EditChannelInfo.headerInput;
|
|
|
|
toBeVisible = async () => {
|
|
await expect(this.editChannelScreen).toBeVisible();
|
|
|
|
return this.editChannelScreen;
|
|
}
|
|
|
|
open = async () => {
|
|
// # Open edit channel screen
|
|
await ChannelInfoScreen.channelInfoScrollView.scrollTo('bottom');
|
|
await ChannelInfoScreen.editChannelAction.tap();
|
|
|
|
return this.toBeVisible();
|
|
}
|
|
|
|
back = async () => {
|
|
await this.backButton.tap();
|
|
await expect(this.editChannelScreen).not.toBeVisible();
|
|
}
|
|
}
|
|
|
|
const editChannelScreen = new EditChannelScreen();
|
|
export default editChannelScreen;
|