choo121600 commented on code in PR #59738:
URL: https://github.com/apache/airflow/pull/59738#discussion_r2646116155


##########
airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts:
##########
@@ -0,0 +1,104 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import type { Locator, Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+export class BackfillPage extends BasePage {
+  public readonly backfillBanner: Locator;
+  public readonly backfillsTab: Locator;
+  public readonly cancelButton: Locator;
+  public readonly pauseButton: Locator;
+  public readonly triggerButton: Locator;
+
+  public constructor(page: Page) {
+    super(page);
+    this.backfillBanner = page.locator('div:has-text("Backfill in progress")');
+    this.backfillsTab = page.locator('a[href*="/backfills"]');
+    this.cancelButton = page.locator('button[aria-label*="ancel"]');
+    this.pauseButton = page.locator('button[aria-label*="ause"]');
+    this.triggerButton = page.locator('button[aria-label="Trigger 
Dag"]:has-text("Trigger")');
+  }
+
+  public static getDagDetailUrl(dagName: string): string {
+    return `/dags/${dagName}`;
+  }
+
+  public async clickCancelButton(): Promise<void> {
+    await this.cancelButton.waitFor({ state: "visible", timeout: 10_000 });
+    await this.cancelButton.click();
+    await this.page.waitForTimeout(1000);
+  }
+
+  public async clickPauseButton(): Promise<void> {
+    await this.pauseButton.waitFor({ state: "visible", timeout: 10_000 });

Review Comment:
   this



##########
airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts:
##########
@@ -0,0 +1,104 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import type { Locator, Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+export class BackfillPage extends BasePage {
+  public readonly backfillBanner: Locator;
+  public readonly backfillsTab: Locator;
+  public readonly cancelButton: Locator;
+  public readonly pauseButton: Locator;
+  public readonly triggerButton: Locator;
+
+  public constructor(page: Page) {
+    super(page);
+    this.backfillBanner = page.locator('div:has-text("Backfill in progress")');
+    this.backfillsTab = page.locator('a[href*="/backfills"]');
+    this.cancelButton = page.locator('button[aria-label*="ancel"]');
+    this.pauseButton = page.locator('button[aria-label*="ause"]');
+    this.triggerButton = page.locator('button[aria-label="Trigger 
Dag"]:has-text("Trigger")');
+  }
+
+  public static getDagDetailUrl(dagName: string): string {
+    return `/dags/${dagName}`;
+  }
+
+  public async clickCancelButton(): Promise<void> {
+    await this.cancelButton.waitFor({ state: "visible", timeout: 10_000 });
+    await this.cancelButton.click();
+    await this.page.waitForTimeout(1000);
+  }
+
+  public async clickPauseButton(): Promise<void> {
+    await this.pauseButton.waitFor({ state: "visible", timeout: 10_000 });
+    await this.pauseButton.click();
+    await this.page.waitForTimeout(1000);
+  }
+
+  public async createBackfill(dagName: string): Promise<void> {
+    await this.navigateTo(BackfillPage.getDagDetailUrl(dagName));
+
+    await this.triggerButton.waitFor({ state: "visible", timeout: 10_000 });

Review Comment:
   this part



##########
airflow-core/src/airflow/ui/tests/e2e/pages/BackfillPage.ts:
##########
@@ -0,0 +1,104 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import type { Locator, Page } from "@playwright/test";
+import { BasePage } from "tests/e2e/pages/BasePage";
+
+export class BackfillPage extends BasePage {
+  public readonly backfillBanner: Locator;
+  public readonly backfillsTab: Locator;
+  public readonly cancelButton: Locator;
+  public readonly pauseButton: Locator;
+  public readonly triggerButton: Locator;
+
+  public constructor(page: Page) {
+    super(page);
+    this.backfillBanner = page.locator('div:has-text("Backfill in progress")');
+    this.backfillsTab = page.locator('a[href*="/backfills"]');
+    this.cancelButton = page.locator('button[aria-label*="ancel"]');
+    this.pauseButton = page.locator('button[aria-label*="ause"]');
+    this.triggerButton = page.locator('button[aria-label="Trigger 
Dag"]:has-text("Trigger")');
+  }
+
+  public static getDagDetailUrl(dagName: string): string {
+    return `/dags/${dagName}`;
+  }
+
+  public async clickCancelButton(): Promise<void> {
+    await this.cancelButton.waitFor({ state: "visible", timeout: 10_000 });
+    await this.cancelButton.click();
+    await this.page.waitForTimeout(1000);
+  }
+
+  public async clickPauseButton(): Promise<void> {
+    await this.pauseButton.waitFor({ state: "visible", timeout: 10_000 });
+    await this.pauseButton.click();
+    await this.page.waitForTimeout(1000);
+  }
+
+  public async createBackfill(dagName: string): Promise<void> {
+    await this.navigateTo(BackfillPage.getDagDetailUrl(dagName));
+
+    await this.triggerButton.waitFor({ state: "visible", timeout: 10_000 });
+    await this.triggerButton.click();
+
+    await this.page.waitForTimeout(1000);
+
+    const dialog = this.page.locator('[role="dialog"]');
+    const backfillRadio = dialog.locator('label:has-text("Backfill")');
+
+    await backfillRadio.waitFor({ state: "visible", timeout: 10_000 });

Review Comment:
   same



-- 
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