* Detox/E2E: Migrate to typescript * Add jest.config.js * Add moduleMapper to config.json * Add cookie jar to axios client, fix tsconfig.json and default_config.json * Take keyboard into consideration; clean test for now for this migration PR * Revert changes on path_builder * Attempt to fix dep issues * Update detox dep * Added missing @type dev dependencies * Fix dep order * Fix unit tests * Added dynamic year to email.ts
20 lines
704 B
TypeScript
20 lines
704 B
TypeScript
// 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: string) => {
|
|
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;
|