[test-helpers] Add EuiBasicTableObject - #9933
Merged
steliosmavro merged 4 commits intoAug 25, 2026
Merged
Conversation
mgadewoll
self-requested a review
August 24, 2026 13:24
mgadewoll
reviewed
Aug 24, 2026
…ame collision - The 'no column with field' error surfaced the internally-escaped regex pattern instead of the original field string (e.g. a caller passing 'a.b' would see 'a\.b' in the message). Pass the original field through separately and use it in the message. - Document that a computed column's data-test-subj is generated from its 'name' using the same tableHeaderCell_<x>_<index> shape a field-data column uses for 'field' — cells() can't distinguish the two from the DOM alone, so a same-named computed column is an edge case worth knowing about. Addresses review feedback from @mgadewoll.
💚 Build Succeeded
History
|
💚 Build Succeeded
History
|
mgadewoll
approved these changes
Aug 25, 2026
mgadewoll
left a comment
Contributor
There was a problem hiding this comment.
🟢 LGTM. Thanks for the updates!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
EuiBasicTableObject, a Playwright Component Object forEuiBasicTable(also coversEuiInMemoryTable, which renders aEuiBasicTableunderneath and passesdata-test-subjstraight through), following the package's CONTRIBUTING guide.Prototyped and validated against a real Kibana consumer first per the guide's lifecycle. Kibana PR: elastic/kibana#285999 (CI green, 8/8 + 24/24 on a repeat-3 flake check).
API
Deliberately minimal, per the package's "minimal public API" principle — only what the validating consumer (a maintenance windows table) actually needed:
rows: aLocatorfor the table's data rows, excluding EUI's own "no items found"/error-message row (detected via thecolspanHTML attribute EUI sets on that row's single cell — real data rows don't set it).cells(field): aLocatorfor a field-data column's cells across all rows, resolved from EUI's own header test-subj (tableHeaderCell_<field>_<digits>, matched exactly to avoid astatus/status_detail-style collision) via the header's nativecellIndex, then read positionally — matches both<td>and<th>since arowHeadercolumn renders as<th scope="row">.Both return
Locators rather than value snapshots, so callers get retrying assertions for free.Deliberately excluded from v1
Testing
tsc --noEmitclean. Playwright validation specs pass against Storybook (Tabular Content/EuiBasicTablePlayground + EmptyTable stories): 5/5, covering checkbox-offset column resolution, therowHeader/<th>case (caught a real off-by-selector-tag bug during authoring — fixed), the empty-state row exclusion, and an unknown-field rejection.