Detox/E2E: Verification fixes and added a step to post message on direct messages (#6664)

* Detox/E2E: Minor fixes and added known issue tag

* Add step to post message on direct message
This commit is contained in:
Joseph Baylon
2022-10-14 10:25:38 -07:00
committed by GitHub
parent f000014809
commit 084d342e1d
4 changed files with 14 additions and 6 deletions

View File

@@ -252,8 +252,7 @@ describe('Autocomplete - Channel Mention', () => {
await ChannelScreen.postInput.typeText(testChannel.name);
// * Verify channel mention autocomplete contains current channel
const {channelMentionItemChannelDisplayName, channelMentionItemChannelName} = Autocomplete.getChannelMentionItem(testChannel.name);
await expect(channelMentionItemChannelDisplayName).toHaveText(`${testChannel.display_name}`);
await expect(channelMentionItemChannelName).toHaveText(` ~${testChannel.name}`);
const {channelMentionItemChannelDisplayName} = Autocomplete.getChannelMentionItem(testChannel.name);
await expect(channelMentionItemChannelDisplayName).toHaveText(`${testChannel.display_name} ~${testChannel.name}`);
});
});

View File

@@ -21,6 +21,7 @@ import {
LoginScreen,
ServerScreen,
} from '@support/ui/screen';
import {timeouts} from '@support/utils';
import {expect} from 'detox';
describe('Autocomplete - Edit Channel Header', () => {
@@ -62,6 +63,7 @@ describe('Autocomplete - Edit Channel Header', () => {
await CreateOrEditChannelScreen.headerInput.typeText('@');
// * Verify at-mention list is displayed
await waitFor(Autocomplete.sectionAtMentionList).toExist().withTimeout(timeouts.ONE_SEC);
await expect(Autocomplete.sectionAtMentionList).toBeVisible();
});

View File

@@ -98,7 +98,8 @@ describe('Channels - Create Direct Message', () => {
await expect(ChannelScreen.headerTitle).toHaveText(newUserDisplayName);
await expect(ChannelScreen.introDisplayName).toHaveText(newUserDisplayName);
// # Go back to channel list screen
// # Post a message and go back to channel list screen
await ChannelScreen.postMessage('test');
await ChannelScreen.back();
await device.reloadReactNative();
await ChannelListScreen.toBeVisible();
@@ -144,7 +145,8 @@ describe('Channels - Create Direct Message', () => {
await expect(ChannelScreen.headerTitle).toHaveText(groupDisplayName);
await expect(ChannelScreen.introDisplayName).toHaveText(groupDisplayName);
// # Go back to channel list screen
// # Post a message and go back to channel list screen
await ChannelScreen.postMessage('test');
await ChannelScreen.back();
await device.reloadReactNative();
await ChannelListScreen.toBeVisible();

View File

@@ -9,6 +9,7 @@
import {
Channel,
Post,
Setup,
Team,
User,
@@ -112,10 +113,14 @@ describe('Channels - Favorite and Unfavorite Channel', () => {
});
it('MM-T4929_3 - should be able to favorite/unfavorite a direct message channel from channel intro', async () => {
// # Open a direct message channel screen, tap on intro favorite action to favorite the channel, and go back to channel list screen
// # Open a direct message channel screen, post a message, tap on intro favorite action to favorite the channel, and go back to channel list screen
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 device.reloadReactNative();
await ChannelScreen.open(directMessagesCategory, directMessageChannel.name);
await ChannelScreen.introFavoriteAction.tap();