mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
## Summary This PR migrates the following FTR tests to `@kbn/scout`: `x-pack/test/functional/apps/discover/error_handling.ts` => `x-pack/plugins/discover_enhanced/ui_tests/tests/error_handling.spec.ts` `x-pack/test/functional/apps/discover/saved_search_embeddable.ts` => `x-pack/plugins/discover_enhanced/ui_tests/tests/saved_search_embeddable.spec.ts` `x-pack/test/functional/apps/discover/saved_searches.ts` => `x-pack/plugins/discover_enhanced/ui_tests/tests/saved_searches.spec.ts` `x-pack/test/functional/apps/discover/value_suggestions.ts` 2nd describe block => `x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_use_time_range_disabled.spec.ts` Some other changes to mention: **packages/kbn-test-subj-selector**: - support of `^foo` syntax similar to `CSS [attribute^=value] Selector` **packages/kbn-scout**: - new worker fixture `uiSettings` to wrap Advanced Settings set/unset capability - extend `ScoutPage` fixture with `typeWithDelay` method required for many Kibana input fields - extend `PageObjects` fixture with `DashboardApp` & `FilterBar`, also extending existing ones. How to test: ```bash // ESS node scripts/scout_start_servers.js --stateful npx playwright test --config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts --grep @ess // Serverless node scripts/scout_start_servers.js --serverless=es npx playwright test --config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts --grep @svlSearch ``` --------- Co-authored-by: Robert Oskamp <traeluki@gmail.com> |
||
---|---|---|
.. | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.mdx | ||
test_subj_selector.test.ts | ||
test_subj_selector.ts | ||
tsconfig.json |
--- id: kibDevDocsOpsTestSubjSelector slug: /kibana-dev-docs/ops/test-subj-selector title: "@kbn/test-subj-selector" description: An utility package to quickly get css selectors from strings date: 2022-05-19 tags: ['kibana', 'dev', 'contributor', 'operations', 'test', 'subj', 'selector'] --- Converts a testSubject selector into a CSS selector. testSubject selector syntax rules: - `data-test-subj` values can include spaces - prefixing a value with `~` will allow matching a single word in a `data-test-subj` that uses several space delimited list words - example: `~foo` - css equivalent: `[data-test-subj~="foo"]` - the `>` character is used between two values to indicate that the value on the right must match an element inside an element matched by the value on the left - example: `foo > bar` - css equivalent: `[data-test-subj=foo] [data-test-subj=bar]` - the `&` character is used between two values to indicate that the value on both sides must both match the element - example: `foo & bar` - css equivalent: `[data-test-subj=foo][data-test-subj=bar]`