Skip to content

Commit 35cf8fe

Browse files
Merge branch 'master' into lens/drag-to-replace
2 parents c4333d5 + 60986d4 commit 35cf8fe

1,136 files changed

Lines changed: 20454 additions & 13558 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ module.exports = {
305305
'!src/core/server/mocks{,.ts}',
306306
'!src/core/server/types{,.ts}',
307307
'!src/core/server/test_utils{,.ts}',
308+
'!src/core/server/utils', // ts alias
309+
'!src/core/server/utils/**/*',
308310
// for absolute imports until fixed in
309311
// https://github.com/elastic/kibana/issues/36096
310312
'!src/core/server/*.test.mocks{,.ts}',

.github/CODEOWNERS

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,19 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
209209
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services
210210

211211
# Enterprise Search
212-
/x-pack/plugins/enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
213-
/x-pack/test/functional_enterprise_search/ @elastic/app-search-frontend @elastic/workplace-search-frontend
212+
# Shared
213+
/x-pack/plugins/enterprise_search/ @elastic/enterprise-search-frontend
214+
/x-pack/test/functional_enterprise_search/ @elastic/enterprise-search-frontend
215+
# App Search
216+
/x-pack/plugins/enterprise_search/public/applications/app_search @elastic/app-search-frontend
217+
/x-pack/plugins/enterprise_search/server/routes/app_search @elastic/app-search-frontend
218+
/x-pack/plugins/enterprise_search/server/collectors/app_search @elastic/app-search-frontend
219+
/x-pack/plugins/enterprise_search/server/saved_objects/app_search @elastic/app-search-frontend
220+
# Workplace Search
221+
/x-pack/plugins/enterprise_search/public/applications/workplace_search @elastic/workplace-search-frontend
222+
/x-pack/plugins/enterprise_search/server/routes/workplace_search @elastic/workplace-search-frontend
223+
/x-pack/plugins/enterprise_search/server/collectors/workplace_search @elastic/workplace-search-frontend
224+
/x-pack/plugins/enterprise_search/server/saved_objects/workplace_search @elastic/workplace-search-frontend
214225

215226
# Elasticsearch UI
216227
/src/plugins/dev_tools/ @elastic/es-ui

.github/ISSUE_TEMPLATE/APM.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: APM Issue
3+
about: Issues related to the APM solution in Kibana
4+
labels: Team:apm
5+
title: [APM]
6+
---
7+
8+
**Versions**
9+
Kibana: (if relevant)
10+
APM Server: (if relevant)
11+
Elasticsearch: (if relevant)

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ apm.tsconfig.json
6060
# release notes script output
6161
report.csv
6262
report.asciidoc
63+
64+
# TS incremental build cache
65+
*.tsbuildinfo

NOTICE.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
281281
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
282282
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
283283

284+
---
285+
This product includes code in the function applyCubicBezierStyles that was
286+
inspired by a public Codepen, which was available under a "MIT" license.
287+
288+
Copyright (c) 2020 by Guillaume (https://codepen.io/guillaumethomas/pen/xxbbBKO)
289+
MIT License http://www.opensource.org/licenses/mit-license
290+
284291
---
285292
This product includes code that is adapted from mapbox-gl-js, which is
286293
available under a "BSD-3-Clause" license.

docs/canvas/canvas-tinymath-functions.asciidoc

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -492,37 +492,6 @@ find the mean by index.
492492
|one or more numbers or arrays of numbers
493493
|===
494494

495-
*Returns*: `number` | `Array.<number>`. The maximum value of all numbers if
496-
`args` contains only numbers. Returns an array with the the maximum values at each
497-
index, including all scalar numbers in `args` in the calculation at each index if
498-
`args` contains at least one array.
499-
500-
*Throws*: `'Array length mismatch'` if `args` contains arrays of different lengths
501-
502-
*Example*
503-
[source, js]
504-
------------
505-
max(1, 2, 3) // returns 3
506-
max([10, 20, 30, 40], 15) // returns [15, 20, 30, 40]
507-
max([1, 9], 4, [3, 5]) // returns [max([1, 4, 3]), max([9, 4, 5])] = [4, 9]
508-
------------
509-
510-
[float]
511-
=== mean( ...args )
512-
513-
Finds the mean value of one of more numbers/arrays of numbers passed into the function.
514-
If at least one array of numbers is passed into the function, the function will
515-
find the mean by index.
516-
517-
[cols="3*^<"]
518-
|===
519-
|Param |Type |Description
520-
521-
|...args
522-
|number \| Array.<number>
523-
|one or more numbers or arrays of numbers
524-
|===
525-
526495
*Returns*: `number` | `Array.<number>`. The mean value of all numbers if `args`
527496
contains only numbers. Returns an array with the the mean values of each index,
528497
including all scalar numbers in `args` in the calculation at each index if `args`
Lines changed: 91 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,104 @@
11
[[development-accessibility-tests]]
22
== Automated Accessibility Testing
33

4+
5+
To write an accessibility test, use the provided accessibility service `getService('a11y')`. Accessibility tests are fairly straightforward to write as https://github.com/dequelabs/axe-core[axe] does most of the heavy lifting. Navigate to the UI that you need to test, then call `testAppSnapshot();` from the service imported earlier to make sure axe finds no failures. Navigate through every portion of the UI for the best coverage.
6+
7+
An example test might look like this:
8+
[source,js]
9+
----
10+
export default function ({ getService, getPageObjects }) {
11+
const { common, home } = getPageObjects(['common', 'home']);
12+
const a11y = getService('a11y'); /* this is the wrapping service around axe */
13+
14+
describe('Kibana Home', () => {
15+
before(async () => {
16+
await common.navigateToApp('home'); /* navigates to the page we want to test */
17+
});
18+
19+
it('Kibana Home view', async () => {
20+
await retry.waitFor(
21+
'home page visible',
22+
async () => await testSubjects.exists('homeApp')
23+
); /* confirm you're on the correct page and that it's loaded */
24+
await a11y.testAppSnapshot(); /* this expects that there are no failures found by axe */
25+
});
26+
27+
/**
28+
* If these tests were added by our QA team, tests that fail that require significant app code
29+
* changes to be fixed will be skipped with a corresponding issue label with more info
30+
*/
31+
// Skipped due to https://github.com/elastic/kibana/issues/99999
32+
it.skip('all plugins view page meets a11y requirements', async () => {
33+
await home.clickAllKibanaPlugins();
34+
await a11y.testAppSnapshot();
35+
});
36+
37+
/**
38+
* Testing all the versions and different views of of a page is important to get good
39+
* coverage. Things like empty states, different license levels, different permissions, and
40+
* loaded data can all significantly change the UI which necessitates their own test.
41+
*/
42+
it('Add Kibana sample data page', async () => {
43+
await common.navigateToUrl('home', '/tutorial_directory/sampleData', {
44+
useActualUrl: true,
45+
});
46+
await a11y.testAppSnapshot();
47+
});
48+
});
49+
}
50+
----
51+
52+
=== Running tests
453
To run the tests locally:
554

655
[arabic]
7-
. In one terminal window run
8-
`node scripts/functional_tests_server --config test/accessibility/config.ts`
9-
. In another terminal window run
10-
`node scripts/functional_test_runner.js --config test/accessibility/config.ts`
56+
. In one terminal window run:
57+
+
58+
[source,shell]
59+
-----------
60+
node scripts/functional_tests_server --config test/accessibility/config.ts
61+
-----------
62+
63+
. When the server prints that it is ready, in another terminal window run:
64+
+
65+
[source,shell]
66+
-----------
67+
node scripts/functional_test_runner.js --config test/accessibility/config.ts
68+
-----------
1169

1270
To run the x-pack tests, swap the config file out for
1371
`x-pack/test/accessibility/config.ts`.
1472

15-
After the server is up, you can go to this instance of {kib} at
16-
`localhost:5620`.
17-
1873
The testing is done using https://github.com/dequelabs/axe-core[axe].
19-
The same thing that runs in CI, can be run locally using their browser
20-
plugins:
74+
You can run the same thing that runs CI using browser plugins:
2175

2276
* https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US[Chrome]
23-
* https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/[Firefox]
77+
* https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/[Firefox]
78+
79+
=== Anatomy of a failure
80+
81+
Failures can seem confusing if you've never seen one before. Here is a breakdown of what a failure coming from CI might look like:
82+
[source,bash]
83+
----
84+
1) Dashboard
85+
create dashboard button:
86+
87+
Error: a11y report:
88+
89+
VIOLATION
90+
[aria-hidden-focus]: Ensures aria-hidden elements do not contain focusable elements
91+
Help: https://dequeuniversity.com/rules/axe/3.5/aria-hidden-focus?application=axeAPI
92+
Elements:
93+
- #example
94+
at Accessibility.testAxeReport (test/accessibility/services/a11y/a11y.ts:90:15)
95+
at Accessibility.testAppSnapshot (test/accessibility/services/a11y/a11y.ts:58:18)
96+
at process._tickCallback (internal/process/next_tick.js:68:7)
97+
----
98+
99+
100+
* "Dashboard" and "create dashboard button" are the names of the test suite and specific test that failed.
101+
* Always in brackets, "[aria-hidden-focus]" is the name of the axe rule that failed, followed by a short description.
102+
* "Help: <url>" links to the axe documentation for that rule, including severity, remediation tips, and good and bad code examples.
103+
* "Elements:" points to where in the DOM the failure originated (using CSS selector syntax). In this example, the problem came from an element with the ID `example`. If the selector is too complicated to find the source of the problem, use the browser plugins mentioned earlier to locate it. If you have a general idea where the issue is coming from, you can also try adding unique IDs to the page to narrow down the location.
104+
* The stack trace points to the internals of axe. The stack trace is there in case the test failure is a bug in axe and not in your code, although this is unlikely.

docs/development/core/public/kibana-plugin-core-public.appbase.capabilities.md renamed to docs/development/core/public/kibana-plugin-core-public.app.capabilities.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [capabilities](./kibana-plugin-core-public.appbase.capabilities.md)
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [App](./kibana-plugin-core-public.app.md) &gt; [capabilities](./kibana-plugin-core-public.app.capabilities.md)
44

5-
## AppBase.capabilities property
5+
## App.capabilities property
66

77
Custom capabilities defined by the app.
88

docs/development/core/public/kibana-plugin-core-public.appbase.category.md renamed to docs/development/core/public/kibana-plugin-core-public.app.category.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [category](./kibana-plugin-core-public.appbase.category.md)
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [App](./kibana-plugin-core-public.app.md) &gt; [category](./kibana-plugin-core-public.app.category.md)
44

5-
## AppBase.category property
5+
## App.category property
66

77
The category definition of the product See [AppCategory](./kibana-plugin-core-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference
88

docs/development/core/public/kibana-plugin-core-public.appbase.defaultpath.md renamed to docs/development/core/public/kibana-plugin-core-public.app.defaultpath.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppBase](./kibana-plugin-core-public.appbase.md) &gt; [defaultPath](./kibana-plugin-core-public.appbase.defaultpath.md)
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [App](./kibana-plugin-core-public.app.md) &gt; [defaultPath](./kibana-plugin-core-public.app.defaultpath.md)
44

5-
## AppBase.defaultPath property
5+
## App.defaultPath property
66

77
Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the `path` option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)<!-- -->\`<!-- -->, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar.
88

0 commit comments

Comments
 (0)