Skip to content

Commit

Permalink
[8.14] [Cases] Fix attach lens to case serverless tests (#181253) (#1…
Browse files Browse the repository at this point in the history
…83228)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Cases] Fix attach lens to case serverless tests
(#181253)](#181253)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Christos
Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2024-05-13T07:37:50Z","message":"[Cases]
Fix attach lens to case serverless tests (#181253)\n\n##
Summary\r\n\r\nFixes:
#180295
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5937,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5938\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n### For maintainers\r\n\r\n- [x]
This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"06297c03d265cef8ec1d877d81a7de81d27ce643","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","v8.14.0","v8.15.0"],"title":"[Cases]
Fix attach lens to case serverless
tests","number":181253,"url":"#181253
Fix attach lens to case serverless tests (#181253)\n\n##
Summary\r\n\r\nFixes:
#180295
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5937,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5938\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n### For maintainers\r\n\r\n- [x]
This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"06297c03d265cef8ec1d877d81a7de81d27ce643"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#181253
Fix attach lens to case serverless tests (#181253)\n\n##
Summary\r\n\r\nFixes:
#180295
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5937,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5938\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n### For maintainers\r\n\r\n- [x]
This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"06297c03d265cef8ec1d877d81a7de81d27ce643"}}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
  • Loading branch information
kibanamachine and cnasikas committed May 13, 2024
1 parent 2564d06 commit 82e45bc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const svlCases = getService('svlCases');
const find = getService('find');
const toasts = getService('toasts');
const retry = getService('retry');

// FLAKY: https://github.com/elastic/kibana/issues/180219
describe.skip('Cases persistable attachments', function () {
describe('Cases persistable attachments', function () {
describe('lens visualization', () => {
before(async () => {
await svlCommonPage.login();
Expand Down Expand Up @@ -59,17 +59,27 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
await testSubjects.click('embeddablePanelToggleMenuIcon');
await testSubjects.click('embeddablePanelMore-mainMenu');
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
await testSubjects.click('cases-table-add-case-filter-bar');

await testSubjects.existOrFail('create-case-flyout');
await retry.waitFor('wait for the modal to open', async () => {
return (
(await testSubjects.exists('all-cases-modal')) &&
(await testSubjects.exists('cases-table-add-case-filter-bar'))
);
});

await testSubjects.setValue('input', caseTitle);
await retry.waitFor('wait for the flyout to open', async () => {
if (await testSubjects.exists('cases-table-add-case-filter-bar')) {
await testSubjects.click('cases-table-add-case-filter-bar');
}

return testSubjects.exists('create-case-flyout');
});

await testSubjects.setValue('input', caseTitle);
await testSubjects.setValue('euiMarkdownEditorTextArea', 'test description');

// verify that solution picker is not visible
await testSubjects.missingOrFail('caseOwnerSelector');

await testSubjects.click('create-case-submit');

await cases.common.expectToasterToContain(`${caseTitle} has been updated`);
Expand All @@ -84,7 +94,9 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const title = await find.byCssSelector('[data-test-subj="editable-title-header-value"]');
expect(await title.getVisibleText()).toEqual(caseTitle);

await testSubjects.existOrFail('comment-persistableState-.lens');
await retry.waitFor('wait for the visualization to exist', async () => {
return testSubjects.exists('comment-persistableState-.lens');
});
});

it('adds lens visualization to an existing case from dashboard', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const header = getPageObject('header');
const toasts = getService('toasts');

// FLAKY: https://github.com/elastic/kibana/issues/180295
describe.skip('Cases persistable attachments', () => {
describe('Cases persistable attachments', () => {
describe('lens visualization', () => {
before(async () => {
await svlCommonPage.login();
Expand Down Expand Up @@ -52,17 +51,27 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
await testSubjects.click('embeddablePanelToggleMenuIcon');
await testSubjects.click('embeddablePanelMore-mainMenu');
await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase');
await testSubjects.click('cases-table-add-case-filter-bar');

await testSubjects.existOrFail('create-case-flyout');
await retry.waitFor('wait for the modal to open', async () => {
return (
(await testSubjects.exists('all-cases-modal')) &&
(await testSubjects.exists('cases-table-add-case-filter-bar'))
);
});

await testSubjects.setValue('input', caseTitle);
await retry.waitFor('wait for the flyout to open', async () => {
if (await testSubjects.exists('cases-table-add-case-filter-bar')) {
await testSubjects.click('cases-table-add-case-filter-bar');
}

return testSubjects.exists('create-case-flyout');
});

await testSubjects.setValue('input', caseTitle);
await testSubjects.setValue('euiMarkdownEditorTextArea', 'test description');

// verify that solution picker is not visible
await testSubjects.missingOrFail('caseOwnerSelector');

await testSubjects.click('create-case-submit');

await cases.common.expectToasterToContain(`${caseTitle} has been updated`);
Expand All @@ -77,7 +86,9 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const title = await find.byCssSelector('[data-test-subj="editable-title-header-value"]');
expect(await title.getVisibleText()).toEqual(caseTitle);

await testSubjects.existOrFail('comment-persistableState-.lens');
await retry.waitFor('wait for the visualization to exist', async () => {
return testSubjects.exists('comment-persistableState-.lens');
});
});

it('adds lens visualization to an existing case from dashboard', async () => {
Expand Down

0 comments on commit 82e45bc

Please sign in to comment.