Skip to content

Commit

Permalink
[data views] Data views / runtime field creation flaky test fix (elas…
Browse files Browse the repository at this point in the history
…tic#177315)

## Summary

Fix runtime field creation flaky test. Just a pair of minor test
improvements.

Passed a 200x run through the flaky test runner.

Closes: elastic#173558 and
elastic#178733
  • Loading branch information
mattkime authored Mar 18, 2024
1 parent 059e4a5 commit e0adf1d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,9 @@ export class SettingsPageObject extends FtrService {
async clickAddField() {
this.log.debug('click Add Field');
await this.testSubjects.click('addField');
await this.retry.try(async () => {
await this.testSubjects.existOrFail('flyoutTitle');
});
}

async clickSaveField() {
Expand All @@ -872,8 +875,7 @@ export class SettingsPageObject extends FtrService {

async setFieldType(type: string) {
this.log.debug('set type = ' + type);
await this.testSubjects.setValue('typeField', type);
await this.browser.pressKeys(this.browser.keys.ENTER);
await this.comboBox.set('typeField', type);
}

async setFieldTypeComposite() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['settings', 'common']);
const testSubjects = getService('testSubjects');

// Failing: See https://github.com/elastic/kibana/issues/173558
describe.skip('runtime fields', function () {
describe('runtime fields', function () {
before(async function () {
await browser.setWindowSize(1200, 800);
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
Expand Down Expand Up @@ -64,6 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.existOrFail('flyoutTitle');
});
await PageObjects.settings.setFieldType('Long');
await new Promise((r) => setTimeout(r, 500));
await PageObjects.settings.setFieldScriptWithoutToggle('emit(6);');
await PageObjects.settings.toggleRow('formatRow');
await PageObjects.settings.setFieldFormat('bytes');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');

describe('runtime fields', function () {
// https://github.com/elastic/kibana/issues/178733
this.tags('failsOnMKI');
before(async function () {
await browser.setWindowSize(1200, 800);
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
Expand Down

0 comments on commit e0adf1d

Please sign in to comment.