From 3702547fd677b0b00b2e3c5ce4c43335c7d3dbce Mon Sep 17 00:00:00 2001 From: Lee Drengenberg Date: Mon, 28 Nov 2022 13:13:04 -0600 Subject: [PATCH 1/8] quick check of current URL to skip timepicker --- test/functional/page_objects/time_picker.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index 59513bf350040..78b49357b9fc7 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -124,8 +124,21 @@ export class TimePickerPageObject extends FtrService { * @param {String} fromTime MMM D, YYYY @ HH:mm:ss.SSS * @param {String} toTime MMM D, YYYY @ HH:mm:ss.SSS */ - public async setAbsoluteRange(fromTime: string, toTime: string) { - this.log.debug(`Setting absolute range to ${fromTime} to ${toTime}`); + public async setAbsoluteRange(fromTime: string, toTime: string) { + // get the current URL and check if it already contains the desired times, return + const currentUrl = await this.browser.getCurrentUrl(); + const DEFAULT_DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; + const startMoment = moment.utc(fromTime, DEFAULT_DATE_FORMAT).toISOString(); + const endMoment = moment.utc(toTime, DEFAULT_DATE_FORMAT).toISOString(); + if (currentUrl.includes(startMoment) && currentUrl.includes(endMoment)) { + this.log.debug( + `We already have the desired start (${fromTime}) and end (${toTime}) in the URL, returning from setAbsoluteRange` + ); + return; + } else { + this.log.debug(`Setting absolute range to ${fromTime} to ${toTime}`); + } + await this.showStartEndTimes(); let panel!: WebElementWrapper; From 3a058446aef137db54379c746dc90a5d1c3602d0 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 28 Nov 2022 19:21:40 +0000 Subject: [PATCH 2/8] [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' --- test/functional/page_objects/time_picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index 78b49357b9fc7..91ca71af7942c 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -124,7 +124,7 @@ export class TimePickerPageObject extends FtrService { * @param {String} fromTime MMM D, YYYY @ HH:mm:ss.SSS * @param {String} toTime MMM D, YYYY @ HH:mm:ss.SSS */ - public async setAbsoluteRange(fromTime: string, toTime: string) { + public async setAbsoluteRange(fromTime: string, toTime: string) { // get the current URL and check if it already contains the desired times, return const currentUrl = await this.browser.getCurrentUrl(); const DEFAULT_DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; From 84a0bf65d2db369821b602c17b0b067373111a40 Mon Sep 17 00:00:00 2001 From: Lee Drengenberg Date: Tue, 29 Nov 2022 11:27:01 -0600 Subject: [PATCH 3/8] changed setAbsoluteTime to a wrapper that checks URL --- .../replaced_vislib_chart_types/_area_chart.ts | 2 +- test/functional/page_objects/time_picker.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts index 3e765baf3ba64..4249335b8def6 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts @@ -487,7 +487,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { const fromTime = 'Sep 20, 2015 @ 00:00:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); + await PageObjects.timePicker.setAbsoluteRangeAlways(fromTime, toTime); }); it('should update collapsed accordion label when time range is changed', async () => { diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index 78b49357b9fc7..027f59e919c26 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -124,8 +124,9 @@ export class TimePickerPageObject extends FtrService { * @param {String} fromTime MMM D, YYYY @ HH:mm:ss.SSS * @param {String} toTime MMM D, YYYY @ HH:mm:ss.SSS */ - public async setAbsoluteRange(fromTime: string, toTime: string) { - // get the current URL and check if it already contains the desired times, return + public async setAbsoluteRange(fromTime: string, toTime: string) { + // setAbsoluteRange used to always set the timepicker. This version checks if the + // required times are already in the URL and, if so, returns to save testing time. const currentUrl = await this.browser.getCurrentUrl(); const DEFAULT_DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; const startMoment = moment.utc(fromTime, DEFAULT_DATE_FORMAT).toISOString(); @@ -137,8 +138,15 @@ export class TimePickerPageObject extends FtrService { return; } else { this.log.debug(`Setting absolute range to ${fromTime} to ${toTime}`); + return await this.setAbsoluteRangeAlways(fromTime, toTime); } + } + /** + * @param {String} fromTime MMM D, YYYY @ HH:mm:ss.SSS + * @param {String} toTime MMM D, YYYY @ HH:mm:ss.SSS + */ + public async setAbsoluteRangeAlways(fromTime: string, toTime: string) { await this.showStartEndTimes(); let panel!: WebElementWrapper; From bb010e58560faa78fc0f2b51ee2f9d6889c2c291 Mon Sep 17 00:00:00 2001 From: Lee Drengenberg Date: Wed, 30 Nov 2022 09:58:34 -0600 Subject: [PATCH 4/8] add force=false default param to setAbsoluteTime --- .../_area_chart.ts | 8 +- test/functional/page_objects/time_picker.ts | 137 +++++++++--------- 2 files changed, 70 insertions(+), 75 deletions(-) diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts index 4249335b8def6..62c999a808ace 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts @@ -487,7 +487,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { const fromTime = 'Sep 20, 2015 @ 00:00:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRangeAlways(fromTime, toTime); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); }); it('should update collapsed accordion label when time range is changed', async () => { @@ -498,7 +498,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(accordionLabelText).to.include.string('per 30 minutes'); const fromTime = 'Sep 20, 2015 @ 08:30:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); accordionLabelText = await accordionLabel.getVisibleText(); expect(accordionLabelText).to.include.string('per 10 minutes'); }); @@ -530,7 +530,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(helperScaledLabelText).to.include.string('to 10 minutes'); const fromTime = 'Sep 20, 2015 @ 22:30:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); helperScaledLabelText = await testSubjects.getVisibleText('currentlyScaledText'); expect(helperScaledLabelText).to.include.string('to 30 seconds'); }); @@ -546,7 +546,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(helperScaledLabelText).to.include.string('to 10 minutes'); const fromTime = 'Sep 20, 2015 @ 21:30:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); helperScaledLabelText = await testSubjects.getVisibleText('currentlyScaledText'); expect(helperScaledLabelText).to.include.string('to minute'); }); diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index 027f59e919c26..f7b0c2b421ecf 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -123,85 +123,80 @@ export class TimePickerPageObject extends FtrService { /** * @param {String} fromTime MMM D, YYYY @ HH:mm:ss.SSS * @param {String} toTime MMM D, YYYY @ HH:mm:ss.SSS + * @param {Boolean} force time picker force update, default is false */ - public async setAbsoluteRange(fromTime: string, toTime: string) { - // setAbsoluteRange used to always set the timepicker. This version checks if the - // required times are already in the URL and, if so, returns to save testing time. - const currentUrl = await this.browser.getCurrentUrl(); - const DEFAULT_DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; - const startMoment = moment.utc(fromTime, DEFAULT_DATE_FORMAT).toISOString(); - const endMoment = moment.utc(toTime, DEFAULT_DATE_FORMAT).toISOString(); - if (currentUrl.includes(startMoment) && currentUrl.includes(endMoment)) { - this.log.debug( - `We already have the desired start (${fromTime}) and end (${toTime}) in the URL, returning from setAbsoluteRange` - ); - return; + public async setAbsoluteRange(fromTime: string, toTime: string, force = false) { + if (!force) { + const currentUrl = await this.browser.getCurrentUrl(); + const DEFAULT_DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; + const startMoment = moment.utc(fromTime, DEFAULT_DATE_FORMAT).toISOString(); + const endMoment = moment.utc(toTime, DEFAULT_DATE_FORMAT).toISOString(); + if (currentUrl.includes(startMoment) && currentUrl.includes(endMoment)) { + this.log.debug( + `We already have the desired start (${fromTime}) and end (${toTime}) in the URL, returning from setAbsoluteRange` + ); + return; + } } else { this.log.debug(`Setting absolute range to ${fromTime} to ${toTime}`); - return await this.setAbsoluteRangeAlways(fromTime, toTime); - } - } + await this.showStartEndTimes(); + let panel!: WebElementWrapper; + + // set to time + await this.retry.waitFor(`endDate is set to ${toTime}`, async () => { + await this.testSubjects.click('superDatePickerendDatePopoverButton'); + panel = await this.getTimePickerPanel(); + await this.testSubjects.click('superDatePickerAbsoluteTab'); + await this.testSubjects.click('superDatePickerAbsoluteDateInput'); + await this.inputValue('superDatePickerAbsoluteDateInput', toTime); + await this.testSubjects.click('superDatePickerendDatePopoverButton'); // close popover because sometimes browser can't find start input + const actualToTime = await this.testSubjects.getVisibleText( + 'superDatePickerendDatePopoverButton' + ); + this.log.debug(`Validating 'endDate' - expected: '${toTime}, actual: ${actualToTime}'`); + return toTime === actualToTime; + }); - /** - * @param {String} fromTime MMM D, YYYY @ HH:mm:ss.SSS - * @param {String} toTime MMM D, YYYY @ HH:mm:ss.SSS - */ - public async setAbsoluteRangeAlways(fromTime: string, toTime: string) { - await this.showStartEndTimes(); - let panel!: WebElementWrapper; - - // set to time - await this.retry.waitFor(`endDate is set to ${toTime}`, async () => { - await this.testSubjects.click('superDatePickerendDatePopoverButton'); - panel = await this.getTimePickerPanel(); - await this.testSubjects.click('superDatePickerAbsoluteTab'); - await this.testSubjects.click('superDatePickerAbsoluteDateInput'); - await this.inputValue('superDatePickerAbsoluteDateInput', toTime); - await this.testSubjects.click('superDatePickerendDatePopoverButton'); // close popover because sometimes browser can't find start input - const actualToTime = await this.testSubjects.getVisibleText( - 'superDatePickerendDatePopoverButton' - ); - this.log.debug(`Validating 'endDate' - expected: '${toTime}, actual: ${actualToTime}'`); - return toTime === actualToTime; - }); + // set from time + await this.retry.waitFor(`startDate is set to ${fromTime}`, async () => { + await this.testSubjects.click('superDatePickerstartDatePopoverButton'); + await this.waitPanelIsGone(panel); + panel = await this.getTimePickerPanel(); + await this.testSubjects.click('superDatePickerAbsoluteTab'); + await this.testSubjects.click('superDatePickerAbsoluteDateInput'); + await this.inputValue('superDatePickerAbsoluteDateInput', fromTime); + await this.browser.pressKeys(this.browser.keys.ESCAPE); + const actualFromTime = await this.testSubjects.getVisibleText( + 'superDatePickerstartDatePopoverButton' + ); + this.log.debug( + `Validating 'startDate' - expected: '${fromTime}, actual: ${actualFromTime}'` + ); + return fromTime === actualFromTime; + }); - // set from time - await this.retry.waitFor(`startDate is set to ${fromTime}`, async () => { - await this.testSubjects.click('superDatePickerstartDatePopoverButton'); - await this.waitPanelIsGone(panel); - panel = await this.getTimePickerPanel(); - await this.testSubjects.click('superDatePickerAbsoluteTab'); - await this.testSubjects.click('superDatePickerAbsoluteDateInput'); - await this.inputValue('superDatePickerAbsoluteDateInput', fromTime); - await this.browser.pressKeys(this.browser.keys.ESCAPE); - const actualFromTime = await this.testSubjects.getVisibleText( - 'superDatePickerstartDatePopoverButton' - ); - this.log.debug(`Validating 'startDate' - expected: '${fromTime}, actual: ${actualFromTime}'`); - return fromTime === actualFromTime; - }); + await this.retry.waitFor('Timepicker popover to close', async () => { + await this.browser.pressKeys(this.browser.keys.ESCAPE); + return !(await this.testSubjects.exists('superDatePickerAbsoluteDateInput', { timeout: 50 })); + }); - await this.retry.waitFor('Timepicker popover to close', async () => { - await this.browser.pressKeys(this.browser.keys.ESCAPE); - return !(await this.testSubjects.exists('superDatePickerAbsoluteDateInput', { timeout: 50 })); - }); + const superDatePickerApplyButtonExists = await this.testSubjects.exists( + 'superDatePickerApplyTimeButton', + { timeout: 100 } + ); + if (superDatePickerApplyButtonExists) { + // Timepicker is in top nav + // Click super date picker apply button to apply time range + await this.testSubjects.click('superDatePickerApplyTimeButton'); + } else { + // Timepicker is embedded in query bar + // click query bar submit button to apply time range + await this.testSubjects.click('querySubmitButton'); + } - const superDatePickerApplyButtonExists = await this.testSubjects.exists( - 'superDatePickerApplyTimeButton', - { timeout: 100 } - ); - if (superDatePickerApplyButtonExists) { - // Timepicker is in top nav - // Click super date picker apply button to apply time range - await this.testSubjects.click('superDatePickerApplyTimeButton'); - } else { - // Timepicker is embedded in query bar - // click query bar submit button to apply time range - await this.testSubjects.click('querySubmitButton'); + await this.waitPanelIsGone(panel); + await this.header.awaitGlobalLoadingIndicatorHidden(); } - - await this.waitPanelIsGone(panel); - await this.header.awaitGlobalLoadingIndicatorHidden(); } public async isOff() { From 15a1d92cd937afd66afdc1032058c3c51eb60b3e Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 30 Nov 2022 16:33:23 +0000 Subject: [PATCH 5/8] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- test/functional/page_objects/time_picker.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index f7b0c2b421ecf..fba9d4a0b1a7f 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -177,7 +177,9 @@ export class TimePickerPageObject extends FtrService { await this.retry.waitFor('Timepicker popover to close', async () => { await this.browser.pressKeys(this.browser.keys.ESCAPE); - return !(await this.testSubjects.exists('superDatePickerAbsoluteDateInput', { timeout: 50 })); + return !(await this.testSubjects.exists('superDatePickerAbsoluteDateInput', { + timeout: 50, + })); }); const superDatePickerApplyButtonExists = await this.testSubjects.exists( From d535634fbbc9c1cb63a0978ffb30604d9dfb6bfc Mon Sep 17 00:00:00 2001 From: Lee Drengenberg Date: Wed, 30 Nov 2022 12:18:13 -0600 Subject: [PATCH 6/8] fix conditional branch, decoodeURL --- test/functional/page_objects/time_picker.ts | 115 ++++++++++---------- 1 file changed, 57 insertions(+), 58 deletions(-) diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index f7b0c2b421ecf..1ce62531f424f 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -127,76 +127,75 @@ export class TimePickerPageObject extends FtrService { */ public async setAbsoluteRange(fromTime: string, toTime: string, force = false) { if (!force) { - const currentUrl = await this.browser.getCurrentUrl(); + const currentUrl = decodeURI(await this.browser.getCurrentUrl()); const DEFAULT_DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; const startMoment = moment.utc(fromTime, DEFAULT_DATE_FORMAT).toISOString(); const endMoment = moment.utc(toTime, DEFAULT_DATE_FORMAT).toISOString(); - if (currentUrl.includes(startMoment) && currentUrl.includes(endMoment)) { + if (currentUrl.includes(`time:(from:'${startMoment}',to:'${endMoment}'`)) { this.log.debug( `We already have the desired start (${fromTime}) and end (${toTime}) in the URL, returning from setAbsoluteRange` ); return; } - } else { - this.log.debug(`Setting absolute range to ${fromTime} to ${toTime}`); - await this.showStartEndTimes(); - let panel!: WebElementWrapper; - - // set to time - await this.retry.waitFor(`endDate is set to ${toTime}`, async () => { - await this.testSubjects.click('superDatePickerendDatePopoverButton'); - panel = await this.getTimePickerPanel(); - await this.testSubjects.click('superDatePickerAbsoluteTab'); - await this.testSubjects.click('superDatePickerAbsoluteDateInput'); - await this.inputValue('superDatePickerAbsoluteDateInput', toTime); - await this.testSubjects.click('superDatePickerendDatePopoverButton'); // close popover because sometimes browser can't find start input - const actualToTime = await this.testSubjects.getVisibleText( - 'superDatePickerendDatePopoverButton' - ); - this.log.debug(`Validating 'endDate' - expected: '${toTime}, actual: ${actualToTime}'`); - return toTime === actualToTime; - }); - - // set from time - await this.retry.waitFor(`startDate is set to ${fromTime}`, async () => { - await this.testSubjects.click('superDatePickerstartDatePopoverButton'); - await this.waitPanelIsGone(panel); - panel = await this.getTimePickerPanel(); - await this.testSubjects.click('superDatePickerAbsoluteTab'); - await this.testSubjects.click('superDatePickerAbsoluteDateInput'); - await this.inputValue('superDatePickerAbsoluteDateInput', fromTime); - await this.browser.pressKeys(this.browser.keys.ESCAPE); - const actualFromTime = await this.testSubjects.getVisibleText( - 'superDatePickerstartDatePopoverButton' - ); - this.log.debug( - `Validating 'startDate' - expected: '${fromTime}, actual: ${actualFromTime}'` - ); - return fromTime === actualFromTime; - }); - - await this.retry.waitFor('Timepicker popover to close', async () => { - await this.browser.pressKeys(this.browser.keys.ESCAPE); - return !(await this.testSubjects.exists('superDatePickerAbsoluteDateInput', { timeout: 50 })); - }); - - const superDatePickerApplyButtonExists = await this.testSubjects.exists( - 'superDatePickerApplyTimeButton', - { timeout: 100 } + } + this.log.debug(`Setting absolute range to ${fromTime} to ${toTime}`); + await this.showStartEndTimes(); + let panel!: WebElementWrapper; + + // set to time + await this.retry.waitFor(`endDate is set to ${toTime}`, async () => { + await this.testSubjects.click('superDatePickerendDatePopoverButton'); + panel = await this.getTimePickerPanel(); + await this.testSubjects.click('superDatePickerAbsoluteTab'); + await this.testSubjects.click('superDatePickerAbsoluteDateInput'); + await this.inputValue('superDatePickerAbsoluteDateInput', toTime); + await this.testSubjects.click('superDatePickerendDatePopoverButton'); // close popover because sometimes browser can't find start input + const actualToTime = await this.testSubjects.getVisibleText( + 'superDatePickerendDatePopoverButton' ); - if (superDatePickerApplyButtonExists) { - // Timepicker is in top nav - // Click super date picker apply button to apply time range - await this.testSubjects.click('superDatePickerApplyTimeButton'); - } else { - // Timepicker is embedded in query bar - // click query bar submit button to apply time range - await this.testSubjects.click('querySubmitButton'); - } + this.log.debug(`Validating 'endDate' - expected: '${toTime}, actual: ${actualToTime}'`); + return toTime === actualToTime; + }); + // set from time + await this.retry.waitFor(`startDate is set to ${fromTime}`, async () => { + await this.testSubjects.click('superDatePickerstartDatePopoverButton'); await this.waitPanelIsGone(panel); - await this.header.awaitGlobalLoadingIndicatorHidden(); + panel = await this.getTimePickerPanel(); + await this.testSubjects.click('superDatePickerAbsoluteTab'); + await this.testSubjects.click('superDatePickerAbsoluteDateInput'); + await this.inputValue('superDatePickerAbsoluteDateInput', fromTime); + await this.browser.pressKeys(this.browser.keys.ESCAPE); + const actualFromTime = await this.testSubjects.getVisibleText( + 'superDatePickerstartDatePopoverButton' + ); + this.log.debug( + `Validating 'startDate' - expected: '${fromTime}, actual: ${actualFromTime}'` + ); + return fromTime === actualFromTime; + }); + + await this.retry.waitFor('Timepicker popover to close', async () => { + await this.browser.pressKeys(this.browser.keys.ESCAPE); + return !(await this.testSubjects.exists('superDatePickerAbsoluteDateInput', { timeout: 50 })); + }); + + const superDatePickerApplyButtonExists = await this.testSubjects.exists( + 'superDatePickerApplyTimeButton', + { timeout: 100 } + ); + if (superDatePickerApplyButtonExists) { + // Timepicker is in top nav + // Click super date picker apply button to apply time range + await this.testSubjects.click('superDatePickerApplyTimeButton'); + } else { + // Timepicker is embedded in query bar + // click query bar submit button to apply time range + await this.testSubjects.click('querySubmitButton'); } + + await this.waitPanelIsGone(panel); + await this.header.awaitGlobalLoadingIndicatorHidden(); } public async isOff() { From 37c2990834f3b7348b96519a948a9dc8989de39c Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 30 Nov 2022 18:53:31 +0000 Subject: [PATCH 7/8] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- test/functional/page_objects/time_picker.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index 1ce62531f424f..366f281277c5e 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -169,9 +169,7 @@ export class TimePickerPageObject extends FtrService { const actualFromTime = await this.testSubjects.getVisibleText( 'superDatePickerstartDatePopoverButton' ); - this.log.debug( - `Validating 'startDate' - expected: '${fromTime}, actual: ${actualFromTime}'` - ); + this.log.debug(`Validating 'startDate' - expected: '${fromTime}, actual: ${actualFromTime}'`); return fromTime === actualFromTime; }); From a681d41d4a95ee28317144fb52513668156ce8bd Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Sun, 4 Dec 2022 14:13:15 +0100 Subject: [PATCH 8/8] revert changes in area chart tests --- .../visualize/replaced_vislib_chart_types/_area_chart.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts index 62c999a808ace..3e765baf3ba64 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts @@ -487,7 +487,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(async () => { const fromTime = 'Sep 20, 2015 @ 00:00:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); }); it('should update collapsed accordion label when time range is changed', async () => { @@ -498,7 +498,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(accordionLabelText).to.include.string('per 30 minutes'); const fromTime = 'Sep 20, 2015 @ 08:30:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); accordionLabelText = await accordionLabel.getVisibleText(); expect(accordionLabelText).to.include.string('per 10 minutes'); }); @@ -530,7 +530,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(helperScaledLabelText).to.include.string('to 10 minutes'); const fromTime = 'Sep 20, 2015 @ 22:30:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); helperScaledLabelText = await testSubjects.getVisibleText('currentlyScaledText'); expect(helperScaledLabelText).to.include.string('to 30 seconds'); }); @@ -546,7 +546,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(helperScaledLabelText).to.include.string('to 10 minutes'); const fromTime = 'Sep 20, 2015 @ 21:30:00.000'; const toTime = 'Sep 20, 2015 @ 23:30:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime, true); + await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); helperScaledLabelText = await testSubjects.getVisibleText('currentlyScaledText'); expect(helperScaledLabelText).to.include.string('to minute'); });