Skip to content

Commit

Permalink
Impl [QA] Alert notifications data-testid (mlrun#2947)
Browse files Browse the repository at this point in the history
  • Loading branch information
pinis-gini-apps authored Dec 16, 2024
1 parent 9250800 commit c539c05
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/utils/createAlertsContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,29 @@ const getEntityTypeData = entityType => {
switch (entityType) {
case MODEL_ENDPOINT_RESULT:
return {
value: <Endpoint />,
value: (
<span data-testid={ENDPOINT}>
<Endpoint />
</span>
),
tooltip: upperFirst(ENDPOINT)
}
case MODEL_MONITORING_APPLICATION:
return {
value: <Application />,
value: (
<span data-testid={APPLICATION}>
<Application />
</span>
),
tooltip: upperFirst(APPLICATION)
}
case JOB:
return {
value: <Job />,
value: (
<span data-testid={JOB}>
<Job />
</span>
),
tooltip: upperFirst(JOB)
}
default:
Expand Down Expand Up @@ -130,7 +142,10 @@ const getNotificationData = notifications =>
notifications.map(notification => {
return {
icon: (
<div className="alert-row-notification">
<div
data-testid={`${notification.kind}-${notification.err.length === 0 ? 'success' : 'fail'}`}
className="alert-row-notification"
>
{alertsNotifications[notification.kind]}
{notification?.err && (
<div className="notification-fail">
Expand Down

0 comments on commit c539c05

Please sign in to comment.