[APM] Extend React flow service map test coverage#251624
Conversation
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
crespocarlos
left a comment
There was a problem hiding this comment.
LGTM. left some nits
| type: MarkerType.ArrowClosed, | ||
| width: DEFAULT_MARKER_SIZE, | ||
| height: DEFAULT_MARKER_SIZE, | ||
| color: '#98A2B3', |
There was a problem hiding this comment.
nit: we could create constants for these colors
There was a problem hiding this comment.
Thanks, I moved all the eui mocked theme colors and reused them ✅
| edgeElement.focus(); | ||
|
|
||
| act(() => { | ||
| const event = new KeyboardEvent('keydown', { key: 'Enter', bubbles: true }); | ||
| document.dispatchEvent(event); | ||
| }); |
There was a problem hiding this comment.
nit: to prevent repeating this
const pressKeyOnEdge = (key: string) => {
edgeElement.focus();
act(() => {
const event = new KeyboardEvent('keydown', { key, bubbles: true });
document.dispatchEvent(event);
});
};There was a problem hiding this comment.
Good catch, thanks! Reused ✅
| }); | ||
| }); | ||
|
|
||
| describe('Enter/Space on node elements', () => { |
There was a problem hiding this comment.
Should we test screen reader announcement?
There was a problem hiding this comment.
Those announcements will change in a follow up issue after some a11y feedback (also the component used for it) - I added the testing part to the AC there so we can have the test in the final version
|
@crespocarlos Thank you for the review! I added the suggestions and I will merge once the build is ready. |
💚 Build Succeeded
Metrics [docs]
History
|
* commit '5c0872d56bc0268177cd3c7150a1685481fb5238': (221 commits) Add .cursorignore file (elastic#251709) [Search] Add descriptions to semantic_text field inference endpoint select (elastic#249265) [Agent Builder] Agent skills implementation (elastic#251209) [Lens] [ES|QL] Improve types for ES|QL conversion. (elastic#251042) Update the trace waterfall to make it easy to understand (elastic#250442) [ES|QL] [Lens] Adds query stats (elastic#251029) [Lens] Fix KQL character escaping when query is generated from Top values column (breakdown). (elastic#250925) fix(kbn-elastic-assistant): fix a11y issue with missing label on flyout (elastic#251656) Update dependency @elastic/monaco-esql to v3.1.16 (main) (elastic#251666) [Automatic Import V2] Add langsmith tracing (elastic#251592) [scout] fix duplicated test failure reports in Buildkite annotations (elastic#251455) chore(NA): remove us-central1-b from gcp zones on high load jobs (elastic#251748) skip flaky suite (elastic#250973) [Lens] Allow read only view for users with write permissions but having no write access to the dashboard (elastic#247746) [CI] Increase artifacts disk to 180gb (elastic#251774) [content-list] 1. Provider Foundation (elastic#251344) [AI Infra] Add missing ES|QL commands and functions documentation for inference tasks (elastic#249089) [docs-utils] 4️⃣ pre-req: Prepare for new validations (elastic#250810) [APM] Extend React flow service map test coverage (elastic#251624) [scout] discover tests with custom server configs (elastic#251297) ... # Conflicts: # src/platform/plugins/shared/dashboard/tsconfig.json # x-pack/platform/plugins/shared/agent_builder_platform/server/tools/create_visualization/create_visualization.ts
Closes #250217
Summary
This PR extends React flow service map test coverage. It adds navigation links e2e and hooks (
useEdgeHighlightinganduseReducedMotion) tests and extendsuseKeyboardNavigationtestsHow to run the scout tests
Start the server with the React Flow feature flag enabled:
Run the React Flow tests:
How to run the service map unit tests