forked from Ivasoft/mattermost-mobile
Detox/E2E: Fix global threads and unarchive channel tests
This commit is contained in:
@@ -32,10 +32,10 @@ class Alert {
|
||||
leaveButton = isAndroid() ? element(by.text('LEAVE')) : element(by.label('Leave')).atIndex(0);
|
||||
logoutButton = isAndroid() ? element(by.text('LOG OUT')) : element(by.label('Log out')).atIndex(1);
|
||||
markReadButton = isAndroid() ? element(by.text('MARK READ')) : element(by.label('Mark read')).atIndex(1);
|
||||
noButton = isAndroid() ? element(by.text('NO')) : element(by.label('No')).atIndex(1);
|
||||
noButton = isAndroid() ? element(by.text('NO')) : element(by.label('No')).atIndex(0);
|
||||
okButton = isAndroid() ? element(by.text('OK')) : element(by.label('OK')).atIndex(1);
|
||||
removeButton = isAndroid() ? element(by.text('REMOVE')) : element(by.label('Remove')).atIndex(1);
|
||||
yesButton = isAndroid() ? element(by.text('YES')) : element(by.label('Yes')).atIndex(1);
|
||||
yesButton = isAndroid() ? element(by.text('YES')) : element(by.label('Yes')).atIndex(0);
|
||||
}
|
||||
|
||||
const alert = new Alert();
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('Threads - Global Threads', () => {
|
||||
await expect(GlobalThreadsScreen.getThreadItem(parentPost.id)).toBeVisible();
|
||||
await expect(GlobalThreadsScreen.getThreadItemThreadStarterUserDisplayName(parentPost.id)).toHaveText(testUser.username);
|
||||
await expect(GlobalThreadsScreen.getThreadItemThreadStarterChannelDisplayName(parentPost.id)).toHaveText(testChannel.display_name.toUpperCase());
|
||||
await expect(GlobalThreadsScreen.getThreadItemFooterReplyCount(parentPost.id)).toHaveText('1 reply');
|
||||
await expect(GlobalThreadsScreen.getThreadItemFooterUnreadReplies(parentPost.id)).toHaveText('1 new reply');
|
||||
|
||||
// # Tap on the thread
|
||||
await GlobalThreadsScreen.getThreadItem(parentPost.id).tap();
|
||||
@@ -161,7 +161,7 @@ describe('Threads - Global Threads', () => {
|
||||
await expect(GlobalThreadsScreen.getThreadItem(parentPost.id)).toBeVisible();
|
||||
await expect(GlobalThreadsScreen.getThreadItemThreadStarterUserDisplayName(parentPost.id)).toHaveText('sysadmin');
|
||||
await expect(GlobalThreadsScreen.getThreadItemThreadStarterChannelDisplayName(parentPost.id)).toHaveText(testChannel.display_name.toUpperCase());
|
||||
await expect(GlobalThreadsScreen.getThreadItemFooterReplyCount(parentPost.id)).toHaveText('1 reply');
|
||||
await expect(GlobalThreadsScreen.getThreadItemFooterUnreadReplies(parentPost.id)).toHaveText('1 new reply');
|
||||
|
||||
// # Tap on the thread
|
||||
await GlobalThreadsScreen.getThreadItem(parentPost.id).tap();
|
||||
|
||||
Reference in New Issue
Block a user