This commit is contained in:
Julian Mondragon
2023-01-03 09:24:09 -05:00
256 changed files with 3885 additions and 2393 deletions

View File

@@ -36,7 +36,7 @@
"android.emulator": {
"type": "android.emulator",
"device": {
"avdName": "detox_pixel_4_xl_api_30"
"avdName": "detox_pixel_4_xl_api_31"
}
}
},

View File

@@ -1,7 +1,7 @@
AvdId = Detox_Pixel_4_XL_API_30
AvdId = Detox_Pixel_4_XL_API_31
PlayStore.enabled = false
abi.type = x86
avd.ini.displayname = Detox Pixel 4 XL API 30
abi.type = x86_64
avd.ini.displayname = Detox Pixel 4 XL API 31
avd.ini.encoding = UTF-8
disk.dataPartition.size = 6g
fastboot.chosenSnapshotFile =
@@ -16,7 +16,7 @@ hw.audioOutput = no
hw.battery = yes
hw.camera.back = virtualscene
hw.camera.front = emulated
hw.cpu.arch = x86
hw.cpu.arch = x86_64
hw.cpu.ncore = 4
hw.dPad = no
hw.device.hash2 = MD5:80326cf5b53c08af25d4243cb231faa9
@@ -36,7 +36,7 @@ hw.sdCard = no
hw.sensors.orientation = yes
hw.sensors.proximity = yes
hw.trackBall = no
image.sysdir.1 = system-images/android-30/google_apis/x86/
image.sysdir.1 = system-images/android-31/google_apis/x86_64/
runtime.network.latency = none
runtime.network.speed = full
sdcard.size = 0

View File

@@ -3,13 +3,13 @@
set -ex
set -o pipefail
NAME=detox_pixel_4_xl_api_30
NAME=detox_pixel_4_xl_api_31
if emulator -list-avds | grep -q $NAME; then
echo "'${NAME}' Android virtual device already exists."
else
# Create virtual device in a relative "detox_pixel_4_xl_api_30" folder
avdmanager create avd -n $NAME -k 'system-images;android-30;google_apis;x86' -g google_apis -p $NAME -d 'pixel'
# Create virtual device in a relative "detox_pixel_4_xl_api_31" folder
avdmanager create avd -n $NAME -k 'system-images;android-31;google_apis;x86_64' -g google_apis -p $NAME -d 'pixel'
# Copy predefined config and skin
cp -r android_emulator/ $NAME/

View File

