[TSVB] Fix functional tests flakiness and unskip them (#85388) (#85919)

* [TSVB] Fix functional tests flakiness and unskip them

* Fix functional test failure

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Stratoula Kalafateli 2020-12-15 13:35:09 +02:00 committed by GitHub
parent d0c88d5b23
commit d1eb749ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -35,8 +35,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'common',
]);
// Failing: See https://github.com/elastic/kibana/issues/75127
describe.skip('visual builder', function describeIndexTests() {
describe('visual builder', function describeIndexTests() {
this.tags('includeFirefox');
beforeEach(async () => {
await security.testUser.setRoles([
@ -144,7 +143,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.visualBuilder.selectIndexPatternTimeField('timestamp');
});
const newValue = await PageObjects.visualBuilder.getMetricValue();
expect(newValue).to.eql('10');
expect(newValue).to.eql('18');
});
});
@ -174,9 +173,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await browser.goBack();
log.debug('Check timeseries chart and panel config is rendered');
await PageObjects.visualBuilder.checkTimeSeriesChartIsPresent();
await PageObjects.visualBuilder.checkTabIsSelected('timeseries');
await PageObjects.visualBuilder.checkPanelConfigIsPresent('timeseries');
await retry.try(async () => {
await PageObjects.visualBuilder.checkTimeSeriesChartIsPresent();
await PageObjects.visualBuilder.checkTabIsSelected('timeseries');
await PageObjects.visualBuilder.checkPanelConfigIsPresent('timeseries');
});
log.debug('Go forward in browser history');
await browser.goForward();

View file

@ -275,8 +275,10 @@ export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderCont
public async openOptionsList(comboBoxElement: WebElementWrapper): Promise<void> {
const isOptionsListOpen = await testSubjects.exists('~comboBoxOptionsList');
if (!isOptionsListOpen) {
const toggleBtn = await comboBoxElement.findByTestSubject('comboBoxToggleListButton');
await toggleBtn.click();
await retry.try(async () => {
const toggleBtn = await comboBoxElement.findByTestSubject('comboBoxInput');
await toggleBtn.click();
});
}
}