-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add E2E tests for DAG Calendar tab functionality (#59544) #60673
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
base: main
Are you sure you want to change the base?
Add E2E tests for DAG Calendar tab functionality (#59544) #60673
Conversation
- Create DagCalendarPage with calendar-specific test methods - Add test spec covering calendar render, run status display, and filtering - Add data-testid attributes to Calendar components for reliable testing
- Create DagCalendarPage with calendar-specific test methods - Add test spec covering calendar render, run status display, and filtering - Add data-testid attributes to Calendar components for reliable testing
- Reorder data-testid attribute alphabetically in Calendar.tsx - Reorder methods alphabetically in DagCalendarPage.ts - Add blank lines for readability - Use numeric separator (60_000 instead of 60000) - Fix comment spacing
- Fix jsx-props alphabetical order in Calendar.tsx - Reorder methods alphabetically in DagCalendarPage.ts (clickDay before verifyDayRun) - Add blank lines between statements for readability - Use array destructuring for split operations - Fix numeric separator (60 * 1000 instead of 60000) - Remove unused todayDateString variable - Remove incorrect navigate() call
- Remove duplicate data-testid in Calendar.tsx - Remove Calendar tab visibility check in navigateToCalendar (we're already on calendar page)
- Remove date-specific cell lookups that were failing - Just verify calendar renders with cells visible - Verify filtering button exists and calendar updates - Avoids timezone and date-specific issues in CI
- Change indentation to 2 spaces in test files - Fix Props type indentation in CalendarCell.tsx
|
@vighneshtule static checks failing can you look into this? |
- Remove duplicate test setup code that was misplaced - Apply 2-space indentation formatting to match project standards
|
@vatsrahul1001 I have resolved the checks.. Thank You |
Thanks @vighneshtule I will review soon |
| this.monthYearHeader = page.getByTestId("calendar-header-date"); | ||
| } | ||
|
|
||
| public async clickDay(date: string): Promise<void> { |
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.
we are not using this in 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.
Lets add test for this
| await expect(this.page.getByRole("button", { name: "Hourly" })).toBeVisible(); | ||
| } | ||
|
|
||
| public async verifyDayRun(date: string, status: "failed" | "running" | "success"): Promise<void> { |
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.
We are not using this in 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.
Maybe we can add a test for this
test("verify tooltip shows run details on hover", async () => {
await dagCalendarPage.navigateToCalendar(testDagId);
const todayDate = new Date().toISOString().split('T')[0];
await dagCalendarPage.verifyDayRun(todayDate, "success");
});
| await expect(calendarCells.first()).toBeVisible(); | ||
| }); | ||
|
|
||
| test("verify status filtering", 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.
Filter verification is too weak
This only checks cells still visible:
- Should verify filtering actually changed data, e.g.:Count cells before/after
- Check specific run is no longer visible
- Verify URL or UI state changed
| @@ -0,0 +1,110 @@ | |||
| /*! | |||
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 test checks color coding
|
@vighneshtule, how are we progressing on addressing review comments? |
Add E2E tests for DAG Calendar tab functionality
closes: #59544
Description
Adds E2E tests to verify the Calendar tab on DAG detail pages, covering calendar rendering, run status display, and filtering functionality.
Changes
New Files:
Modified Files:
data-testid="calendar-cell"anddata-dateattributesdata-testid="calendar-header-date"Tests Coverage
Testing