mattermost-mobile/detox/e2e/support/ui/screen/more_channels.js
Joseph Baylon 4f668f0fdf
MM-30286 Detox/E2E: Add e2e test for MM-T3222 and some cleanup (#4959)
* MM-30286 Detox/E2E: Add e2e test for MM-T3222 and some cleanup

* Fix merge issues

* Fix more issues

* Fixed new line

* Remove redundant check

* Updated instance to getElement

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-11-17 10:52:03 -08:00

30 lines
888 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {MainSidebar} from '@support/ui/component';
class MoreChannelsScreen {
testID = {
moreChannelsScreen: 'more_channels.screen',
publicChannelCreateButton: 'public_channel.create.button',
}
moreChannelsScreen = element(by.id(this.testID.moreChannelsScreen));
publicChannelCreateButton = element(by.id(this.testID.publicChannelCreateButton));
toBeVisible = async () => {
await expect(this.moreChannelsScreen).toBeVisible();
return this.moreChannelsScreen;
}
open = async () => {
// # Open more channels screen
await MainSidebar.openMoreChannelsButton.tap();
return this.toBeVisible();
}
}
const moreChannelsScreen = new MoreChannelsScreen();
export default moreChannelsScreen;