forked from Ivasoft/mattermost-mobile
Detox Maintenance: Update deps, fix import, fix failing tests -- iOS only (#7070)
* Detox Maintenance: Update deps, fix import, fix failing tests * Revert message reply step 3 * Try fresh install per test file
This commit is contained in:
@@ -147,6 +147,7 @@ android {
|
||||
release {
|
||||
minifyEnabled enableProguardInReleaseBuilds
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
|
||||
if (useReleaseKey) {
|
||||
signingConfig signingConfigs.release
|
||||
} else {
|
||||
|
||||
@@ -52,11 +52,13 @@ const SkinSelectorTooltip = ({onClose}: Props) => {
|
||||
id='skintone_selector.tooltip.title'
|
||||
defaultMessage='Choose your default skin tone'
|
||||
style={styles.title}
|
||||
testID='skin_selector.tooltip.title'
|
||||
/>
|
||||
<TouchableOpacity
|
||||
style={styles.close}
|
||||
hitSlop={hitSlop}
|
||||
onPress={onClose}
|
||||
testID='skin_selector.tooltip.close.button'
|
||||
>
|
||||
<CompassIcon
|
||||
color={changeOpacity(Preferences.THEMES.denim.centerChannelColor, 0.56)}
|
||||
@@ -70,6 +72,7 @@ const SkinSelectorTooltip = ({onClose}: Props) => {
|
||||
id='skintone_selector.tooltip.description'
|
||||
defaultMessage='You can now choose the skin tone you prefer to use for your emojis.'
|
||||
style={styles.description}
|
||||
testID='skin_selector.tooltip.description'
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -41,11 +41,16 @@ class Alert {
|
||||
deleteButton = isAndroid() ? element(by.text('DELETE')) : element(by.label('Delete')).atIndex(0);
|
||||
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);
|
||||
logoutButton2 = isAndroid() ? element(by.text('LOG OUT')) : element(by.label('Log out')).atIndex(2);
|
||||
logoutButton3 = isAndroid() ? element(by.text('LOG OUT')) : element(by.label('Log out')).atIndex(3);
|
||||
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(0);
|
||||
noButton2 = isAndroid() ? element(by.text('NO')) : element(by.label('No')).atIndex(1);
|
||||
okButton = isAndroid() ? element(by.text('OK')) : element(by.label('OK')).atIndex(1);
|
||||
removeButton = isAndroid() ? element(by.text('REMOVE')) : element(by.label('Remove')).atIndex(1);
|
||||
removeButton = isAndroid() ? element(by.text('REMOVE')) : element(by.label('Remove')).atIndex(0);
|
||||
removeButton1 = isAndroid() ? element(by.text('REMOVE')) : element(by.label('Remove')).atIndex(1);
|
||||
removeButton2 = isAndroid() ? element(by.text('REMOVE')) : element(by.label('Remove')).atIndex(2);
|
||||
removeButton3 = isAndroid() ? element(by.text('REMOVE')) : element(by.label('Remove')).atIndex(3);
|
||||
yesButton = isAndroid() ? element(by.text('YES')) : element(by.label('Yes')).atIndex(0);
|
||||
yesButton2 = isAndroid() ? element(by.text('YES')) : element(by.label('Yes')).atIndex(1);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
AccountScreen,
|
||||
EmojiPickerScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {timeouts} from '@support/utils';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
class CustomStatusScreen {
|
||||
@@ -82,8 +82,12 @@ class CustomStatusScreen {
|
||||
return this.toBeVisible();
|
||||
};
|
||||
|
||||
openEmojiPicker = async (emojiName: string) => {
|
||||
openEmojiPicker = async (emojiName: string, closeToolTip = false) => {
|
||||
await this.getCustomStatusEmoji(emojiName).tap();
|
||||
if (closeToolTip) {
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await EmojiPickerScreen.toolTipCloseButton.tap();
|
||||
}
|
||||
await EmojiPickerScreen.toBeVisible();
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import {SearchBar} from '@support/ui/component';
|
||||
import {PostOptionsScreen} from '@support/ui/screen';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
class EmojiPickerScreen {
|
||||
@@ -10,10 +11,12 @@ class EmojiPickerScreen {
|
||||
emojiPickerScreenPrefix: 'emoji_picker.',
|
||||
emojiPickerScreen: 'emoji_picker.screen',
|
||||
closeButton: 'close.emoji_picker.button',
|
||||
toolTipCloseButton: 'skin_selector.tooltip.close.button',
|
||||
};
|
||||
|
||||
emojiPickerScreen = element(by.id(this.testID.emojiPickerScreen));
|
||||
closeButton = element(by.id(this.testID.closeButton));
|
||||
toolTipCloseButton = element(by.id(this.testID.toolTipCloseButton));
|
||||
|
||||
// convenience props
|
||||
searchBar = SearchBar.getSearchBar(this.testID.emojiPickerScreenPrefix);
|
||||
@@ -22,21 +25,26 @@ class EmojiPickerScreen {
|
||||
clearButton = SearchBar.getClearButton(this.testID.emojiPickerScreenPrefix);
|
||||
|
||||
toBeVisible = async () => {
|
||||
await expect(this.emojiPickerScreen).toBeVisible();
|
||||
await waitFor(this.emojiPickerScreen).toExist().withTimeout(timeouts.TEN_SEC);
|
||||
|
||||
return this.emojiPickerScreen;
|
||||
};
|
||||
|
||||
open = async () => {
|
||||
open = async (closeToolTip = false) => {
|
||||
// # Open emoji picker screen
|
||||
await PostOptionsScreen.pickReactionButton.tap();
|
||||
if (closeToolTip) {
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await this.toolTipCloseButton.tap();
|
||||
}
|
||||
|
||||
return this.toBeVisible();
|
||||
};
|
||||
|
||||
close = async () => {
|
||||
await this.closeButton.tap();
|
||||
await this.emojiPickerScreen.swipe('down');
|
||||
await expect(this.emojiPickerScreen).not.toBeVisible();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ class PostOptionsScreen {
|
||||
testID = {
|
||||
reactionEmojiPrefix: 'post_options.reaction_bar.reaction.',
|
||||
postOptionsScreen: 'post_options.screen',
|
||||
postOptionsBackdrop: 'post_options.backdrop',
|
||||
pickReactionButton: 'post_options.reaction_bar.pick_reaction.button',
|
||||
replyPostOption: 'post_options.reply_post.option',
|
||||
followThreadOption: 'post_options.follow_thread.option',
|
||||
@@ -26,7 +25,6 @@ class PostOptionsScreen {
|
||||
};
|
||||
|
||||
postOptionsScreen = element(by.id(this.testID.postOptionsScreen));
|
||||
postOptionsBackdrop = element(by.id(this.testID.postOptionsBackdrop));
|
||||
pickReactionButton = element(by.id(this.testID.pickReactionButton));
|
||||
replyPostOption = element(by.id(this.testID.replyPostOption));
|
||||
followThreadOption = element(by.id(this.testID.followThreadOption));
|
||||
@@ -52,8 +50,9 @@ class PostOptionsScreen {
|
||||
};
|
||||
|
||||
close = async () => {
|
||||
await this.postOptionsBackdrop.tap({x: 5, y: 10});
|
||||
await this.postOptionsScreen.swipe('down');
|
||||
await expect(this.postOptionsScreen).not.toBeVisible();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
};
|
||||
|
||||
deletePost = async ({confirm = true} = {}) => {
|
||||
|
||||
@@ -2,18 +2,17 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {ProfilePicture} from '@support/ui/component';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
class ReactionsScreen {
|
||||
testID = {
|
||||
reactorItemPrefix: 'reactions.reactor_item.',
|
||||
reactionsScreen: 'reactions.screen',
|
||||
reactionsBackdrop: 'reactions.backdrop',
|
||||
flatReactorsList: 'reactions.reactors_list.flat_list',
|
||||
};
|
||||
|
||||
reactionsScreen = element(by.id(this.testID.reactionsScreen));
|
||||
reactionsBackdrop = element(by.id(this.testID.reactionsBackdrop));
|
||||
flatReactorsList = element(by.id(this.testID.flatReactorsList));
|
||||
|
||||
toBeVisible = async () => {
|
||||
@@ -23,8 +22,9 @@ class ReactionsScreen {
|
||||
};
|
||||
|
||||
close = async () => {
|
||||
await this.reactionsBackdrop.tap({x: 5, y: 10});
|
||||
await this.reactionsScreen.swipe('down');
|
||||
await expect(this.reactionsScreen).not.toBeVisible();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
};
|
||||
|
||||
getReactorItem = (userId: string, emojiName: string) => {
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {ChannelListScreen} from '@support/ui/screen';
|
||||
import {timeouts} from '@support/utils';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
class ServerListScreen {
|
||||
testID = {
|
||||
serverListScreen: 'server_list.screen',
|
||||
serverListBackdrop: 'server_list.backdrop',
|
||||
serverListTitle: 'server_list.title',
|
||||
addServerButton: 'server_list.add_a_server.button',
|
||||
tutorialHighlight: 'tutorial_highlight',
|
||||
@@ -16,9 +15,8 @@ class ServerListScreen {
|
||||
};
|
||||
|
||||
serverListScreen = element(by.id(this.testID.serverListScreen));
|
||||
serverListBackdrop = element(by.id(this.testID.serverListBackdrop));
|
||||
serverListTitle = element(by.id(this.testID.serverListTitle));
|
||||
addServerButton = element(by.id(this.testID.addServerButton));
|
||||
addServerButton = element(by.text('Add a server'));
|
||||
tutorialHighlight = element(by.id(this.testID.tutorialHighlight));
|
||||
tutorialSwipeLeft = element(by.id(this.testID.tutorialSwipeLeft));
|
||||
|
||||
@@ -68,12 +66,13 @@ class ServerListScreen {
|
||||
};
|
||||
|
||||
close = async () => {
|
||||
await this.serverListBackdrop.tap({x: 5, y: 10});
|
||||
await this.serverListScreen.swipe('down');
|
||||
await expect(this.serverListScreen).not.toBeVisible();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
};
|
||||
|
||||
closeTutorial = async () => {
|
||||
await expect(this.tutorialHighlight).toExist();
|
||||
await waitFor(this.tutorialHighlight).toExist().withTimeout(timeouts.TEN_SEC);
|
||||
await this.tutorialSwipeLeft.tap();
|
||||
await expect(this.tutorialHighlight).not.toExist();
|
||||
};
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {timeouts} from '@support/utils';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
class ThreadOptionsScreen {
|
||||
testID = {
|
||||
threadOptionsScreen: 'thread_options.screen',
|
||||
threadOptionsBackdrop: 'thread_options.backdrop',
|
||||
replyThreadOption: 'post_options.reply_post.option',
|
||||
followThreadOption: 'post_options.follow_thread.option',
|
||||
followingThreadOption: 'post_options.following_thread.option',
|
||||
@@ -20,7 +19,6 @@ class ThreadOptionsScreen {
|
||||
};
|
||||
|
||||
threadOptionsScreen = element(by.id(this.testID.threadOptionsScreen));
|
||||
threadOptionsBackdrop = element(by.id(this.testID.threadOptionsBackdrop));
|
||||
replyThreadOption = element(by.id(this.testID.replyThreadOption));
|
||||
followThreadOption = element(by.id(this.testID.followThreadOption));
|
||||
followingThreadOption = element(by.id(this.testID.followingThreadOption));
|
||||
@@ -38,8 +36,9 @@ class ThreadOptionsScreen {
|
||||
};
|
||||
|
||||
close = async () => {
|
||||
await this.threadOptionsBackdrop.tap({x: 5, y: 10});
|
||||
await this.threadOptionsScreen.swipe('down');
|
||||
await expect(this.threadOptionsScreen).not.toBeVisible();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {ProfilePicture} from '@support/ui/component';
|
||||
import {timeouts} from '@support/utils';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
class UserProfileScreen {
|
||||
testID = {
|
||||
userProfileScreen: 'user_profile.screen',
|
||||
userProfileAvatarPrefix: 'user_profile_avatar.',
|
||||
userProfileBackdrop: 'user_profile.backdrop',
|
||||
systemAdminTag: 'user_profile.system_admin.tag',
|
||||
teamAdminTag: 'user_profile.team_admin.tag',
|
||||
channelAdminTag: 'user_profile.channel_admin.tag',
|
||||
@@ -26,7 +25,6 @@ class UserProfileScreen {
|
||||
};
|
||||
|
||||
userProfileScreen = element(by.id(this.testID.userProfileScreen));
|
||||
userProfileBackdrop = element(by.id(this.testID.userProfileBackdrop));
|
||||
userDisplayName = element(by.id(this.testID.userDisplayName));
|
||||
username = element(by.id(this.testID.username));
|
||||
sendMessageProfileOption = element(by.id(this.testID.sendMessageProfileOption));
|
||||
@@ -49,8 +47,9 @@ class UserProfileScreen {
|
||||
};
|
||||
|
||||
close = async () => {
|
||||
await this.userProfileBackdrop.tap({x: 5, y: 10});
|
||||
await this.userProfileScreen.swipe('down');
|
||||
await expect(this.userProfileScreen).not.toBeVisible();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
ServerScreen,
|
||||
SettingsScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Account - Account Menu', () => {
|
||||
@@ -63,6 +64,7 @@ describe('Account - Account Menu', () => {
|
||||
it('MM-T4988_2 - should be able to set user presence', async () => {
|
||||
// # Tap on user presence option and tap on offline user status option
|
||||
await AccountScreen.userPresenceOption.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await AccountScreen.offlineUserStatusOption.tap();
|
||||
|
||||
// * Verify on account screen and verify user presence icon and label are for offline user status
|
||||
@@ -72,6 +74,7 @@ describe('Account - Account Menu', () => {
|
||||
|
||||
// # Tap on user presence option and tap on do not disturb user status option
|
||||
await AccountScreen.userPresenceOption.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await AccountScreen.dndUserStatusOption.tap();
|
||||
|
||||
// * Verify on account screen and verify user presence icon and label are for do no disturb user status
|
||||
@@ -81,6 +84,7 @@ describe('Account - Account Menu', () => {
|
||||
|
||||
// # Tap on user presence option and tap on away user status option
|
||||
await AccountScreen.userPresenceOption.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await AccountScreen.awayUserStatusOption.tap();
|
||||
|
||||
// * Verify on account screen and verify user presence icon and label are for away user status
|
||||
@@ -90,6 +94,7 @@ describe('Account - Account Menu', () => {
|
||||
|
||||
// # Tap on user presence option and tap on online user status option
|
||||
await AccountScreen.userPresenceOption.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await AccountScreen.onlineUserStatusOption.tap();
|
||||
|
||||
// * Verify on account screen and verify user presence icon and label are for online user status
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
LoginScreen,
|
||||
ServerScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {getRandomId} from '@support/utils';
|
||||
import {getRandomId, timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Account - Custom Status', () => {
|
||||
@@ -108,9 +108,10 @@ describe('Account - Custom Status', () => {
|
||||
const customStatusText = `Status ${getRandomId()}`;
|
||||
const customStatusDuration = 'today';
|
||||
await CustomStatusScreen.open();
|
||||
await CustomStatusScreen.openEmojiPicker('default');
|
||||
await CustomStatusScreen.openEmojiPicker('default', true);
|
||||
await EmojiPickerScreen.searchInput.replaceText(customStatusEmojiName);
|
||||
await element(by.text('🤡')).tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await CustomStatusScreen.statusInput.replaceText(customStatusText);
|
||||
await CustomStatusScreen.doneButton.tap();
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
ServerScreen,
|
||||
ChannelInfoScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Channels - Archive Channel', () => {
|
||||
@@ -71,6 +72,7 @@ describe('Channels - Archive Channel', () => {
|
||||
await ChannelScreen.postDraftArchivedCloseChannelButton.tap();
|
||||
await BrowseChannelsScreen.open();
|
||||
await BrowseChannelsScreen.channelDropdownTextPublic.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await ChannelDropdownMenuScreen.archivedChannelsItem.tap();
|
||||
await BrowseChannelsScreen.searchInput.replaceText(publicChannel.name);
|
||||
|
||||
@@ -116,6 +118,7 @@ describe('Channels - Archive Channel', () => {
|
||||
await ChannelScreen.postDraftArchivedCloseChannelButton.tap();
|
||||
await BrowseChannelsScreen.open();
|
||||
await BrowseChannelsScreen.channelDropdownTextPublic.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await ChannelDropdownMenuScreen.archivedChannelsItem.tap();
|
||||
await BrowseChannelsScreen.searchInput.replaceText(privateChannel.name);
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
LoginScreen,
|
||||
ServerScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Channels - Browse Channels', () => {
|
||||
@@ -142,6 +143,7 @@ describe('Channels - Browse Channels', () => {
|
||||
await Channel.apiDeleteChannel(siteOneUrl, archivedChannel.id);
|
||||
await BrowseChannelsScreen.open();
|
||||
await BrowseChannelsScreen.channelDropdownTextPublic.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await ChannelDropdownMenuScreen.archivedChannelsItem.tap();
|
||||
await BrowseChannelsScreen.searchInput.replaceText(archivedChannel.name);
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ describe('Messaging - Emojis and Reactions', () => {
|
||||
await expect(PostOptionsScreen.getReactionEmoji('raised_hands')).toBeVisible();
|
||||
|
||||
// # Open emoji picker screen and add a new reaction
|
||||
await EmojiPickerScreen.open();
|
||||
await EmojiPickerScreen.open(true);
|
||||
await EmojiPickerScreen.searchInput.replaceText('clown_face');
|
||||
await element(by.text('🤡')).tap();
|
||||
|
||||
@@ -128,12 +128,12 @@ describe('Messaging - Emojis and Reactions', () => {
|
||||
|
||||
it('MM-T4862_3 - should be able to include emojis in a message and be able to find them in emoji bar and recently used section', async () => {
|
||||
// # Open a channel screen and post a message that includes emojis
|
||||
const message = 'The quick brown fox :fox_face: jumps over the lazy dog :dog:';
|
||||
const message = 'brown fox :fox_face: lazy dog :dog:';
|
||||
await ChannelScreen.open(channelsCategory, testChannel.name);
|
||||
await ChannelScreen.postMessage(message);
|
||||
|
||||
// * Verify message is posted with emojis
|
||||
const resolvedMessage = 'The quick brown fox 🦊 jumps over the lazy dog 🐶';
|
||||
const resolvedMessage = 'brown fox 🦊 lazy dog 🐶';
|
||||
const {post} = await Post.apiGetLastPostInChannel(siteOneUrl, testChannel.id);
|
||||
const {postListPostItem} = ChannelScreen.getPostListPostItem(post.id, resolvedMessage);
|
||||
await expect(postListPostItem).toBeVisible();
|
||||
@@ -150,7 +150,7 @@ describe('Messaging - Emojis and Reactions', () => {
|
||||
await EmojiPickerScreen.open();
|
||||
|
||||
// * Verify emojis exist in recently used section
|
||||
await expect(element(by.text('Recently Used'))).toExist();
|
||||
await expect(element(by.text('RECENTLY USED'))).toExist();
|
||||
await expect(element(by.text('🦊'))).toExist();
|
||||
await expect(element(by.text('🐶'))).toExist();
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ describe('Messaging - Message Reply', () => {
|
||||
await ChannelScreen.back();
|
||||
});
|
||||
|
||||
it('MM-T4785_3 - should not have reply option available on reply thread post options', async () => {
|
||||
it('MM-T4785_3 - should not have reply option available on reply thread post options -- KNOWN ISSUE: MM-50206', async () => {
|
||||
// # Open a channel screen, post a message, and tap on the post
|
||||
const message = `Message ${getRandomId()}`;
|
||||
await ChannelScreen.open(channelsCategory, testChannel.name);
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
ServerScreen,
|
||||
ThreadScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {getRandomId} from '@support/utils';
|
||||
import {getRandomId, timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Messaging - Pin and Unpin Message', () => {
|
||||
@@ -94,6 +94,7 @@ describe('Messaging - Pin and Unpin Message', () => {
|
||||
await PostOptionsScreen.pinPostOption.tap();
|
||||
|
||||
// * Verify pinned text is displayed on the post pre-header
|
||||
await wait(timeouts.ONE_SEC);
|
||||
const {postListPostItemPreHeaderText} = ThreadScreen.getPostListPostItem(post.id, message);
|
||||
await expect(postListPostItemPreHeaderText).toHaveText(pinnedText);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
LoginScreen,
|
||||
ServerScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {timeouts, wait} from '@support/utils';
|
||||
import {timeouts} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Server Login - Connect to Server', () => {
|
||||
@@ -72,7 +72,8 @@ describe('Server Login - Connect to Server', () => {
|
||||
await connectButton.tap();
|
||||
|
||||
// * Verify invalid url error
|
||||
await expect(serverUrlInputError).toHaveText('Can’t find this server. Check spelling and URL format.');
|
||||
await waitFor(serverUrlInputError).toExist().withTimeout(timeouts.TEN_SEC);
|
||||
await expect(serverUrlInputError).toHaveText('Cannot connect to the server.');
|
||||
});
|
||||
|
||||
it('MM-T4676_4 - should show connection error on invalid ssl or invalid host', async () => {
|
||||
@@ -83,6 +84,7 @@ describe('Server Login - Connect to Server', () => {
|
||||
await connectButton.tap();
|
||||
|
||||
// * Verify connection error
|
||||
await waitFor(serverUrlInputError).toExist().withTimeout(timeouts.TEN_SEC);
|
||||
await expect(serverUrlInputError).toHaveText(connectionError);
|
||||
|
||||
// # Connect with invalid host and valid server display name
|
||||
@@ -92,7 +94,7 @@ describe('Server Login - Connect to Server', () => {
|
||||
await connectButton.tap();
|
||||
|
||||
// * Verify connection error
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await waitFor(serverUrlInputError).toExist().withTimeout(timeouts.TEN_SEC);
|
||||
await expect(serverUrlInputError).toHaveText(connectionError);
|
||||
});
|
||||
|
||||
|
||||
@@ -79,9 +79,10 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
|
||||
// * Verify first server is active
|
||||
await expect(ServerListScreen.getServerItemActive(serverOneDisplayName)).toBeVisible();
|
||||
await waitFor(ServerListScreen.getServerItemActive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
|
||||
// # Add a second server and log in to the second server
|
||||
await User.apiAdminLogin(siteTwoUrl);
|
||||
@@ -97,10 +98,11 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
|
||||
// * Verify second server is active and first server is inactive
|
||||
await expect(ServerListScreen.getServerItemActive(serverTwoDisplayName)).toBeVisible();
|
||||
await expect(ServerListScreen.getServerItemInactive(serverOneDisplayName)).toBeVisible();
|
||||
await waitFor(ServerListScreen.getServerItemActive(serverTwoDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
|
||||
// # Add a third server and log in to the third server
|
||||
await User.apiAdminLogin(siteThreeUrl);
|
||||
@@ -116,11 +118,12 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
|
||||
// * Verify third server is active, and first and second servers are inactive
|
||||
await expect(ServerListScreen.getServerItemActive(serverThreeDisplayName)).toBeVisible();
|
||||
await expect(ServerListScreen.getServerItemInactive(serverOneDisplayName)).toBeVisible();
|
||||
await expect(ServerListScreen.getServerItemInactive(serverTwoDisplayName)).toBeVisible();
|
||||
await waitFor(ServerListScreen.getServerItemActive(serverThreeDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverTwoDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
|
||||
// # Go back to first server
|
||||
await ServerListScreen.getServerItemInactive(serverOneDisplayName).tap();
|
||||
@@ -132,6 +135,8 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen and tap on third server
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverThreeDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverThreeDisplayName).tap();
|
||||
|
||||
// * Verify on channel list screen of the third server
|
||||
@@ -140,6 +145,8 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen and go back to first server
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverOneDisplayName).tap();
|
||||
});
|
||||
|
||||
@@ -149,6 +156,8 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen, swipe left on first server and tap on edit option
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await waitFor(ServerListScreen.getServerItemActive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemActive(serverOneDisplayName).swipe('left');
|
||||
await ServerListScreen.getServerItemEditOption(serverOneDisplayName).tap();
|
||||
|
||||
@@ -188,6 +197,8 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen, swipe left on first server and tap on remove option
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await waitFor(ServerListScreen.getServerItemActive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemActive(serverOneDisplayName).swipe('left');
|
||||
await ServerListScreen.getServerItemRemoveOption(serverOneDisplayName).tap();
|
||||
|
||||
@@ -195,9 +206,10 @@ describe('Server Login - Server List', () => {
|
||||
await expect(Alert.removeServerTitle(serverOneDisplayName)).toBeVisible();
|
||||
|
||||
// # Tap on remove button and go back to server list screen
|
||||
await Alert.removeButton.tap();
|
||||
await Alert.removeButton3.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
|
||||
// * Verify first server is removed
|
||||
await expect(ServerListScreen.getServerItemActive(serverOneDisplayName)).not.toExist();
|
||||
@@ -216,6 +228,8 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen, swipe left on third server and tap on logout option
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverThreeDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverThreeDisplayName).swipe('left');
|
||||
await ServerListScreen.getServerItemLogoutOption(serverThreeDisplayName).tap();
|
||||
|
||||
@@ -223,7 +237,7 @@ describe('Server Login - Server List', () => {
|
||||
await expect(Alert.logoutTitle(serverThreeDisplayName)).toBeVisible();
|
||||
|
||||
// # Tap on logout button
|
||||
await Alert.logoutButton.tap();
|
||||
await Alert.logoutButton3.tap();
|
||||
|
||||
// * Verify third server is logged out
|
||||
await ServerListScreen.getServerItemInactive(serverThreeDisplayName).swipe('left');
|
||||
@@ -239,6 +253,7 @@ describe('Server Login - Server List', () => {
|
||||
|
||||
// # Open server list screen, attempt to add a server already logged in and with inactive session
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await ServerListScreen.addServerButton.tap();
|
||||
await expect(ServerScreen.headerTitleAddServer).toBeVisible();
|
||||
await ServerScreen.serverUrlInput.replaceText(serverTwoUrl);
|
||||
@@ -260,9 +275,11 @@ describe('Server Login - Server List', () => {
|
||||
// # Close server screen, open server list screen, log out of second server, and go back to first server
|
||||
await ServerScreen.close();
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverTwoDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverTwoDisplayName).swipe('left');
|
||||
await ServerListScreen.getServerItemLogoutOption(serverTwoDisplayName).tap();
|
||||
await Alert.logoutButton.tap();
|
||||
await Alert.logoutButton2.tap();
|
||||
await ServerListScreen.getServerItemActive(serverOneDisplayName).tap();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ beforeAll(async () => {
|
||||
await Plugin.apiDisableNonPrepackagedPlugins(siteOneUrl);
|
||||
|
||||
await device.launchApp({
|
||||
newInstance: false,
|
||||
newInstance: true,
|
||||
launchArgs: {detoxPrintBusyIdleResources: 'YES'},
|
||||
permissions: {
|
||||
notifications: 'YES',
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
SettingsScreen,
|
||||
ThemeDisplaySettingsScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {getRandomId} from '@support/utils';
|
||||
import {getRandomId, timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Smoke Test - Account', () => {
|
||||
@@ -59,6 +59,7 @@ describe('Smoke Test - Account', () => {
|
||||
it('MM-T5114_1 - should be able to set user presence and custom status', async () => {
|
||||
// # Tap on user presence option and tap on online user status option
|
||||
await AccountScreen.userPresenceOption.tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await AccountScreen.onlineUserStatusOption.tap();
|
||||
|
||||
// * Verify on account screen and verify user presence icon and label are for online user status
|
||||
@@ -71,9 +72,11 @@ describe('Smoke Test - Account', () => {
|
||||
const customStatusText = `Status ${getRandomId()}`;
|
||||
const customStatusDuration = 'today';
|
||||
await CustomStatusScreen.open();
|
||||
await CustomStatusScreen.openEmojiPicker('default');
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await CustomStatusScreen.openEmojiPicker('default', true);
|
||||
await EmojiPickerScreen.searchInput.replaceText(customStatusEmojiName);
|
||||
await element(by.text('🤡')).tap();
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await CustomStatusScreen.statusInput.replaceText(customStatusText);
|
||||
await CustomStatusScreen.doneButton.tap();
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ describe('Smoke Test - Autocomplete', () => {
|
||||
await ChannelScreen.hasPostMessage(post.id, `@${testUser.username}`);
|
||||
});
|
||||
|
||||
it('MM-T4886_2 - should be able to select and post channel mention suggestion', async () => {
|
||||
it('MM-T4886_2 - should be able to select and post channel mention suggestion -- KNOWN ISSUE: MM-50085', async () => {
|
||||
// # Type in "~" to activate channel mention autocomplete
|
||||
await ChannelScreen.postInput.typeText('~');
|
||||
await Autocomplete.toBeVisible();
|
||||
@@ -136,7 +136,7 @@ describe('Smoke Test - Autocomplete', () => {
|
||||
await ChannelScreen.hasPostMessage(post.id, '🦊');
|
||||
});
|
||||
|
||||
it('MM-T4886_4 - should be able to select and post slash suggestion', async () => {
|
||||
it('MM-T4886_4 - should be able to select and post slash suggestion -- KNOWN ISSUE: MM-50085', async () => {
|
||||
// # Type in "/" to activate slash suggestion autocomplete
|
||||
await ChannelScreen.postInput.typeText('/');
|
||||
await Autocomplete.toBeVisible();
|
||||
|
||||
@@ -139,7 +139,7 @@ describe('Smoke Test - Messaging', () => {
|
||||
|
||||
// # Open post options for message, open emoji picker screen, and add a reaction
|
||||
await ChannelScreen.openPostOptionsFor(post.id, resolvedMessage);
|
||||
await EmojiPickerScreen.open();
|
||||
await EmojiPickerScreen.open(true);
|
||||
await EmojiPickerScreen.searchInput.replaceText('clown_face');
|
||||
await element(by.text('🤡')).tap();
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
ServerListScreen,
|
||||
ServerScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {timeouts} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Smoke Test - Server Login', () => {
|
||||
@@ -78,8 +79,12 @@ 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');
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverOneDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverOneDisplayName).tap();
|
||||
await ServerListScreen.open();
|
||||
await ServerListScreen.serverListScreen.swipe('up');
|
||||
await waitFor(ServerListScreen.getServerItemInactive(serverTwoDisplayName)).toBeVisible().withTimeout(timeouts.TEN_SEC);
|
||||
await ServerListScreen.getServerItemInactive(serverTwoDisplayName).swipe('left');
|
||||
await ServerListScreen.getServerItemLogoutOption(serverTwoDisplayName).tap();
|
||||
|
||||
@@ -87,7 +92,7 @@ describe('Smoke Test - Server Login', () => {
|
||||
await expect(Alert.logoutTitle(serverTwoDisplayName)).toBeVisible();
|
||||
|
||||
// # Tap on logout button
|
||||
await Alert.logoutButton.tap();
|
||||
await Alert.logoutButton2.tap();
|
||||
|
||||
// * Verify second server is logged out
|
||||
await ServerListScreen.getServerItemInactive(serverTwoDisplayName).swipe('left');
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
ThreadOptionsScreen,
|
||||
ThreadScreen,
|
||||
} from '@support/ui/screen';
|
||||
import {getRandomId} from '@support/utils';
|
||||
import {getRandomId, timeouts, wait} from '@support/utils';
|
||||
import {expect} from 'detox';
|
||||
|
||||
describe('Threads - Follow and Unfollow Thread', () => {
|
||||
@@ -183,6 +183,7 @@ describe('Threads - Follow and Unfollow Thread', () => {
|
||||
await ThreadOptionsScreen.followingThreadOption.tap();
|
||||
|
||||
// * Verify thread is not displayed anymore in all your threads section
|
||||
await wait(timeouts.ONE_SEC);
|
||||
await expect(GlobalThreadsScreen.getThreadItem(parentPost.id)).not.toBeVisible();
|
||||
|
||||
// # Go back to channel list screen
|
||||
|
||||
4229
detox/package-lock.json
generated
4229
detox/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,23 +8,23 @@
|
||||
"@babel/plugin-transform-modules-commonjs": "7.20.11",
|
||||
"@babel/plugin-transform-runtime": "7.19.6",
|
||||
"@babel/preset-env": "7.20.2",
|
||||
"@jest/test-sequencer": "29.3.1",
|
||||
"@types/jest": "29.2.6",
|
||||
"@jest/test-sequencer": "29.4.1",
|
||||
"@types/jest": "29.4.0",
|
||||
"@types/tough-cookie": "4.0.2",
|
||||
"@types/uuid": "9.0.0",
|
||||
"aws-sdk": "2.1297.0",
|
||||
"axios": "1.2.3",
|
||||
"aws-sdk": "2.1305.0",
|
||||
"axios": "1.3.0",
|
||||
"axios-cookiejar-support": "4.0.6",
|
||||
"babel-jest": "29.3.1",
|
||||
"babel-jest": "29.4.1",
|
||||
"babel-plugin-module-resolver": "5.0.0",
|
||||
"client-oauth2": "4.3.3",
|
||||
"deepmerge": "4.2.2",
|
||||
"deepmerge": "4.3.0",
|
||||
"detox": "20.1.2",
|
||||
"form-data": "4.0.0",
|
||||
"jest": "29.3.1",
|
||||
"jest-circus": "29.3.1",
|
||||
"jest-cli": "29.3.1",
|
||||
"jest-html-reporters": "3.0.11",
|
||||
"jest": "29.4.1",
|
||||
"jest-circus": "29.4.1",
|
||||
"jest-cli": "29.4.1",
|
||||
"jest-html-reporters": "3.1.1",
|
||||
"jest-junit": "15.0.0",
|
||||
"jest-stare": "2.4.1",
|
||||
"junit-report-merger": "4.0.0",
|
||||
@@ -34,8 +34,8 @@
|
||||
"shelljs": "0.8.5",
|
||||
"tough-cookie": "4.1.2",
|
||||
"ts-jest": "29.0.5",
|
||||
"tslib": "2.4.1",
|
||||
"typescript": "4.9.4",
|
||||
"tslib": "2.5.0",
|
||||
"typescript": "4.9.5",
|
||||
"uuid": "9.0.0",
|
||||
"xml2js": "0.4.23"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user