mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Event annotation] stabilize library editing tests (#170784)
## Summary Fix https://github.com/elastic/kibana/issues/170568 Flaky test runner (x200): https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3949 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
6bb46fd8cb
commit
99aa3f81e1
2 changed files with 11 additions and 3 deletions
|
@ -121,8 +121,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await listingTable.expectItemsCount('eventAnnotation', 1);
|
||||
});
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/170568
|
||||
describe.skip('individual annotations', () => {
|
||||
describe('individual annotations', () => {
|
||||
it('edits an existing annotation', async function () {
|
||||
await listingTable.clickItemLink('eventAnnotation', 'edited title');
|
||||
expect(await PageObjects.annotationEditor.getAnnotationCount()).to.be(1);
|
||||
|
|
|
@ -10,6 +10,7 @@ import { FtrService } from '../ftr_provider_context';
|
|||
|
||||
export class AnnotationEditorPageObject extends FtrService {
|
||||
private readonly testSubjects = this.ctx.getService('testSubjects');
|
||||
private readonly find = this.ctx.getService('find');
|
||||
private readonly retry = this.ctx.getService('retry');
|
||||
|
||||
/**
|
||||
|
@ -56,12 +57,20 @@ export class AnnotationEditorPageObject extends FtrService {
|
|||
const queryInput = await this.testSubjects.find('annotation-query-based-query-input');
|
||||
await queryInput.type(config.query);
|
||||
|
||||
await this.testSubjects.setValue('lnsXYThickness', '' + config.lineThickness);
|
||||
const titles = await this.find.allByCssSelector(
|
||||
'.euiFlyout h3.lnsDimensionEditorSection__heading'
|
||||
);
|
||||
const lastTitle = titles[titles.length - 1];
|
||||
await lastTitle.click(); // close query input pop-up
|
||||
await lastTitle.focus(); // scroll down to the bottom of the section
|
||||
|
||||
await this.testSubjects.setValue(
|
||||
'euiColorPickerAnchor indexPattern-dimension-colorPicker',
|
||||
config.color
|
||||
);
|
||||
await lastTitle.click(); // close color picker pop-up
|
||||
|
||||
await this.testSubjects.setValue('lnsXYThickness', '' + config.lineThickness);
|
||||
|
||||
await this.retry.waitFor('annotation editor UI to close', async () => {
|
||||
await this.testSubjects.click('backToGroupSettings');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue