diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 06f8a9c6d05a1..745101711171c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1386,7 +1386,90 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai /.eslintrc.js @elastic/kibana-operations /.eslintignore @elastic/kibana-operations -# Appex QA +# QA - Appex QA +/test/server_integration/services/index.js @elastic/appex-qa +/x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js @elastic/appex-qa +/x-pack/test/stack_functional_integration/configs/consume_state.js @elastic/appex-qa +/x-pack/test/functional/services/remote_es/remote_es_archiver.ts @elastic/appex-qa +/test/functional/services/remote_es/remote_es_archiver.ts @elastic/appex-qa +/x-pack/test/kibana.jsonc @elastic/appex-qa +/x-pack/test/functional_with_es_ssl/ftr_provider_context.d.ts @elastic/appex-qa +/x-pack/test/stack_functional_integration/apps @elastic/appex-qa +/x-pack/test/plugin_functional/config.ts @elastic/appex-qa +/x-pack/test/plugin_functional/ftr_provider_context.d.ts @elastic/appex-qa +/x-pack/test/plugin_functional/page_objects.ts @elastic/appex-qa +/x-pack/test/upgrade/services/index.ts @elastic/appex-qa +/x-pack/test/upgrade/ftr_provider_context.d.ts @elastic/appex-qa +/x-pack/test/upgrade/config.ts @elastic/appex-qa +/x-pack/test/functional_basic/ftr_provider_context.d.ts @elastic/appex-qa +/x-pack/test/functional/services/remote_es/remote_es.ts @elastic/appex-qa +/x-pack/test/functional/services/random.js @elastic/appex-qa +/x-pack/test/functional/services/index.ts @elastic/appex-qa +/x-pack/test/functional/page_objects/index.ts @elastic/appex-qa +/x-pack/test/functional/ftr_provider_context.ts @elastic/appex-qa +/x-pack/test/functional/README.md @elastic/appex-qa +/x-pack/test/examples/config.ts @elastic/appex-qa +/x-pack/test/common/services/index.ts @elastic/appex-qa +/x-pack/test/common/services/bsearch_secure.ts @elastic/appex-qa +/x-pack/test/common/ftr_provider_context.ts @elastic/appex-qa +/x-pack/test/api_integration_basic/ftr_provider_context.d.ts @elastic/appex-qa +/x-pack/test/api_integration_basic/config.ts @elastic/appex-qa +/x-pack/test/api_integration_basic/apis/index.ts @elastic/appex-qa +/x-pack/test/api_integration/services/index.ts @elastic/appex-qa +/x-pack/test/api_integration/services/es_supertest_without_auth.js @elastic/appex-qa +/x-pack/test/api_integration/config.ts @elastic/appex-qa +/x-pack/test/api_integration/apis/kibana/config.ts @elastic/appex-qa +/x-pack/test/tsconfig.json @elastic/appex-qa +/x-pack/test/load @elastic/appex-qa +/test/tsconfig.json @elastic/appex-qa +/test/plugin_functional/services/index.ts @elastic/appex-qa +/test/plugin_functional/README.md @elastic/appex-qa +/test/plugin_functional/config.ts @elastic/appex-qa +/test/kibana.jsonc @elastic/appex-qa +/test/harden @elastic/appex-qa +/test/functional/services/supertest.ts @elastic/appex-qa +/test/functional/services/remote_es/remote_es.ts @elastic/appex-qa +/test/functional/services/query_bar.ts @elastic/appex-qa +/test/functional/services/menu_toggle.ts @elastic/appex-qa +/test/functional/services/listing_table.ts @elastic/appex-qa +/test/common/fixtures/plugins/coverage @elastic/appex-qa +/test/functional/services/index.ts @elastic/appex-qa +/test/functional/services/global_nav.ts @elastic/appex-qa +/test/functional/services/flyout.ts @elastic/appex-qa +/test/functional/services/filter_bar.ts @elastic/appex-qa +/test/functional/services/field_editor.ts @elastic/appex-qa +/test/functional/services/embedding.ts @elastic/appex-qa +/test/functional/services/doc_table.ts @elastic/appex-qa +/test/functional/services/data_grid.ts @elastic/appex-qa +/test/functional/services/combo_box.ts @elastic/appex-qa +/test/functional/page_objects/unified_field_list.ts @elastic/appex-qa +/test/functional/page_objects/time_picker.ts @elastic/appex-qa +/test/functional/page_objects/index.ts @elastic/appex-qa +/test/functional/page_objects/header_page.ts @elastic/appex-qa +/test/functional/page_objects/error_page.ts @elastic/appex-qa +/test/functional/page_objects/common_page.ts @elastic/appex-qa +/test/functional/jest.config.js @elastic/appex-qa +/test/functional/ftr_provider_context.ts @elastic/appex-qa +/test/functional/fixtures/es_archiver/README.md @elastic/appex-qa +/test/functional/firefox/config.base.ts @elastic/appex-qa +/test/functional/config.* @elastic/appex-qa +/test/functional/README.md @elastic/appex-qa +/test/examples/config.js @elastic/appex-qa +/test/examples/README.md @elastic/appex-qa +/test/common/services/index.ts @elastic/appex-qa +/test/common/fixtures/plugins/coverage/*.ts @elastic/appex-qa +/test/common/config.js @elastic/appex-qa +/test/api_integration/services/index.ts @elastic/appex-qa +/test/api_integration/jest.config.js @elastic/appex-qa +/test/api_integration/ftr_provider_context.d.ts @elastic/appex-qa +/test/api_integration/config.js @elastic/appex-qa +/test/api_integration/apis/index.ts @elastic/appex-qa +/test/accessibility/services/index.ts @elastic/appex-qa +/test/accessibility/services/a11y @elastic/appex-qa +/test/accessibility/page_objects.ts @elastic/appex-qa +/test/accessibility/ftr_provider_context.ts @elastic/appex-qa +/test/accessibility/config.ts @elastic/appex-qa +/test/accessibility/apps/index.ts @elastic/appex-qa /x-pack/test/scalability @elastic/appex-qa /src/dev/performance @elastic/appex-qa /x-pack/test/functional/config.*.* @elastic/appex-qa diff --git a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/constants.ts b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/constants.ts index 95606e276362b..c72808d5fceab 100644 --- a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/constants.ts +++ b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/constants.ts @@ -70,6 +70,7 @@ export const COMMON_OPTIONS_LIST_CONTROL_INPUTS: Partial { + const setA = new Set(['a', 'b', 'c']); + const setB = new Set(['c', 'b', 'a']); + + expect(() => { + kbnExpect(setA).to.eql(setB); + }).not.toThrow(); + expect(() => { + kbnExpect(setB).to.eql(setA); + }).not.toThrow(); +}); + +it('asserts that sets with same size but different entries are not equal', async () => { + const setA = new Set(['a', 'b', 'c']); + const setB = new Set(['x', 'y', 'z']); + + expect(() => { + kbnExpect(setA).to.eql(setB); + }).toThrow(); + expect(() => { + kbnExpect(setB).to.eql(setA); + }).toThrow(); +}); + +it('asserts that sets with different size but overlapping items are not equal', async () => { + const setA = new Set(['a', 'b', 'c']); + const setB = new Set(['a', 'b']); + + expect(() => { + kbnExpect(setA).to.eql(setB); + }).toThrow(); + expect(() => { + kbnExpect(setB).to.eql(setA); + }).toThrow(); +}); diff --git a/packages/kbn-expect/jest.config.js b/packages/kbn-expect/jest.config.js new file mode 100644 index 0000000000000..4e517d865391a --- /dev/null +++ b/packages/kbn-expect/jest.config.js @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-expect'], +}; diff --git a/packages/kbn-expect/tsconfig.json b/packages/kbn-expect/tsconfig.json index 4346803ced341..bf599d834c806 100644 --- a/packages/kbn-expect/tsconfig.json +++ b/packages/kbn-expect/tsconfig.json @@ -1,10 +1,14 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "target/types" + "outDir": "target/types", + "types": [ + "jest", + ], }, "include": [ - "expect.d.ts" + "expect.d.ts", + "**/*.ts" ], "exclude": [ "target/**/*", diff --git a/src/plugins/field_formats/common/converters/url.test.ts b/src/plugins/field_formats/common/converters/url.test.ts index 7e465829e1eb1..d1c89575b2d4d 100644 --- a/src/plugins/field_formats/common/converters/url.test.ts +++ b/src/plugins/field_formats/common/converters/url.test.ts @@ -19,6 +19,14 @@ describe('UrlFormat', () => { ); }); + test('outputs a mailto: link when URL starts with mailto:', () => { + const url = new UrlFormat({}); + + expect(url.convert('mailto:test@example.com', HTML_CONTEXT_TYPE)).toBe( + 'mailto:test@example.com' + ); + }); + test('outputs an