-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] fix failing alerts table pagination functional tests #119985
[RAC] fix failing alerts table pagination functional tests #119985
Conversation
0fcfc34
to
124eaeb
Compare
@@ -25,6 +25,12 @@ const ACTION_COLUMN_INDEX = 1; | |||
|
|||
type WorkflowStatus = 'open' | 'acknowledged' | 'closed'; | |||
|
|||
export enum AlertStatus { | |||
all = 'all', | |||
active = 'active', |
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.
@ersin-erdal I suggest you import active and recovered values from https://github.com/elastic/kibana/blob/main/packages/kbn-rule-data-utils/src/alerts_as_data_status.ts
import {
ALERT_STATUS_ACTIVE,
ALERT_STATUS_RECOVERED,
} from '@kbn/rule-data-utils/alerts_as_data_status';
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.
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.
Aaah, i imported it directly! that's why it complained...
Fixing it. Thank you :)
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.
Done
@ersin-erdal LGTM! I left one comment regarding importing active and recovered from a kbn package. |
@@ -192,7 +198,6 @@ export function ObservabilityAlertsCommonProvider({ | |||
const viewRuleDetailsLinkClick = async () => { | |||
return await (await testSubjects.find(VIEW_RULE_DETAILS_FLYOUT_SELECTOR)).click(); | |||
}; | |||
|
|||
// Workflow status | |||
const setWorkflowStatusForRow = async (rowIndex: number, workflowStatus: WorkflowStatus) => { |
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.
@ersin-erdal I see you removed workflow status related code. Do we still need this? Can we remove?
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.
This might require bigger refactoring, since this function might be used in other files as well. I live it up to you to decide if you want to do this refactoring as part of this PR
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.
Yes i tried to get rid of it but a lot of functional tests failed! then i put it back.
It requires its own issue...
@@ -25,6 +25,12 @@ 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.
@ersin-erdal Workflow status leftover. Can we remove this?
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.
No unfortunately.
I tried to remove them as i said but setWorkflowStatusForRow and setWorkflowStatusFilter methods which requires that type are used in some other places...
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.
@ersin-erdal I had the same issue. WorkflowStatus code is nested in many places.
@@ -266,6 +295,9 @@ export function ObservabilityAlertsCommonProvider({ | |||
setWorkflowStatusForRow, |
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.
Same comment as above regarding remove workflowStatus leftovers
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.
used by other tests... :)
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.
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @ersin-erdal |
💔 Backport failed
To backport manually run: |
…19985) * [RAC] fix failing alerts table pagination functional tests # Conflicts: # x-pack/test/observability_functional/apps/observability/alerts/index.ts
…19985) * [RAC] fix failing alerts table pagination functional tests # Conflicts: # x-pack/test/observability_functional/apps/observability/alerts/index.ts
…19985) * [RAC] fix failing alerts table pagination functional tests
Pinging @elastic/apm-ui (Team:apm) |
…19985) * [RAC] fix failing alerts table pagination functional tests
Summary
Fixes: #113486
Alerts table pagination functional tests were failing.