mattermost-mobile/detox/e2e/support/ui/component/alert.js
Joseph Baylon 35fe4081f7
MM-41855 Detox/E2E: Initial e2e tests in Gekidou (#6029)
* Detox/E2E: Initial e2e tests in Gekidou

* Change Local Server to Server 1

* Renamed variables for consistency

* Added team display name verification on channel list screen

* Simplified login by email setup

* Simplified smoke test server login steps
2022-03-12 16:44:04 -03:00

20 lines
696 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {isAndroid} from '@support/utils';
class Alert {
// alert titles
logoutTitle = (serverDisplayName) => {
const title = `Are you sure you want to log out of ${serverDisplayName}?`;
return isAndroid() ? element(by.text(title)) : element(by.label(title)).atIndex(0);
};
// alert buttons
cancelButton = isAndroid() ? element(by.text('CANCEL')) : element(by.label('Cancel')).atIndex(1);
logoutButton = isAndroid() ? element(by.text('LOG OUT')) : element(by.label('Log out')).atIndex(1);
}
const alert = new Alert();
export default alert;