Merge pull request #6528 from mattermost/detox-maintenance-aug1

Detox/E2E: Fix global threads and unarchive channel tests
This commit is contained in:
Malik
2022-08-03 02:57:17 +05:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -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();

View File

@@ -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();