Skip to content

Commit

Permalink
[8.17] [Discover] Unskip data view tests (#201784) (#202103)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.17`:
- [[Discover] Unskip data view tests
(#201784)](#201784)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-27T20:40:23Z","message":"[Discover]
Unskip data view tests (#201784)\n\n- Closes
https://github.com/elastic/kibana/issues/201072\r\n- Closes
https://github.com/elastic/kibana/issues/201071\r\n\r\nI would not say
that the changes fixed it but it does not fail again so\r\nlet's unskip
and
monitor.","sha":"4701af32cf11efc88b4ead01b976e61c0e58cc00","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","v8.18.0"],"number":201784,"url":"https://github.com/elastic/kibana/pull/201784","mergeCommit":{"message":"[Discover]
Unskip data view tests (#201784)\n\n- Closes
https://github.com/elastic/kibana/issues/201072\r\n- Closes
https://github.com/elastic/kibana/issues/201071\r\n\r\nI would not say
that the changes fixed it but it does not fail again so\r\nlet's unskip
and
monitor.","sha":"4701af32cf11efc88b4ead01b976e61c0e58cc00"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201784","number":201784,"mergeCommit":{"message":"[Discover]
Unskip data view tests (#201784)\n\n- Closes
https://github.com/elastic/kibana/issues/201072\r\n- Closes
https://github.com/elastic/kibana/issues/201071\r\n\r\nI would not say
that the changes fixed it but it does not fail again so\r\nlet's unskip
and
monitor.","sha":"4701af32cf11efc88b4ead01b976e61c0e58cc00"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/202069","number":202069,"state":"MERGED","mergeCommit":{"sha":"f7a222f9ca8c7a36c2442d5174985f059fb9f924","message":"[8.x]
[Discover] Unskip data view tests (#201784) (#202069)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`8.x`:\n- [[Discover] Unskip data view
tests\n(#201784)](https://github.com/elastic/kibana/pull/201784)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Julia\nRechkunova\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-11-27T20:40:23Z\",\"message\":\"[Discover]\nUnskip
data view tests (#201784)\\n\\n-
Closes\nhttps://github.com//issues/201072\\r\\n-
Closes\nhttps://github.com//issues/201071\\r\\n\\r\\nI
would not say\nthat the changes fixed it but it does not fail again
so\\r\\nlet's
unskip\nand\nmonitor.\",\"sha\":\"4701af32cf11efc88b4ead01b976e61c0e58cc00\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.18.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"Team:DataDiscovery\",\"backport:prev-minor\"],\"title\":\"[Discover]\nUnskip
data
view\ntests\",\"number\":201784,\"url\":\"https://github.com/elastic/kibana/pull/201784\",\"mergeCommit\":{\"message\":\"[Discover]\nUnskip
data view tests (#201784)\\n\\n-
Closes\nhttps://github.com//issues/201072\\r\\n-
Closes\nhttps://github.com//issues/201071\\r\\n\\r\\nI
would not say\nthat the changes fixed it but it does not fail again
so\\r\\nlet's
unskip\nand\nmonitor.\",\"sha\":\"4701af32cf11efc88b4ead01b976e61c0e58cc00\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/201784\",\"number\":201784,\"mergeCommit\":{\"message\":\"[Discover]\nUnskip
data view tests (#201784)\\n\\n-
Closes\nhttps://github.com//issues/201072\\r\\n-
Closes\nhttps://github.com//issues/201071\\r\\n\\r\\nI
would not say\nthat the changes fixed it but it does not fail again
so\\r\\nlet's unskip\nand
monitor.\",\"sha\":\"4701af32cf11efc88b4ead01b976e61c0e58cc00\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Julia Rechkunova <[email protected]>"}}]}] BACKPORT-->
  • Loading branch information
jughosta authored Nov 28, 2024
1 parent 67e441f commit c038e9b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions test/functional/apps/discover/group4/_data_view_edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ 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',
]);

describe('data view flyout', function () {
Expand All @@ -40,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 @@ -65,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 @@ -87,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 @@ -104,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 @@ -116,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 c038e9b

Please sign in to comment.