forked from Ivasoft/mattermost-mobile
Detox: Android - fix smoke server login test (#7157)
* Detox: Android - fix smoke server login test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
ServerListScreen,
|
||||
ServerScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {timeouts} from '@support/utils';
|
||||
import {isAndroid, isIos, timeouts} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Smoke Test - Server Login', () => {
|
||||
@@ -79,11 +79,19 @@ describe('Smoke Test - Server Login', () => {
|
||||
|
||||
// # Go back to first server, open server list screen, swipe left on second server and tap on logout option
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
if (isIos()) {
|
||||
await ServerListScreen.serverListTitle.swipe('up');
|
||||
} else if (isAndroid()) {
|
||||
await ServerListScreen.serverListTitle.swipe('up', 'fast', 0.1, 0.5, 0.3);
|
||||
}
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverOneDisplayName).tap();
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
if (isIos()) {
|
||||
await ServerListScreen.serverListTitle.swipe('up');
|
||||
} else if (isAndroid()) {
|
||||
await ServerListScreen.serverListTitle.swipe('up', 'fast', 0.1, 0.5, 0.3);
|
||||
}
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverTwoDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverTwoDisplayName).swipe('left');
|
||||
await ServerListScreen.getServerItemLogoutOption(serverTwoDisplayName).tap();
|
||||
|
||||
Reference in New Issue
Block a user