Skip to content

Commit

Permalink
[Discover] Unskip data view tests (elastic#201784)
Browse files Browse the repository at this point in the history
- Closes elastic#201072
- Closes elastic#201071

I would not say that the changes fixed it but it does not fail again so
let's unskip and monitor.

(cherry picked from commit 4701af3)
  • Loading branch information
jughosta committed Nov 27, 2024
1 parent 454ad56 commit 0569f37
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions test/functional/apps/discover/group4/_data_view_edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const retry = getService('retry');
const dataViews = getService('dataViews');

const { common, discover, timePicker, unifiedFieldList } = getPageObjects([
const { common, discover, timePicker, unifiedFieldList, header } = getPageObjects([
'common',
'discover',
'timePicker',
'unifiedFieldList',
'header',
]);

// Failing: See https://github.com/elastic/kibana/issues/201071
describe.skip('data view flyout', function () {
describe('data view flyout', function () {
before(async () => {
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']);
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json');
Expand All @@ -41,23 +41,23 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await kibanaServer.savedObjects.cleanStandardList();
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
await es.transport.request({
path: '/my-index-000001',
path: '/data-view-index-000001',
method: 'DELETE',
});
await es.transport.request({
path: '/my-index-000002',
path: '/data-view-index-000002',
method: 'DELETE',
});
await es.transport.request({
path: '/my-index-000003',
path: '/data-view-index-000003',
method: 'DELETE',
});
});

it('create ad hoc data view', async function () {
const initialPattern = 'my-index-';
const initialPattern = 'data-view-index-';
await es.transport.request({
path: '/my-index-000001/_doc',
path: '/data-view-index-000001/_doc',
method: 'POST',
body: {
'@timestamp': new Date().toISOString(),
Expand All @@ -66,7 +66,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

await es.transport.request({
path: '/my-index-000002/_doc',
path: '/data-view-index-000002/_doc',
method: 'POST',
body: {
'@timestamp': new Date().toISOString(),
Expand All @@ -88,12 +88,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('create saved data view', async function () {
const updatedPattern = 'my-index-000001';
const updatedPattern = 'data-view-index-000001';
await dataViews.createFromSearchBar({
name: updatedPattern,
adHoc: false,
hasTimeField: true,
});
await header.waitUntilLoadingHasFinished();
await discover.waitUntilSearchingHasFinished();

await retry.try(async () => {
Expand All @@ -105,9 +106,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('update data view with a different time field', async function () {
const updatedPattern = 'my-index-000003';
const updatedPattern = 'data-view-index-000003';
await es.transport.request({
path: '/my-index-000003/_doc',
path: '/data-view-index-000003/_doc',
method: 'POST',
body: {
timestamp: new Date('1970-01-01').toISOString(),
Expand All @@ -117,7 +118,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
for (let i = 0; i < 3; i++) {
await es.transport.request({
path: '/my-index-000003/_doc',
path: '/data-view-index-000003/_doc',
method: 'POST',
body: {
timestamp: new Date().toISOString(),
Expand Down

0 comments on commit 0569f37

Please sign in to comment.