youngduck98 commented on code in PR #75608:
URL: https://github.com/apache/airflow/pull/75608#discussion_r4495013175


##########
airflow-core/src/airflow/ui/src/pages/Dag/DeadlineAlertsBadge.test.tsx:
##########
@@ -88,4 +88,14 @@ describe("DeadlineAlertsBadge", () => {
       expect(screen.queryByText(absent)).not.toBeInTheDocument();
     },
   );
+  it("shows the configured run type scope", async () => {
+    vi.mocked(useDeadlinesServiceGetDagDeadlineAlerts).mockReturnValue({
+      data: { deadline_alerts: [{ ...baseAlert, run_type_filter: ["scheduled"] 
}], total_entries: 1 },
+    } as ReturnType<typeof useDeadlinesServiceGetDagDeadlineAlerts>);
+
+    render(<DeadlineAlertsBadge dagId="test_dag" />, { wrapper: Wrapper });
+    fireEvent.click(screen.getByRole("button"));
+
+    expect(await 
screen.findByText("deadlineAlerts.appliesTo")).toBeInTheDocument();

Review Comment:
   Updated the tests in 
[f17794f113](https://github.com/apache/airflow/pull/75608/commits/f17794f113e4d2ae42892117738864ee4ab6738e)
 to assert which run types are displayed for single-value and multiple-value 
filters, and that the “Applies to” text is omitted when the filter is `null`, 
since the alert applies to all run types. The existing translation mock now 
preserves the interpolated `runTypes` value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to