Add a function to the time picker page object to set a commonly-used timespan option. (#37374)

This commit is contained in:
Justin Kambic 2019-05-30 07:33:56 -04:00 committed by GitHub
parent 0416dd8920
commit 109d10fcf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,6 +59,14 @@ export function TimePickerPageProvider({ getService, getPageObjects }) {
await PageObjects.header.awaitGlobalLoadingIndicatorHidden();
}
/**
* @param {String} commonlyUsedOption 'superDatePickerCommonlyUsed_This_week'
*/
async setCommonlyUsedTime(commonlyUsedOption) {
await testSubjects.click('superDatePickerToggleQuickMenuButton');
await testSubjects.click(commonlyUsedOption);
}
/**
* @param {String} fromTime YYYY-MM-DD HH:mm:ss.SSS
* @param {String} fromTime YYYY-MM-DD HH:mm:ss.SSS