@@ -2,7 +2,7 @@
// 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 BrowseChannelsScreen {
@@ -50,6 +50,7 @@ class BrowseChannelsScreen {
open = async () => {
// # Open browse channels screen
await ChannelListScreen.headerPlusButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelListScreen.browseChannelsItem.tap();
return this.toBeVisible();

View File

@@ -25,6 +25,7 @@ class ChannelInfoScreen {
setHeaderAction: 'channel_info.channel_actions.set_header.action',
addPeopleAction: 'channel_info.channel_actions.add_people.action',
copyChannelLinkAction: 'channel_info.channel_actions.copy_channel_link.action',
joinStartCallAction: 'channel_info.channel_actions.join_start_call.action',
extraHeader: 'channel_info.extra.header',
extraCreatedBy: 'channel_info.extra.created_by',
extraCreatedOn: 'channel_info.extra.created_on',
@@ -33,6 +34,7 @@ class ChannelInfoScreen {
notificationPreferenceOption: 'channel_info.options.notification_preference.option',
pinnedMessagesOption: 'channel_info.options.pinned_messages.option',
membersOption: 'channel_info.options.members.option',
copyChannelLinkOption: 'channel_info.options.copy_channel_link.option',
editChannelOption: 'channel_info.options.edit_channel.option',
convertPrivateOption: 'channel_info.options.convert_private.option',
leaveChannelOption: 'channel_info.options.leave_channel.option',
@@ -53,6 +55,7 @@ class ChannelInfoScreen {
setHeaderAction = element(by.id(this.testID.setHeaderAction));
addPeopleAction = element(by.id(this.testID.addPeopleAction));
copyChannelLinkAction = element(by.id(this.testID.copyChannelLinkAction));
joinStartCallAction = element(by.id(this.testID.joinStartCallAction));
extraHeader = element(by.id(this.testID.extraHeader));
extraCreatedBy = element(by.id(this.testID.extraCreatedBy));
extraCreatedOn = element(by.id(this.testID.extraCreatedOn));
@@ -61,6 +64,7 @@ class ChannelInfoScreen {
notificationPreferenceOption = element(by.id(this.testID.notificationPreferenceOption));
pinnedMessagesOption = element(by.id(this.testID.pinnedMessagesOption));
membersOption = element(by.id(this.testID.membersOption));
copyChannelLinkOption = element(by.id(this.testID.copyChannelLinkOption));
editChannelOption = element(by.id(this.testID.editChannelOption));
convertPrivateOption = element(by.id(this.testID.convertPrivateOption));
leaveChannelOption = element(by.id(this.testID.leaveChannelOption));

View File

@@ -17,7 +17,6 @@ class ChannelListScreen {
serverIcon: 'channel_list.servers.server_icon',
headerTeamDisplayName: 'channel_list_header.team_display_name',
headerServerDisplayName: 'channel_list_header.server_display_name',
headerChevronButton: 'channel_list_header.chevron.button',
headerPlusButton: 'channel_list_header.plus.button',
subheaderSearchFieldButton: 'channel_list_subheader.search_field.button',
findChannelsInput: 'channel_list.search_field.find_channels.input',
@@ -28,7 +27,6 @@ class ChannelListScreen {
serverIcon = element(by.id(this.testID.serverIcon));
headerTeamDisplayName = element(by.id(this.testID.headerTeamDisplayName));
headerServerDisplayName = element(by.id(this.testID.headerServerDisplayName));
headerChevronButton = element(by.id(this.testID.headerChevronButton));
headerPlusButton = element(by.id(this.testID.headerPlusButton));
subheaderSearchFieldButton = element(by.id(this.testID.subheaderSearchFieldButton));
findChannelsInput = element(by.id(this.testID.findChannelsInput));

View File

@@ -3,7 +3,7 @@
import {ProfilePicture} from '@support/ui/component';
import {ChannelListScreen} from '@support/ui/screen';
import {timeouts} from '@support/utils';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
class CreateDirectMessageScreen {
@@ -19,6 +19,7 @@ class CreateDirectMessageScreen {
flatUserList: 'create_direct_message.user_list.flat_list',
sectionUserList: 'create_direct_message.user_list.section_list',
tutorialHighlight: 'tutorial_highlight',
tutorialSwipeLeft: 'tutorial_swipe_left',
};
createDirectMessageScreen = element(by.id(this.testID.createDirectMessageScreen));
@@ -30,6 +31,7 @@ class CreateDirectMessageScreen {
flatUserList = element(by.id(this.testID.flatUserList));
sectionUserList = element(by.id(this.testID.sectionUserList));
tutorialHighlight = element(by.id(this.testID.tutorialHighlight));
tutorialSwipeLeft = element(by.id(this.testID.tutorialSwipeLeft));
getSelectedUser = (userId: string) => {
return element(by.id(`${this.testID.selectedUserPrefix}${userId}`));
@@ -64,6 +66,7 @@ class CreateDirectMessageScreen {
open = async () => {
// # Open create direct message screen
await ChannelListScreen.headerPlusButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelListScreen.openDirectMessageItem.tap();
return this.toBeVisible();
@@ -76,7 +79,7 @@ class CreateDirectMessageScreen {
closeTutorial = async () => {
await expect(this.tutorialHighlight).toExist();
await this.closeButton.tap();
await this.tutorialSwipeLeft.tap();
await expect(this.tutorialHighlight).not.toExist();
};
}

View File

@@ -6,7 +6,7 @@ import {
ChannelScreen,
ChannelListScreen,
} from '@support/ui/screen';
import {timeouts} from '@support/utils';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
class CreateOrEditChannelScreen {
@@ -51,6 +51,7 @@ class CreateOrEditChannelScreen {
openCreateChannel = async () => {
// # Open create channel screen
await ChannelListScreen.headerPlusButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelListScreen.createNewChannelItem.tap();
return this.toBeVisible();

View File

@@ -2,7 +2,7 @@
// See LICENSE.txt for license information.
import {ServerScreen} from '@support/ui/screen';
import {timeouts} from '@support/utils';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
class LoginScreen {
@@ -62,6 +62,7 @@ class LoginScreen {
await this.usernameInput.replaceText(user.username);
await this.passwordInput.replaceText(user.password);
await this.signinButton.tap();
await wait(timeouts.ONE_SEC);
};
}

View File

@@ -2,7 +2,7 @@
// See LICENSE.txt for license information.
import {ChannelListScreen} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {timeouts} from '@support/utils';
import {expect} from 'detox';
class ServerListScreen {
@@ -11,12 +11,16 @@ class ServerListScreen {
serverListBackdrop: 'server_list.backdrop',
serverListTitle: 'server_list.title',
addServerButton: 'server_list.add_a_server.button',
tutorialHighlight: 'tutorial_highlight',
tutorialSwipeLeft: 'tutorial_swipe_left',
};
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));
tutorialHighlight = element(by.id(this.testID.tutorialHighlight));
tutorialSwipeLeft = element(by.id(this.testID.tutorialSwipeLeft));
toServerItemTestIdPrefix = (serverDisplayName: string) => {
return `server_list.server_item.${serverDisplayName.replace(/ /g, '_').toLocaleLowerCase()}`;
@@ -60,10 +64,6 @@ class ServerListScreen {
// # Open server list screen
await ChannelListScreen.serverIcon.tap();
// # Close tip overlay
await wait(timeouts.FOUR_SEC);
await this.serverListScreen.tap({x: 5, y: 10});
return this.toBeVisible();
};
@@ -71,6 +71,12 @@ class ServerListScreen {
await this.serverListBackdrop.tap({x: 5, y: 10});
await expect(this.serverListScreen).not.toBeVisible();
};
closeTutorial = async () => {
await expect(this.tutorialHighlight).toExist();
await this.tutorialSwipeLeft.tap();
await expect(this.tutorialHighlight).not.toExist();
};
}
const serverListScreen = new ServerListScreen();

View File

@@ -15,6 +15,7 @@ class SettingsScreen {
advancedSettingsOption: 'settings.advanced_settings.option',
aboutOption: 'settings.about.option',
helpOption: 'settings.help.option',
reportProblemOption: 'settings.report_problem.option',
};
settingsScreen = element(by.id(this.testID.settingsScreen));
@@ -25,6 +26,7 @@ class SettingsScreen {
advancedSettingsOption = element(by.id(this.testID.advancedSettingsOption));
aboutOption = element(by.id(this.testID.aboutOption));
helpOption = element(by.id(this.testID.helpOption));
reportProblemOption = element(by.id(this.testID.reportProblemOption));
toBeVisible = async () => {
await waitFor(this.settingsScreen).toExist().withTimeout(timeouts.TEN_SEC);

View File

@@ -154,7 +154,7 @@ describe('Account - Custom Status', () => {
await AccountScreen.customStatusClearButton.tap();
// * Verify custom status is cleared from account screen
const defaultStatusText = 'Set a Status';
const defaultStatusText = 'Set a custom status';
const {accountCustomStatusEmoji, accountCustomStatusText, accountCustomStatusExpiry} = AccountScreen.getCustomStatus(customStatusEmojiName, customStatusDuration);
await expect(accountCustomStatusEmoji).not.toExist();
await expect(accountCustomStatusText).toHaveText(defaultStatusText);

View File

@@ -58,6 +58,7 @@ describe('Account - Settings', () => {
await expect(SettingsScreen.advancedSettingsOption).toBeVisible();
await expect(SettingsScreen.aboutOption).toBeVisible();
await expect(SettingsScreen.helpOption).toBeVisible();
await expect(SettingsScreen.reportProblemOption).toBeVisible();
});
it('MM-T4991_2 - should be able to go to notification settings screen', async () => {

View File

@@ -20,6 +20,7 @@ import {
LoginScreen,
ServerScreen,
} from '@support/ui/screen';
import {timeouts} from '@support/utils';
import {expect} from 'detox';
describe('Autocomplete - Create Channel', () => {
@@ -58,7 +59,7 @@ describe('Autocomplete - Create Channel', () => {
await CreateOrEditChannelScreen.headerInput.typeText('@');
// * Verify at-mention list is displayed
await expect(Autocomplete.sectionAtMentionList).toBeVisible();
await waitFor(Autocomplete.sectionAtMentionList).toBeVisible().withTimeout(timeouts.ONE_SEC);
});
it('MM-T4904_2 - should render channel mention autocomplete in header input', async () => {

View File

@@ -22,6 +22,7 @@ import {
LoginScreen,
ServerScreen,
} from '@support/ui/screen';
import {timeouts} from '@support/utils';
import {expect} from 'detox';
describe('Autocomplete - Edit Channel', () => {
@@ -65,7 +66,7 @@ describe('Autocomplete - Edit Channel', () => {
await CreateOrEditChannelScreen.headerInput.typeText('@');
// * Verify at-mention list is displayed
await expect(Autocomplete.sectionAtMentionList).toBeVisible();
await waitFor(Autocomplete.sectionAtMentionList).toBeVisible().withTimeout(timeouts.ONE_SEC);
});
it('MM-T4885_2 - should render channel mention autocomplete in header input', async () => {

View File

@@ -20,6 +20,7 @@ import {
ServerScreen,
ChannelInfoScreen,
} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
describe('Channels - Channel Info', () => {
@@ -58,12 +59,10 @@ describe('Channels - Channel Info', () => {
await expect(element(by.text(`Channel header: ${testChannel.display_name.toLowerCase()}`))).toBeVisible();
await expect(ChannelInfoScreen.favoriteAction).toBeVisible();
await expect(ChannelInfoScreen.muteAction).toBeVisible();
await expect(ChannelInfoScreen.addPeopleAction).toBeVisible();
await expect(ChannelInfoScreen.copyChannelLinkAction).toBeVisible();
await expect(ChannelInfoScreen.joinStartCallAction).toBeVisible();
await expect(ChannelInfoScreen.ignoreMentionsOptionToggledOff).toBeVisible();
await expect(ChannelInfoScreen.notificationPreferenceOption).toBeVisible();
await expect(ChannelInfoScreen.pinnedMessagesOption).toBeVisible();
await expect(ChannelInfoScreen.membersOption).toBeVisible();
await expect(ChannelInfoScreen.copyChannelLinkOption).toBeVisible();
await expect(ChannelInfoScreen.editChannelOption).toBeVisible();
await expect(ChannelInfoScreen.leaveChannelOption).toBeVisible();
await expect(ChannelInfoScreen.archiveChannelOption).toBeVisible();
@@ -90,6 +89,7 @@ describe('Channels - Channel Info', () => {
// # Open a channel screen, tap on channel quick actions button, and tap on channel info action
await ChannelScreen.open(channelsCategory, testChannel.name);
await ChannelScreen.channelQuickActionsButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelScreen.channelInfoQuickAction.tap();
// * Verify on channel info screen

View File

@@ -27,6 +27,7 @@ import {
LoginScreen,
ServerScreen,
} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
describe('Channels - Channel List', () => {
@@ -65,7 +66,6 @@ describe('Channels - Channel List', () => {
await expect(ChannelListScreen.serverIcon).toBeVisible();
await expect(ChannelListScreen.headerTeamDisplayName).toHaveText(testTeam.display_name);
await expect(ChannelListScreen.headerServerDisplayName).toHaveText(serverOneDisplayName);
await expect(ChannelListScreen.headerChevronButton).toBeVisible();
await expect(ChannelListScreen.headerPlusButton).toBeVisible();
await expect(ChannelListScreen.threadsButton).toBeVisible();
await expect(ChannelListScreen.getCategoryHeaderDisplayName(channelsCategory)).toHaveText('CHANNELS');
@@ -128,6 +128,7 @@ describe('Channels - Channel List', () => {
it('MM-T4728_4 - should be able to go to browse channels screen', async () => {
// # Tap on plus menu button and tap on browse channels item
await ChannelListScreen.headerPlusButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelListScreen.browseChannelsItem.tap();
// * Verify on browse channels screen
@@ -140,6 +141,7 @@ describe('Channels - Channel List', () => {
it('MM-T4728_5 - should be able to go to create direct message screen', async () => {
// # Tap on plus menu button and tap on open a direct message item
await ChannelListScreen.headerPlusButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelListScreen.openDirectMessageItem.tap();
// * Verify on create direct message screen
@@ -153,6 +155,7 @@ describe('Channels - Channel List', () => {
it('MM-T4728_6 - should be able to go to create channel screen', async () => {
// # Tap on plus menu button and tap on create new channel item
await ChannelListScreen.headerPlusButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelListScreen.createNewChannelItem.tap();
// * Verify on create channel screen
@@ -193,7 +196,7 @@ describe('Channels - Channel List', () => {
// * Verify on first team and team sidebar item is selected and has correct display name abbreviation
await expect(ChannelListScreen.headerTeamDisplayName).toHaveText(testTeam.display_name);
await expect(ChannelListScreen.getTeamItemSelected(testTeam.id)).toBeVisible();
await expect(ChannelListScreen.getTeamItemDisplayNameAbbreviation(testTeam.id)).toHaveText(testTeam.display_name.substring(0, 2));
await expect(ChannelListScreen.getTeamItemDisplayNameAbbreviation(testTeam.id)).toHaveText(testTeam.display_name.substring(0, 2).toUpperCase());
// # Tap on second team item from team sidebar
await ChannelListScreen.getTeamItemNotSelected(testTeamTwo.id).tap();
@@ -201,7 +204,7 @@ describe('Channels - Channel List', () => {
// * Verify on second team and team sidebar item is selected and has correct display name abbreviation
await expect(ChannelListScreen.headerTeamDisplayName).toHaveText(testTeamTwo.display_name);
await expect(ChannelListScreen.getTeamItemSelected(testTeamTwo.id)).toBeVisible();
await expect(ChannelListScreen.getTeamItemDisplayNameAbbreviation(testTeamTwo.id)).toHaveText(testTeamTwo.display_name.substring(0, 2));
await expect(ChannelListScreen.getTeamItemDisplayNameAbbreviation(testTeamTwo.id)).toHaveText(testTeamTwo.display_name.substring(0, 2).toUpperCase());
// # Tap back on first team item from team sidebar
await ChannelListScreen.getTeamItemNotSelected(testTeam.id).tap();

View File

@@ -57,7 +57,6 @@ describe('Channels - Channel Post List', () => {
await expect(ChannelScreen.backButton).toBeVisible();
await expect(ChannelScreen.headerTitle).toHaveText(testChannel.display_name);
await expect(ChannelScreen.introDisplayName).toHaveText(testChannel.display_name);
await expect(ChannelScreen.introAddPeopleAction).toBeVisible();
await expect(ChannelScreen.introSetHeaderAction).toBeVisible();
await expect(ChannelScreen.introChannelInfoAction).toBeVisible();
await expect(ChannelScreen.postList.getFlatList()).toBeVisible();

View File

@@ -60,7 +60,6 @@ describe('Channels - Create Direct Message', () => {
// * Verify basic elements on create direct message screen
await expect(CreateDirectMessageScreen.closeButton).toBeVisible();
await expect(CreateDirectMessageScreen.startButton).toBeVisible();
await expect(CreateDirectMessageScreen.searchInput).toBeVisible();
await expect(CreateDirectMessageScreen.sectionUserList).toBeVisible();

View File

@@ -9,7 +9,6 @@
import {
Channel,
Post,
Setup,
Team,
User,
@@ -21,11 +20,13 @@ import {
import {
ChannelScreen,
ChannelListScreen,
CreateDirectMessageScreen,
HomeScreen,
LoginScreen,
ServerScreen,
ChannelInfoScreen,
} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
describe('Channels - Favorite and Unfavorite Channel', () => {
@@ -62,9 +63,11 @@ describe('Channels - Favorite and Unfavorite Channel', () => {
// # Open a channel screen, tap on channel quick actions button, and tap on favorite quick action to favorite the channel
await ChannelScreen.open(channelsCategory, testChannel.name);
await ChannelScreen.channelQuickActionsButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelScreen.favoriteQuickAction.tap();
// * Verify favorited toast message appears
await wait(timeouts.ONE_SEC);
await expect(ChannelScreen.toastMessage).toHaveText('This channel was favorited');
// # Go back to channel list screen
@@ -76,9 +79,11 @@ describe('Channels - Favorite and Unfavorite Channel', () => {
// # Go back to the favorited channel, tap on channel quick actions button, and tap on favorited quick action to unfavorite the channel
await ChannelScreen.open(favoritesCategory, testChannel.name);
await ChannelScreen.channelQuickActionsButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelScreen.unfavoriteQuickAction.tap();
// * Verify unfavorited toast message appears
await wait(timeouts.ONE_SEC);
await expect(ChannelScreen.toastMessage).toHaveText('This channel was unfavorited');
// # Go back to channel list screen
@@ -117,17 +122,19 @@ describe('Channels - Favorite and Unfavorite Channel', () => {
const {user: newUser} = await User.apiCreateUser(siteOneUrl);
await Team.apiAddUserToTeam(siteOneUrl, newUser.id, testTeam.id);
const {channel: directMessageChannel} = await Channel.apiCreateDirectChannel(siteOneUrl, [testUser.id, newUser.id]);
await Post.apiCreatePost(siteOneUrl, {
channelId: directMessageChannel.id,
message: 'test',
});
await CreateDirectMessageScreen.open();
await CreateDirectMessageScreen.closeTutorial();
await CreateDirectMessageScreen.searchInput.replaceText(newUser.username);
await CreateDirectMessageScreen.getUserItem(newUser.id).tap();
await CreateDirectMessageScreen.startButton.tap();
await ChannelScreen.postMessage('test');
await device.reloadReactNative();
await ChannelScreen.open(directMessagesCategory, directMessageChannel.name);
await ChannelListScreen.getChannelItemDisplayName(directMessagesCategory, directMessageChannel.name).tap();
await ChannelScreen.introFavoriteAction.tap();
await ChannelScreen.back();
// * Verify direct message channel is listed under favorites category
await expect(ChannelListScreen.getChannelItemDisplayName(favoritesCategory, directMessageChannel.name)).toBeVisible();
await expect(ChannelListScreen.getChannelItemDisplayName(favoritesCategory, directMessageChannel.name)).toHaveText(newUser.username);
// # Go back to the favorited direct message channel, tap on intro favorited action to unfavorite the direct message channel, and go back to channel list screen
await ChannelScreen.open(favoritesCategory, directMessageChannel.name);

View File

@@ -23,6 +23,7 @@ import {
ServerScreen,
ChannelInfoScreen,
} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
describe('Channels - Leave Channel', () => {
@@ -89,6 +90,7 @@ describe('Channels - Leave Channel', () => {
await device.reloadReactNative();
await ChannelScreen.open(channelsCategory, channel.name);
await ChannelScreen.channelQuickActionsButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelScreen.leaveChannel({confirm: true});
// * Verify on channel list screen and the channel left by the user does not appear on the list

View File

@@ -20,6 +20,7 @@ import {
ServerScreen,
ChannelInfoScreen,
} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
describe('Channels - Mute and Unmute Channel', () => {
@@ -50,16 +51,20 @@ describe('Channels - Mute and Unmute Channel', () => {
// # Open a channel screen, tap on channel quick actions button, and tap on mute quick action to mute the channel
await ChannelScreen.open(channelsCategory, testChannel.name);
await ChannelScreen.channelQuickActionsButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelScreen.muteQuickAction.tap();
// * Verify muted toast message appears
await wait(timeouts.ONE_SEC);
await expect(ChannelScreen.toastMessage).toHaveText('This channel was muted');
// # Tap on channel quick actions button and tap on muted quick action to unmute the channel
await ChannelScreen.channelQuickActionsButton.tap();
await wait(timeouts.ONE_SEC);
await ChannelScreen.unmuteQuickAction.tap();
// * Verify unmuted toast message appears
await wait(timeouts.ONE_SEC);
await expect(ChannelScreen.toastMessage).toHaveText('This channel was unmuted');
// # Go back to channel list screen

View File

@@ -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 - Save and Unsave Message', () => {
@@ -102,6 +102,7 @@ describe('Messaging - Save and Unsave Message', () => {
await PostOptionsScreen.unsavePostOption.tap();
// * Verify saved text is not displayed on the post pre-header
await wait(timeouts.ONE_SEC);
await expect(postListPostItemPreHeaderText).not.toBeVisible();
// # Go back to channel list screen

View File

@@ -12,6 +12,7 @@ import {
LoginScreen,
ServerScreen,
} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
describe('Server Login - Connect to Server', () => {
@@ -91,6 +92,7 @@ describe('Server Login - Connect to Server', () => {
await connectButton.tap();
// * Verify connection error
await wait(timeouts.ONE_SEC);
await expect(serverUrlInputError).toHaveText(connectionError);
});

View File

@@ -30,6 +30,7 @@ import {
ServerScreen,
ServerListScreen,
} from '@support/ui/screen';
import {timeouts, wait} from '@support/utils';
import {expect} from 'detox';
describe('Server Login - Server List', () => {
@@ -61,6 +62,7 @@ describe('Server Login - Server List', () => {
it('MM-T4691_1 - should match elements on server list screen', async () => {
// # Open server list screen
await ServerListScreen.open();
await ServerListScreen.closeTutorial();
// * Verify basic elements on server list screen
await expect(ServerListScreen.serverListTitle).toHaveText('Your servers');
@@ -91,7 +93,6 @@ describe('Server Login - Server List', () => {
// * Verify on channel list screen of the second server
await ChannelListScreen.toBeVisible();
await device.reloadReactNative();
await expect(ChannelListScreen.headerServerDisplayName).toHaveText(serverTwoDisplayName);
// # Open server list screen
@@ -195,6 +196,7 @@ describe('Server Login - Server List', () => {
// # Tap on remove button and go back to server list screen
await Alert.removeButton.tap();
await wait(timeouts.ONE_SEC);
await ServerListScreen.open();
// * Verify first server is removed

View File

@@ -88,7 +88,7 @@ describe('Smoke Test - Account', () => {
await AccountScreen.customStatusClearButton.tap();
// * Verify custom status is cleared from account screen
const defaultStatusText = 'Set a Status';
const defaultStatusText = 'Set a custom status';
await expect(accountCustomStatusEmoji).not.toExist();
await expect(accountCustomStatusText).toHaveText(defaultStatusText);
await expect(accountCustomStatusExpiry).not.toExist();

View File

@@ -27,7 +27,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('Smoke Test - Messaging', () => {
@@ -189,6 +189,7 @@ describe('Smoke Test - Messaging', () => {
await PostOptionsScreen.pinPostOption.tap();
// * Verify pinned text is displayed on the post pre-header
await wait(timeouts.ONE_SEC);
const {postListPostItemPreHeaderText: threadPostListPostItemPreHeaderText} = ThreadScreen.getPostListPostItem(post.id, message);
await expect(threadPostListPostItemPreHeaderText).toHaveText(pinnedText);

View File

@@ -59,6 +59,7 @@ describe('Smoke Test - Server Login', () => {
it('MM-T4675_2 - should be able to add a new server and log-in-to/log-out-from the new server', async () => {
// # Open server list screen
await ServerListScreen.open();
await ServerListScreen.closeTutorial();
// * Verify on server list screen
await ServerListScreen.toBeVisible();
@@ -73,7 +74,6 @@ describe('Smoke Test - Server Login', () => {
// * Verify on channel list screen of the second server
await ChannelListScreen.toBeVisible();
await device.reloadReactNative();
await expect(ChannelListScreen.headerServerDisplayName).toHaveText(serverTwoDisplayName);
// # Go back to first server, open server list screen, swipe left on second server and tap on logout option

View File

@@ -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('Smoke Test - Threads', () => {
@@ -91,6 +91,7 @@ describe('Smoke Test - Threads', () => {
await ThreadOptionsScreen.markAsReadOption.tap();
// * Verify thread is not displayed anymore in unread threads section
await wait(timeouts.ONE_SEC);
await expect(GlobalThreadsScreen.getThreadItem(parentPost.id)).not.toBeVisible();
// # Tap on all your threads button, tap on the thread, and add new reply to thread
@@ -132,7 +133,9 @@ describe('Smoke Test - Threads', () => {
// # Go back to global threads screen, open thread options for thread, tap on save option, and tap on thread
await ThreadScreen.back();
await GlobalThreadsScreen.openThreadOptionsFor(parentPost.id);
await wait(timeouts.ONE_SEC);
await ThreadOptionsScreen.unsaveThreadOption.tap();
await wait(timeouts.ONE_SEC);
await GlobalThreadsScreen.getThreadItem(parentPost.id).tap();
// * Verify saved text is not displayed on the post pre-header

View File

@@ -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 - Mark Thread as Read and Unread', () => {
@@ -119,6 +119,7 @@ describe('Threads - Mark Thread as Read and Unread', () => {
await ThreadOptionsScreen.markAsReadOption.tap();
// * Verify thread is not displayed anymore in unread threads section
await wait(timeouts.ONE_SEC);
await expect(GlobalThreadsScreen.getThreadItem(parentPost.id)).not.toBeVisible();
// # Tap on all your threads button

View File

@@ -14,14 +14,14 @@
"@types/jest": "29.2.4",
"@types/tough-cookie": "4.0.2",
"@types/uuid": "9.0.0",
"aws-sdk": "2.1268.0",
"aws-sdk": "2.1278.0",
"axios": "1.2.1",
"axios-cookiejar-support": "4.0.3",
"babel-jest": "29.3.1",
"babel-plugin-module-resolver": "4.1.0",
"client-oauth2": "4.3.3",
"deepmerge": "4.2.2",
"detox": "20.0.3",
"detox": "20.1.0",
"form-data": "4.0.0",
"jest": "29.3.1",
"jest-circus": "29.3.1",
@@ -30,14 +30,14 @@
"jest-junit": "15.0.0",
"jest-stare": "2.4.1",
"junit-report-merger": "4.0.0",
"moment-timezone": "0.5.39",
"moment-timezone": "0.5.40",
"recursive-readdir": "2.2.3",
"sanitize-filename": "1.6.3",
"shelljs": "0.8.5",
"tough-cookie": "4.1.2",
"ts-jest": "29.0.3",
"tslib": "2.4.1",
"typescript": "4.9.3",
"typescript": "4.9.4",
"uuid": "9.0.0",
"xml2js": "0.4.23"
}
@@ -2792,9 +2792,9 @@
}
},
"node_modules/aws-sdk": {
"version": "2.1268.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1268.0.tgz",
"integrity": "sha512-N2A42YrSMTDFCY5lU3QOJz+CZbGKIrAQS3We9+HjEeDP+FPE+M2H9Zzy8Mk18uC6v8bP3lbTTCpTTvtje6i+Pw==",
"version": "2.1278.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1278.0.tgz",
"integrity": "sha512-keh0FXU6kP5j5vkWDgizZCSggmRfyRLUxmDKDVuiWb64H9FHIgoDBTMnYzKnQr6trHdBMopQdQ7RxnjYZ3BblA==",
"dev": true,
"dependencies": {
"buffer": "4.9.2",
@@ -3648,9 +3648,9 @@
}
},
"node_modules/detox": {
"version": "20.0.3",
"resolved": "https://registry.npmjs.org/detox/-/detox-20.0.3.tgz",
"integrity": "sha512-WSyA+Oxcw6meJYFW4wpH27BCgNTniBVJTwXsQN4ox+OhoztO38yxZULH3+16hlbXNxLm9kMZFj/higA0+zum5Q==",
"version": "20.1.0",
"resolved": "https://registry.npmjs.org/detox/-/detox-20.1.0.tgz",
"integrity": "sha512-9VUAAZRDBFcH+9SndbXY/2f0mBcQPDmsJPbanJ7QFHag0MHpaDgpurahDXC5lmbIxHSj9AFE42SGMyH2RANtJA==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@@ -7682,9 +7682,9 @@
}
},
"node_modules/moment-timezone": {
"version": "0.5.39",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.39.tgz",
"integrity": "sha512-hoB6suq4ISDj7BDgctiOy6zljBsdYT0++0ZzZm9rtxIvJhIbQ3nmbgSWe7dNFGurl6/7b1OUkHlmN9JWgXVz7w==",
"version": "0.5.40",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.40.tgz",
"integrity": "sha512-tWfmNkRYmBkPJz5mr9GVDn9vRlVZOTe6yqY92rFxiOdWXbjaR0+9LwQnZGGuNR63X456NqmEkbskte8tWL5ePg==",
"dev": true,
"dependencies": {
"moment": ">= 2.9.0"
@@ -9326,9 +9326,9 @@
}
},
"node_modules/typescript": {
"version": "4.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
"integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==",
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -11817,9 +11817,9 @@
"dev": true
},
"aws-sdk": {
"version": "2.1268.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1268.0.tgz",
"integrity": "sha512-N2A42YrSMTDFCY5lU3QOJz+CZbGKIrAQS3We9+HjEeDP+FPE+M2H9Zzy8Mk18uC6v8bP3lbTTCpTTvtje6i+Pw==",
"version": "2.1278.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1278.0.tgz",
"integrity": "sha512-keh0FXU6kP5j5vkWDgizZCSggmRfyRLUxmDKDVuiWb64H9FHIgoDBTMnYzKnQr6trHdBMopQdQ7RxnjYZ3BblA==",
"dev": true,
"requires": {
"buffer": "4.9.2",
@@ -12453,9 +12453,9 @@
"dev": true
},
"detox": {
"version": "20.0.3",
"resolved": "https://registry.npmjs.org/detox/-/detox-20.0.3.tgz",
"integrity": "sha512-WSyA+Oxcw6meJYFW4wpH27BCgNTniBVJTwXsQN4ox+OhoztO38yxZULH3+16hlbXNxLm9kMZFj/higA0+zum5Q==",
"version": "20.1.0",
"resolved": "https://registry.npmjs.org/detox/-/detox-20.1.0.tgz",
"integrity": "sha512-9VUAAZRDBFcH+9SndbXY/2f0mBcQPDmsJPbanJ7QFHag0MHpaDgpurahDXC5lmbIxHSj9AFE42SGMyH2RANtJA==",
"dev": true,
"requires": {
"ajv": "^8.6.3",
@@ -15464,9 +15464,9 @@
"dev": true
},
"moment-timezone": {
"version": "0.5.39",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.39.tgz",
"integrity": "sha512-hoB6suq4ISDj7BDgctiOy6zljBsdYT0++0ZzZm9rtxIvJhIbQ3nmbgSWe7dNFGurl6/7b1OUkHlmN9JWgXVz7w==",
"version": "0.5.40",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.40.tgz",
"integrity": "sha512-tWfmNkRYmBkPJz5mr9GVDn9vRlVZOTe6yqY92rFxiOdWXbjaR0+9LwQnZGGuNR63X456NqmEkbskte8tWL5ePg==",
"dev": true,
"requires": {
"moment": ">= 2.9.0"
@@ -16691,9 +16691,9 @@
}
},
"typescript": {
"version": "4.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
"integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==",
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"dev": true
},
"unbox-primitive": {

View File

@@ -12,14 +12,14 @@
"@types/jest": "29.2.4",
"@types/tough-cookie": "4.0.2",
"@types/uuid": "9.0.0",
"aws-sdk": "2.1268.0",
"aws-sdk": "2.1278.0",
"axios": "1.2.1",
"axios-cookiejar-support": "4.0.3",
"babel-jest": "29.3.1",
"babel-plugin-module-resolver": "4.1.0",
"client-oauth2": "4.3.3",
"deepmerge": "4.2.2",
"detox": "20.0.3",
"detox": "20.1.0",
"form-data": "4.0.0",
"jest": "29.3.1",
"jest-circus": "29.3.1",
@@ -28,14 +28,14 @@
"jest-junit": "15.0.0",
"jest-stare": "2.4.1",
"junit-report-merger": "4.0.0",
"moment-timezone": "0.5.39",
"moment-timezone": "0.5.40",
"recursive-readdir": "2.2.3",
"sanitize-filename": "1.6.3",
"shelljs": "0.8.5",
"tough-cookie": "4.1.2",
"ts-jest": "29.0.3",
"tslib": "2.4.1",
"typescript": "4.9.3",
"typescript": "4.9.4",
"uuid": "9.0.0",
"xml2js": "0.4.23"
},