-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RAC] [Observability] Add functional tests covering the alert workflow status #111788
[RAC] [Observability] Add functional tests covering the alert workflow status #111788
Conversation
536674f
to
5126769
Compare
5126769
to
b7ab54b
Compare
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just some questions about structure!
x-pack/test/observability_functional/apps/observability/alerts/workflow_status.ts
Outdated
Show resolved
Hide resolved
await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); | ||
}); | ||
|
||
it('is filtered for "open" by default', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Is it more more common to say "filter by"? This confused my brain for a moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In "filter by" I'm always wondering whether it means to include or exclude. But I can probably try harder to find an unambiguous description with more natural grammar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to make the test case names clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW for me, by always means include. Similar to how "sort by" works, you sort by what you desire, and you filter by what you desire. But the "predicate" nature of this makes it harder I agree.
But I would imagine it likes this: filter by $PREDICATE, where if the predicate is true you include it, so "open" vs "not open"
x-pack/test/observability_functional/apps/observability/alerts/workflow_status.ts
Show resolved
Hide resolved
x-pack/test/observability_functional/apps/observability/alerts/workflow_status.ts
Outdated
Show resolved
Hide resolved
Just came to review this, but @miltonhultgren has it covered 👌 I'll unassign myself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Left some more nit picky questions but nothing that needs changing.
|
||
const ACTION_COLUMN_INDEX = 1; | ||
|
||
type WorkflowStatus = 'open' | 'acknowledged' | 'closed'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, what is the risk of pulling this from the production code base?
Is it more from the perspective of blackbox testing or risk of coupling the code bases from a tooling perspective?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tooling can be problematic as well (TS performance in the test
directories is terrible already), but the former point weighs heavier for me. These tests are supposed to be from the user's perspective and would therefore be aligned more with the UI concepts than the technical concepts. One example for that "looks the same, but actually isn't" is the fact that I needed to address the menu item via the verb "close" rather than the state "closed". So there is a correspondence between action and state, but they are not identical.
x-pack/test/observability_functional/apps/observability/alerts/workflow_status.ts
Show resolved
Hide resolved
}); | ||
}); | ||
|
||
it('can be set to "acknowledged" using the row menu', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Similar here, this test name is still a bit unclear with regards to what "can be set". Maybe the word alert is needed here as well?
"an alert can be set to "acknowledged" using the row action menu"?
I don't think this needs to be changed, more looking to discuss patterns.
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @weltenwort |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…w status (#111788) (#112421) Co-authored-by: Felix Stürmer <[email protected]>
📝 Summary
This adds functional tests for the alert workflow status actions in the alerts table's row actions.
closes #110641
🕵️♀️ Review notes
index.ts
file.