mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Event annotations] expand and stabilize listing page tests (#168139)
## Summary Fix #167434 (reenables embeddable test) Fix https://github.com/elastic/kibana/issues/168281 Flaky test runner (100 times): https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3417 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
a0c7d60f8c
commit
3131bc2281
2 changed files with 94 additions and 2 deletions
|
@ -13,6 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const PageObjects = getPageObjects(['visualize', 'annotationEditor']);
|
||||
const listingTable = getService('listingTable');
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const find = getService('find');
|
||||
const retry = getService('retry');
|
||||
const log = getService('log');
|
||||
|
@ -32,6 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
await PageObjects.visualize.gotoVisualizationLandingPage();
|
||||
await PageObjects.visualize.selectAnnotationsTab();
|
||||
await listingTable.waitUntilTableIsLoaded();
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
|
@ -156,7 +158,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
});
|
||||
|
||||
describe.skip('data view switching', () => {
|
||||
describe('data view switching', () => {
|
||||
it('recovers from missing data view', async () => {
|
||||
await listingTable.clickItemLink('eventAnnotation', 'missing data view');
|
||||
|
||||
|
@ -175,7 +177,36 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.annotationEditor.saveGroup();
|
||||
});
|
||||
|
||||
it('recovers from missing field in data view', () => {});
|
||||
it('recovers from missing field in data view', async () => {
|
||||
const assertShowingMissingFieldError = async (yes: boolean) => {
|
||||
const [failureExists, canvasExists] = await Promise.all([
|
||||
testSubjects.exists('embeddable-lens-failure'),
|
||||
find.existsByCssSelector('canvas', 1000),
|
||||
]);
|
||||
expect(failureExists).to.be(yes);
|
||||
expect(canvasExists).to.be(!yes);
|
||||
};
|
||||
|
||||
await listingTable.clickItemLink('eventAnnotation', 'Group with additional fields');
|
||||
|
||||
await assertShowingMissingFieldError(false);
|
||||
|
||||
await retry.try(async () => {
|
||||
await PageObjects.annotationEditor.editGroupMetadata({
|
||||
dataView: 'Data view without fields',
|
||||
});
|
||||
|
||||
await assertShowingMissingFieldError(true);
|
||||
});
|
||||
|
||||
await retry.try(async () => {
|
||||
await PageObjects.annotationEditor.editGroupMetadata({
|
||||
dataView: 'logs*',
|
||||
});
|
||||
|
||||
await assertShowingMissingFieldError(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,6 +21,29 @@
|
|||
"version": "WzIyNywxXQ=="
|
||||
}
|
||||
|
||||
{
|
||||
"attributes": {
|
||||
"fieldAttrs": "{}",
|
||||
"fieldFormatMap": "{}",
|
||||
"fields": "[]",
|
||||
"name": "Data view without fields",
|
||||
"runtimeFieldMap": "{}",
|
||||
"sourceFilters": "[]",
|
||||
"timeFieldName": "timestamp",
|
||||
"title": "kibana_sample_data_logs",
|
||||
"typeMeta": "{}"
|
||||
},
|
||||
"coreMigrationVersion": "8.8.0",
|
||||
"created_at": "2023-09-07T17:23:20.906Z",
|
||||
"id": "data-view-without-fields",
|
||||
"managed": false,
|
||||
"references": [],
|
||||
"type": "index-pattern",
|
||||
"typeMigrationVersion": "8.0.0",
|
||||
"updated_at": "2023-09-11T15:50:59.227Z",
|
||||
"version": "WzIyNywxXQ=="
|
||||
}
|
||||
|
||||
{
|
||||
"attributes": {
|
||||
"fieldAttrs": "{}",
|
||||
|
@ -44,6 +67,44 @@
|
|||
"version": "WzIyNywxXQ=="
|
||||
}
|
||||
|
||||
{
|
||||
"attributes": {
|
||||
"annotations": [
|
||||
{
|
||||
"extraFields": [
|
||||
"@message.raw"
|
||||
],
|
||||
"icon": "triangle",
|
||||
"id": "3d28ce7e-fc5e-409b-aea3-4d9e15010843",
|
||||
"key": {
|
||||
"type": "point_in_time"
|
||||
},
|
||||
"label": "Event",
|
||||
"timeField": "@timestamp",
|
||||
"type": "query"
|
||||
}
|
||||
],
|
||||
"dataViewSpec": null,
|
||||
"description": "",
|
||||
"ignoreGlobalFilters": true,
|
||||
"title": "Group with additional fields"
|
||||
},
|
||||
"coreMigrationVersion": "8.8.0",
|
||||
"created_at": "2023-10-06T17:15:58.790Z",
|
||||
"id": "12371e00-5174-11ee-a5c4-7dce2e3293a7",
|
||||
"managed": false,
|
||||
"references": [
|
||||
{
|
||||
"id": "90943e30-9a47-11e8-b64d-95841ca0b247",
|
||||
"name": "event-annotation-group_dataView-ref-90943e30-9a47-11e8-b64d-95841ca0b247",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"type": "event-annotation-group",
|
||||
"updated_at": "2023-10-06T17:17:05.384Z",
|
||||
"version": "WzE4MywxXQ=="
|
||||
}
|
||||
|
||||
{
|
||||
"attributes": {
|
||||
"annotations": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue