* initial Detox setup for mobile UI automation * fix iOS allow permission on opening the app, add npm script to root folder, fix test when using longer site URL and add detox dependency to root for android build dependency * remove detox proguardFile * update packages and emulator * change folder build on local and CI * add test to post a message, ability to have test in isolation, server API commands, server config, dependency updates and update folder structure * update snapshot * update detox and do clean up * update dependencies
29 lines
976 B
JavaScript
29 lines
976 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {toChannelScreen} from '@support/ui/screen';
|
|
|
|
import {Setup} from '@support/server_api';
|
|
|
|
describe('Messaging', () => {
|
|
beforeAll(async () => {
|
|
const {user} = await Setup.apiInit();
|
|
|
|
await toChannelScreen(user);
|
|
});
|
|
|
|
it('should post a message on tap to paper send button', async () => {
|
|
await expect(element(by.id('channel_screen'))).toBeVisible();
|
|
await expect(element(by.id('post_input'))).toExist();
|
|
await expect(element(by.id('send_button'))).not.toExist();
|
|
await element(by.id('post_input')).tap();
|
|
|
|
const text = Date.now().toString();
|
|
await element(by.id('post_input')).typeText(text);
|
|
|
|
await expect(element(by.id('send_button'))).toBeVisible();
|
|
await element(by.id('send_button')).tap();
|
|
|
|
await expect(element(by.text(text))).toExist();
|
|
});
|
|
});
|