Fix search e2e for android
This commit is contained in:
parent
2ebfa0230e
commit
3538205f81
3 changed files with 7 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {isAndroid, timeouts} from '@support/utils';
|
||||
import {isAndroid, timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
class ServerScreen {
|
||||
|
|
@ -60,6 +60,7 @@ class ServerScreen {
|
|||
await device.pressBack();
|
||||
}
|
||||
await this.connectButton.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import {
|
|||
ThreadScreen,
|
||||
ChannelInfoScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {getRandomId} from '@support/utils';
|
||||
import {getRandomId, timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Search - Pinned Messages', () => {
|
||||
|
|
@ -83,6 +83,7 @@ describe('Search - Pinned Messages', () => {
|
|||
await PostOptionsScreen.pinPostOption.tap();
|
||||
|
||||
// * Verify pinned text is displayed on the post pre-header
|
||||
await wait(timeouts.ONE_SEC);
|
||||
const {postListPostItemPreHeaderText} = ChannelScreen.getPostListPostItem(post.id, message);
|
||||
await expect(postListPostItemPreHeaderText).toHaveText(pinnedText);
|
||||
|
||||
|
|
@ -195,6 +196,7 @@ describe('Search - Pinned Messages', () => {
|
|||
await PostOptionsScreen.unpinPostOption.tap();
|
||||
|
||||
// * Verify pinned message is not displayed anymore
|
||||
await wait(timeouts.ONE_SEC);
|
||||
const {postListPostItem} = PinnedMessagesScreen.getPostListPostItem(pinnedPost.id, message);
|
||||
await expect(postListPostItem).not.toExist();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import {
|
|||
TeamDropdownMenuScreen,
|
||||
ThreadScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {getRandomId} from '@support/utils';
|
||||
import {getRandomId, timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Search - Search Messages', () => {
|
||||
|
|
@ -228,6 +228,7 @@ describe('Search - Search Messages', () => {
|
|||
const {atMentionItem} = Autocomplete.getAtMentionItem(testUser.id);
|
||||
await atMentionItem.tap();
|
||||
await SearchMessagesScreen.searchModifierIn.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await SearchMessagesScreen.searchInput.typeText(testChannel.name);
|
||||
const {channelMentionItem} = Autocomplete.getChannelMentionItem(testChannel.name);
|
||||
await channelMentionItem.tap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue