* MM-28105 do not crash when in-app notification shows * Use index.tsx to register the notification screen * Fix notification e2e and some import cleanup * Update iOS notification json * e2e: Show the add reaction screen before receiving a notification * Update snapshots * Patch react-native-notifications to prevent iOS crash when opening * Apply TM4J id Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
53 lines
2.1 KiB
JavaScript
53 lines
2.1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// *******************************************************************
|
|
// - [#] indicates a test step (e.g. # Go to a screen)
|
|
// - [*] indicates an assertion (e.g. * Check the title)
|
|
// - Use element testID when selecting an element. Create one if none.
|
|
// *******************************************************************
|
|
|
|
import {logoutUser, toChannelScreen} from '@support/ui/screen';
|
|
import {timeouts, wait} from '@support/utils';
|
|
import {Setup} from '@support/server_api';
|
|
|
|
describe('Channel Info Header', () => {
|
|
beforeAll(async () => {
|
|
const {user} = await Setup.apiInit();
|
|
await toChannelScreen(user);
|
|
});
|
|
|
|
afterAll(async () => {
|
|
await logoutUser();
|
|
});
|
|
|
|
it('MM-T3406 should render correct GM member count in channel info header', async () => {
|
|
// # Open drawer
|
|
await element(by.id('channel_drawer.button')).tap();
|
|
await expect(element(by.text('DIRECT MESSAGES'))).toBeVisible();
|
|
|
|
// # Open Direct Channels screen
|
|
await element(by.id('action_button_sidebar.direct')).tap();
|
|
await expect(element(by.id('direct_channels_screen'))).toBeVisible();
|
|
|
|
// # Wait for some profiles to load
|
|
await wait(timeouts.ONE_SEC);
|
|
|
|
// # Select 3 profiles
|
|
await element(by.id('more_dms.user').withAncestor(by.id('more_dms.list'))).atIndex(0).tap();
|
|
await element(by.id('more_dms.user').withAncestor(by.id('more_dms.list'))).atIndex(1).tap();
|
|
await element(by.id('more_dms.user').withAncestor(by.id('more_dms.list'))).atIndex(2).tap();
|
|
|
|
// # Create a GM with selected profiles
|
|
await element(by.id('start-conversation')).tap();
|
|
|
|
// # Open channel info modal
|
|
await element(by.id('channel.title.button')).tap();
|
|
|
|
// * Verify GM member count is 3
|
|
await expect(element(by.id('channel_icon.gm_member_count')).atIndex(0)).toHaveText('3');
|
|
|
|
// # Close channel info screen
|
|
await element(by.id('screen.channel_info.close')).tap();
|
|
});
|
|
});
|