* update dependencies * eslint fixes * Upgrade to RN 67 * update other deps * Update to RN 0.67.2 * fix Android build (mmkv) * Fix crash when root message is deleted from the thread screen * Fix gif emoji playing at high speed on iOS ProMotion capable devices
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
class DateTimePicker {
|
|
testID = {
|
|
dateTimePicker: 'clear_after.date_time_picker',
|
|
};
|
|
|
|
changeTimeAndroid = async (hour, minute) => {
|
|
const keyboardIconButton = element(
|
|
by.type('androidx.appcompat.widget.AppCompatImageButton'),
|
|
);
|
|
|
|
await keyboardIconButton.tap();
|
|
|
|
const hourTextinput = element(
|
|
by.type('androidx.appcompat.widget.AppCompatEditText'),
|
|
).atIndex(0);
|
|
|
|
const minuteTextinput = element(
|
|
by.type('androidx.appcompat.widget.AppCompatEditText'),
|
|
).atIndex(1);
|
|
|
|
await hourTextinput.replaceText(hour);
|
|
await minuteTextinput.replaceText(minute);
|
|
};
|
|
|
|
tapCancelButtonAndroid = async () => {
|
|
await element(by.text('Cancel')).tap();
|
|
};
|
|
|
|
tapOkButtonAndroid = async () => {
|
|
await element(by.text('OK')).tap();
|
|
};
|
|
|
|
getDateTimePickerIOS = () => element(by.type('UIPickerView').withAncestor(by.id(this.testID.dateTimePicker)));
|
|
}
|
|
|
|
const dateTimePicker = new DateTimePicker();
|
|
export default dateTimePicker;
|