[Grok Debugger] Changed test to wait for grok debugger container to exist to fix test flakiness (#90543)
* Changed the retry to a wait for condition which will keep trying for 20 seconds to see the container. Also changed the data test subject as there was another grokDebugger test subject just in case there was a clash. * Added .only to be able to run the test repeatedly because group 13 is not in the flaky test runner. * Added to group 11 because 13 is not in flaky test runner. Will revert after passing. * Reverted change back to group 13 and removed the comment for the flaky test being skipped. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
451d0819bc
commit
a62a229d6f
|
@ -129,7 +129,7 @@ export class GrokDebuggerComponent extends React.Component {
|
||||||
<EuiPageBody>
|
<EuiPageBody>
|
||||||
<EuiPageContent>
|
<EuiPageContent>
|
||||||
<EuiPageContentBody>
|
<EuiPageContentBody>
|
||||||
<EuiForm className="grokdebugger-container" data-test-subj="grokDebugger">
|
<EuiForm className="grokdebugger-container" data-test-subj="grokDebuggerContainer">
|
||||||
<EventInput value={this.state.rawEvent} onChange={this.onRawEventChange} />
|
<EventInput value={this.state.rawEvent} onChange={this.onRawEventChange} />
|
||||||
<PatternInput value={this.state.pattern} onChange={this.onPatternChange} />
|
<PatternInput value={this.state.pattern} onChange={this.onPatternChange} />
|
||||||
<EuiSpacer />
|
<EuiSpacer />
|
||||||
|
|
|
@ -12,8 +12,7 @@ export default function ({ getService, getPageObjects }) {
|
||||||
|
|
||||||
const PageObjects = getPageObjects(['grokDebugger']);
|
const PageObjects = getPageObjects(['grokDebugger']);
|
||||||
|
|
||||||
// FLAKY: https://github.com/elastic/kibana/issues/84440
|
describe('grok debugger app', function () {
|
||||||
describe.skip('grok debugger app', function () {
|
|
||||||
this.tags('includeFirefox');
|
this.tags('includeFirefox');
|
||||||
before(async () => {
|
before(async () => {
|
||||||
await esArchiver.load('empty_kibana');
|
await esArchiver.load('empty_kibana');
|
||||||
|
|
|
@ -13,7 +13,7 @@ export function GrokDebuggerProvider({ getService }) {
|
||||||
const retry = getService('retry');
|
const retry = getService('retry');
|
||||||
|
|
||||||
// test subject selectors
|
// test subject selectors
|
||||||
const SUBJ_CONTAINER = 'grokDebugger';
|
const SUBJ_CONTAINER = 'grokDebuggerContainer';
|
||||||
|
|
||||||
const SUBJ_UI_ACE_EVENT_INPUT = `${SUBJ_CONTAINER} > aceEventInput > codeEditorContainer`;
|
const SUBJ_UI_ACE_EVENT_INPUT = `${SUBJ_CONTAINER} > aceEventInput > codeEditorContainer`;
|
||||||
const SUBJ_UI_ACE_PATTERN_INPUT = `${SUBJ_CONTAINER} > acePatternInput > codeEditorContainer`;
|
const SUBJ_UI_ACE_PATTERN_INPUT = `${SUBJ_CONTAINER} > acePatternInput > codeEditorContainer`;
|
||||||
|
@ -49,10 +49,8 @@ export function GrokDebuggerProvider({ getService }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async assertExists() {
|
async assertExists() {
|
||||||
await retry.try(async () => {
|
await retry.waitFor('Grok Debugger to exist', async () => {
|
||||||
if (!(await testSubjects.exists(SUBJ_CONTAINER))) {
|
return await testSubjects.exists(SUBJ_CONTAINER);
|
||||||
throw new Error('Expected to find the grok debugger');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue