add e2e for MM-T3179 (#4807)

This commit is contained in:
Saturnino Abril 2020-09-14 21:46:36 +08:00 committed by GitHub
parent b6920770f1
commit 29fb83ccfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,41 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Setup} from '@support/server_api';
import {serverUrl} from '@support/test_config';
describe('Smoke Tests', () => {
it('MM-T3179 Log in - Email / password', async () => {
const {user} = await Setup.apiInit();
// * Verify that it starts with the Select Server screen
await expect(element(by.id('select_server_screen'))).toBeVisible();
// # Type in the server URL
await element(by.id('server_url_input')).replaceText(serverUrl);
// # Tap connect button
await element(by.text('Connect')).tap();
// # Verify that it goes into Login screen
await expect(element(by.id('login_screen'))).toBeVisible();
// # Type in username
await element(by.id('username_input')).replaceText(user.username);
// # Tap anywhere to hide keyboard
await element(by.text('Mattermost')).tap();
// # Type in password
await element(by.id('password_input')).replaceText(user.password);
// # Tap anywhere to hide keyboard
await element(by.text('Mattermost')).tap();
// # Tap "Sign in" button
await element(by.text('Sign in')).tap();
// * Verify that the user has successfully logged in by checking it redirects into the Channel screen
await expect(element(by.id('channel_screen'))).toBeVisible();
});
});