Skip to content

[7.x] [Reporting/Test] Add Functional test for download CSV (#65401)#66100

Merged
tsullivan merged 3 commits intoelastic:7.xfrom
tsullivan:backport/7.x/pr-65401
May 13, 2020
Merged

[7.x] [Reporting/Test] Add Functional test for download CSV (#65401)#66100
tsullivan merged 3 commits intoelastic:7.xfrom
tsullivan:backport/7.x/pr-65401

Conversation

@tsullivan
Copy link
Copy Markdown
Member

Backports the following commits to 7.x:

* [Reporting/Test] Add Functional test for download CSV

* add todo

* add fs.existsSync check to find download

* debug

* handle timeout

* validate toast

* different way of getting repo_root
@tsullivan tsullivan added the backport This PR is a backport of another PR label May 11, 2020
@tsullivan
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/management·ts.Management Navigate back to logstash index page

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:03:22]         └-: Management
[00:03:22]           └-> "before all" hook
[00:03:22]           └-> "before all" hook
[00:03:22]             │ info [discover] Loading "mappings.json"
[00:03:22]             │ info [discover] Loading "data.json.gz"
[00:03:22]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana_1/c5kdr09qSwes4fj2hvQOIg] deleting index
[00:03:22]             │ info [discover] Deleted existing index [".kibana_1"]
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] applying create index request using v1 templates []
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:22]             │ info [discover] Created index ".kibana"
[00:03:22]             │ debg [discover] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:03:22]             │ info [discover] Indexed 2 docs into ".kibana"
[00:03:22]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana/D4O2vyVrQ4Cgg8GdvX8cpw] update_mapping [_doc]
[00:03:22]             │ debg Migrating saved objects
[00:03:22]             │ proc [kibana]   log   [22:46:56.242] [info][savedobjects-service] Creating index .kibana_2.
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] applying create index request using v1 templates []
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:22]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] updating number_of_replicas to [0] for indices [.kibana_2]
[00:03:22]             │ proc [kibana]   log   [22:46:56.313] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] applying create index request using v1 templates []
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:22]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] updating number_of_replicas to [0] for indices [.kibana_1]
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] applying create index request using v1 templates []
[00:03:22]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [task]
[00:03:22]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] updating number_of_replicas to [0] for indices [.tasks]
[00:03:23]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] 897 finished with response BulkByScrollResponse[took=57.7ms,timed_out=false,sliceId=null,updated=0,created=2,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:03:23]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana/D4O2vyVrQ4Cgg8GdvX8cpw] deleting index
[00:03:23]             │ proc [kibana]   log   [22:46:56.737] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:03:23]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana_2/PV0xI6O9RICmpidAkVP2bw] update_mapping [_doc]
[00:03:23]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana_2/PV0xI6O9RICmpidAkVP2bw] update_mapping [_doc]
[00:03:23]             │ proc [kibana]   log   [22:46:56.858] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:03:23]             │ proc [kibana]   log   [22:46:56.910] [info][savedobjects-service] Finished in 670ms.
[00:03:23]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:03:23]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana_2/PV0xI6O9RICmpidAkVP2bw] update_mapping [_doc]
[00:03:24]             │ info [logstash_functional] Loading "mappings.json"
[00:03:24]             │ info [logstash_functional] Loading "data.json.gz"
[00:03:24]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] applying create index request using v1 templates []
[00:03:24]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:03:24]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:03:24]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:03:24]             │ debg [logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:03:24]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] applying create index request using v1 templates []
[00:03:24]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:03:24]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:03:24]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:03:24]             │ debg [logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:03:24]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] applying create index request using v1 templates []
[00:03:24]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:03:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:03:25]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:03:25]             │ debg [logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:03:34]             │ info progress: 11955
[00:03:36]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:03:36]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:03:36]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:03:36]             │ debg applying update to kibana config: {"defaultIndex":"logstash-*"}
[00:03:36]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589322014068392583] [.kibana_2/PV0xI6O9RICmpidAkVP2bw] update_mapping [_doc]
[00:03:36]             │ debg navigating to settings url: http://localhost:61141/app/kibana#/management
[00:03:36]             │ debg navigate to: http://localhost:61141/app/kibana#/management
[00:03:36]             │ debg browser[INFO] http://localhost:61141/app/kibana?_t=1589323630329#/management 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:03:36]             │
[00:03:36]             │ debg browser[INFO] http://localhost:61141/bundles/app/kibana/bootstrap.js 10:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:03:36]             │ debg ... sleep(700) start
[00:03:37]             │ debg ... sleep(700) end
[00:03:37]             │ debg returned from get, calling refresh
[00:03:38]             │ debg browser[INFO] http://localhost:61141/app/kibana?_t=1589323630329#/management 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:03:38]             │
[00:03:38]             │ debg browser[INFO] http://localhost:61141/bundles/app/kibana/bootstrap.js 10:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:03:38]             │ debg currentUrl = http://localhost:61141/app/kibana#/management
[00:03:38]             │          appUrl = http://localhost:61141/app/kibana#/management
[00:03:38]             │ debg TestSubjects.find(kibanaChrome)
[00:03:38]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:39]             │ debg TestSubjects.find(kibanaChrome)
[00:03:39]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:03:39]             │ debg browser[INFO] http://localhost:61141/31752/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-05-12T22:47:13Z
[00:03:39]             │        Adding connection to http://localhost:61141/elasticsearch
[00:03:39]             │
[00:03:39]             │      "
[00:03:40]             │ debg ... sleep(501) start
[00:03:40]             │ debg ... sleep(501) end
[00:03:40]             │ debg in navigateTo url = http://localhost:61141/app/kibana#/management?_g=()
[00:03:40]             │ debg TestSubjects.exists(statusPageContainer)
[00:03:40]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:03:43]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:03:43]           └-> main view
[00:03:43]             └-> "before each" hook: global before each
[00:03:43]             └- ✓ pass  (384ms) "Management main view"
[00:03:43]           └-> index pattern page
[00:03:43]             └-> "before each" hook: global before each
[00:03:43]             │ debg clickKibanaIndexPatterns link
[00:03:43]             │ debg TestSubjects.click(index_patterns)
[00:03:43]             │ debg Find.clickByCssSelector('[data-test-subj="index_patterns"]') with timeout=10000
[00:03:43]             │ debg Find.findByCssSelector('[data-test-subj="index_patterns"]') with timeout=10000
[00:03:44]             │ debg isGlobalLoadingIndicatorVisible
[00:03:44]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:03:44]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:03:44]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:03:46]             │ debg --- retry.tryForTime failed again with the same message...
[00:03:46]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:03:46]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:03:46]             │ debg Waiting up to 20000ms for index pattern info flyout...
[00:03:46]             │ debg TestSubjects.exists(CreateIndexPatternPrompt)
[00:03:46]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="CreateIndexPatternPrompt"]') with timeout=2500
[00:03:49]             │ debg --- retry.tryForTime error: [data-test-subj="CreateIndexPatternPrompt"] is not displayed
[00:03:49]             └- ✓ pass  (6.0s) "Management index pattern page"
[00:03:49]           └-> Single indexpattern view
[00:03:49]             └-> "before each" hook: global before each
[00:03:49]             │ debg Find.byXPath('//a[descendant::*[text()='logstash-*']]') with timeout=10000
[00:03:50]             │ debg isGlobalLoadingIndicatorVisible
[00:03:50]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:03:50]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:03:50]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:03:50]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:03:51]             └- ✓ pass  (1.6s) "Management Single indexpattern view"
[00:03:51]           └-> Open create index pattern wizard
[00:03:51]             └-> "before each" hook: global before each
[00:03:51]             │ debg clickKibanaIndexPatterns link
[00:03:51]             │ debg TestSubjects.click(index_patterns)
[00:03:51]             │ debg Find.clickByCssSelector('[data-test-subj="index_patterns"]') with timeout=10000
[00:03:51]             │ debg Find.findByCssSelector('[data-test-subj="index_patterns"]') with timeout=10000
[00:03:51]             │ debg isGlobalLoadingIndicatorVisible
[00:03:51]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:03:51]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:03:51]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:03:53]             │ debg --- retry.tryForTime failed again with the same message...
[00:03:54]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:03:54]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:03:54]             │ debg Waiting up to 20000ms for index pattern info flyout...
[00:03:54]             │ debg TestSubjects.exists(CreateIndexPatternPrompt)
[00:03:54]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="CreateIndexPatternPrompt"]') with timeout=2500
[00:03:56]             │ debg --- retry.tryForTime error: [data-test-subj="CreateIndexPatternPrompt"] is not displayed
[00:03:57]             │ debg TestSubjects.click(createIndexPatternButton)
[00:03:57]             │ debg Find.clickByCssSelector('[data-test-subj="createIndexPatternButton"]') with timeout=10000
[00:03:57]             │ debg Find.findByCssSelector('[data-test-subj="createIndexPatternButton"]') with timeout=10000
[00:03:57]             │ debg isGlobalLoadingIndicatorVisible
[00:03:57]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:03:57]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:03:57]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:03:57]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:03:57]             └- ✓ pass  (6.1s) "Management Open create index pattern wizard"
[00:03:57]           └-> Navigate back to logstash index page
[00:03:57]             └-> "before each" hook: global before each
[00:03:57]             │ debg clickKibanaIndexPatterns link
[00:03:57]             │ debg TestSubjects.click(index_patterns)
[00:03:57]             │ debg Find.clickByCssSelector('[data-test-subj="index_patterns"]') with timeout=10000
[00:03:57]             │ debg Find.findByCssSelector('[data-test-subj="index_patterns"]') with timeout=10000
[00:03:57]             │ debg isGlobalLoadingIndicatorVisible
[00:03:57]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:03:57]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:03:57]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:03:59]             │ debg --- retry.tryForTime failed again with the same message...
[00:04:00]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:04:00]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:04:00]             │ debg Waiting up to 20000ms for index pattern info flyout...
[00:04:00]             │ debg TestSubjects.exists(CreateIndexPatternPrompt)
[00:04:00]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="CreateIndexPatternPrompt"]') with timeout=2500
[00:04:02]             │ debg --- retry.tryForTime error: [data-test-subj="CreateIndexPatternPrompt"] is not displayed
[00:04:03]             │ debg Find.byXPath('//a[descendant::*[text()='logstash-*']]') with timeout=10000
[00:04:04]             │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/Management Navigate back to logstash index page.png"
[00:04:04]             │ info Current URL is: http://localhost:61141/app/kibana#/management/kibana/index_patterns/logstash-*?_g=()&_a=(tab:indexedFields)
[00:04:04]             │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/Management Navigate back to logstash index page.html
[00:04:04]             └- ✖ fail: "Management Navigate back to logstash index page"
[00:04:04]             │

Stack Trace

Error: a11y report:

VIOLATION
  [aria-hidden-focus]: Ensures aria-hidden elements do not contain focusable elements
    Help: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus?application=axeAPI
    Elements:
      - :root
    at Accessibility.testAxeReport (test/accessibility/services/a11y/a11y.ts:85:15)
    at Accessibility.testAppSnapshot (test/accessibility/services/a11y/a11y.ts:58:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tsullivan tsullivan merged commit 0a07c8e into elastic:7.x May 13, 2020
@tsullivan tsullivan deleted the backport/7.x/pr-65401 branch May 13, 2020 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants