mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
## Summary While elastic/appex-qa is in process to take ownership over FTR related code, from elastic/kibana-operations it will be good to keep track on any changes happening and participate in the review process. |
||
---|---|---|
.. | ||
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]`