iharsh02 commented on code in PR #59633:
URL: https://github.com/apache/airflow/pull/59633#discussion_r2653855495
##########
airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts:
##########
@@ -76,26 +76,59 @@ export class BackfillPage extends BasePage {
const runsMessage = this.page.locator("text=/\\d+ runs? will be
triggered|No runs matching/");
- await expect(runsMessage).toBeVisible({ timeout: 10_000 });
+ await expect(runsMessage).toBeVisible({ timeout: 20_000 });
await expect(this.backfillRunButton).toBeEnabled({ timeout: 5000 });
await this.backfillRunButton.click();
}
- // Get backfill details
- public async getBackfillDetails(rowIndex: number = 0): Promise<{
+ public async findBackfillByDateRange(fromDate: string, toDate: string):
Promise<number | null> {
+ const headers = this.page.locator("table thead th");
+ const headerTexts = await headers.allTextContents();
+ const columnMap = new Map<string, number>(headerTexts.map((text, index) =>
[text.trim(), index]));
+
+ const fromDateIndex = columnMap.get("From") ?? 0;
+ const toDateIndex = columnMap.get("To") ?? 1;
+
+ const rows = this.page.locator("table tbody tr");
+
+ await rows.first().waitFor({ state: "visible", timeout: 10_000 });
+ const rowCount = await rows.count();
+
+ for (let i = 0; i < rowCount; i++) {
+ const row = rows.nth(i);
+ const cells = row.locator("td");
+
+ const rowFromDate = (await cells.nth(fromDateIndex).textContent()) ?? "";
+ const rowToDate = (await cells.nth(toDateIndex).textContent()) ?? "";
+
+ if (
+ rowFromDate.trim().slice(0, 10) === fromDate.slice(0, 10) &&
+ rowToDate.trim().slice(0, 10) === toDate.slice(0, 10)
+ ) {
+ return i;
+ }
+ }
+
+ return null;
+ }
+
+ public async getBackfillDetails(
Review Comment:
@vatsrahul1001
Filtering the backfill details using the date range (from/to) that was used
to create the backfill, since there is no other unique identifier.
The issue is that when multiple backfills are created within the same DAG
(testidconfig), multiple log entries are generated.
`Verify backfill details display: date range, status, created time` test
need to filter the logs to identify the correct entry.
if you like me do go with different approach please help
--
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]