[functional test][saved objects] update tests for additional copy saved objects to space#74907
Merged
LeeDr merged 6 commits intoelastic:masterfrom Aug 14, 2020
Merged
[functional test][saved objects] update tests for additional copy saved objects to space#74907LeeDr merged 6 commits intoelastic:masterfrom
LeeDr merged 6 commits intoelastic:masterfrom
Conversation
LeeDr
commented
Aug 12, 2020
LeeDr
commented
Aug 12, 2020
LeeDr
commented
Aug 12, 2020
x-pack/test/functional/page_objects/copy_saved_objects_to_space_page.ts
Outdated
Show resolved
Hide resolved
Author
|
10 runs of test/functional/apps/management/_import_objects·js on the Cloud flaky test runner all passed. This is the test which previously failed in #74432 |
Contributor
|
Pinging @elastic/kibana-platform (Team:Platform) |
Author
|
@elasticmachine merge upstream |
legrego
approved these changes
Aug 14, 2020
Comment on lines
+123
to
+141
| async clickCopyToSpaceByTitle(title: string) { | ||
| const table = keyBy(await this.getElementsInTable(), 'title'); | ||
| // should we check if table size > 0 and log error if not? | ||
| if (table[title].menuElement) { | ||
| log.debug(`we found a context menu element for (${title}) so click it`); | ||
| await table[title].menuElement?.click(); | ||
| // Wait for context menu to render | ||
| const menuPanel = await find.byCssSelector('.euiContextMenuPanel'); | ||
| await ( | ||
| await menuPanel.findByTestSubject('savedObjectsTableAction-copy_saved_objects_to_space') | ||
| ).click(); | ||
| } else { | ||
| log.debug( | ||
| `we didn't find a menu element so should be a relastionships element for (${title}) to click` | ||
| ); | ||
| // or the action elements are on the row without the menu | ||
| await table[title].copySaveObjectsElement?.click(); | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
Are we ok to have x-pack specific test constructs inside an OSS Page Object?
dmlemeshko
approved these changes
Aug 14, 2020
Contributor
dmlemeshko
left a comment
There was a problem hiding this comment.
Code LGTM.
30/30 on flaky test runner https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/776/
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Contributor
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
LeeDr
pushed a commit
to LeeDr/kibana
that referenced
this pull request
Aug 14, 2020
…ed objects to space (elastic#74907) Co-authored-by: Larry Gregory <lgregorydev@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
LeeDr
pushed a commit
to LeeDr/kibana
that referenced
this pull request
Aug 14, 2020
…ed objects to space (elastic#74907) Co-authored-by: Larry Gregory <lgregorydev@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Aug 17, 2020
* master: (24 commits) [ML] Functional tests - skip regression and classification tests [Ingest Manager] fix removing ingest pipelines from elasticsearch (elastic#75092) move tests for placeholder indices to setup (elastic#75096) [jest] temporarily extend default test timeout (elastic#75118) [cli] remove reference to removed --optimize flag (elastic#75083) skip flaky suite (elastic#75044) Adding /etc/rc.d/init.d/functions to the init script when present to … (elastic#22985) [jenkins] add pipeline for hourly security solution cypress tests (elastic#75087) [Reporting/Flaky Test] Skip test for paging list of reports (elastic#75075) remove .kbn-optimizer-cache upload (elastic#75086) skip flaky suite (elastic#74814) Actions add proxy support (elastic#74289) [ILM] TS conversion of Edit policy components (elastic#74747) [Resolver] simulator tests select elements directly instead of using descendant selectors. (elastic#75058) [Enterprise Search] Add Workplace Search side navigation (elastic#74894) [Security solution] Sourcerer: Kibana index pattern selector for security views (elastic#74706) [Logs UI] Remove apollo deps from log link-to routes (elastic#74502) [Maps] add map configurations to docker list (elastic#75035) [functional test][saved objects] update tests for additional copy saved objects to space (elastic#74907) Make the alerts plugin support generics (elastic#72716) ...
jportner
added a commit
that referenced
this pull request
Aug 19, 2020
These were unskipped in #74907, but the copy-to-space flyout has changed. Updated the tests to use new test subject selectors, and also updated some of the i18n keys to be more consistent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The saved objects table has some number of "actions" for each type of saved object. If there are 1 or 2 actions they have icons directly on the row. If there are 3 or more actions applicable to the saved object a context menu is shown which opens to show the actions.
"Spaces" and therefore "Copy to space" isn't in OSS builds so that actions menu changes for tests running in CI vs Cloud. So OSS import_objects test has to handle both paths. Fixes: #74432
This PR also fixes an issue in an x-pack test
x-pack/test/functional/apps/spaces/copy_saved_objects.tswhere it was filtering saved objects forA Dashboardbut depending on other tests which had run before it, also foundA Piewhich broke the test. The fix for this is inx-pack/test/functional/page_objects/copy_saved_objects_to_space_page.tswhere, after the filtering, we get the whole table of elements and can explicitly use the actions menu by the saved object title.await elements[objectName].menuElement?.click();Fixes: #44575
Checklist
Delete any items that are not applicable to this PR.