dididy commented on code in PR #5101:
URL: https://github.com/apache/zeppelin/pull/5101#discussion_r2466222340


##########
zeppelin-web-angular/e2e/models/notebook-action-bar-page.util.ts:
##########
@@ -0,0 +1,193 @@
+/*
+ * Licensed 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 { expect, Page } from '@playwright/test';
+import { NotebookActionBarPage } from './notebook-action-bar-page';
+
+export class NotebookActionBarUtil {
+  private page: Page;
+  private actionBarPage: NotebookActionBarPage;
+
+  constructor(page: Page) {
+    this.page = page;
+    this.actionBarPage = new NotebookActionBarPage(page);
+  }
+
+  async verifyTitleEditingFunctionality(expectedTitle?: string): Promise<void> 
{
+    await expect(this.actionBarPage.titleEditor).toBeVisible();
+    const titleText = await this.actionBarPage.getTitleText();
+    expect(titleText).toBeDefined();
+    expect(titleText.length).toBeGreaterThan(0);
+
+    if (expectedTitle) {
+      expect(titleText).toContain(expectedTitle);
+    }
+  }
+
+  async verifyRunAllWorkflow(): Promise<void> {
+    await expect(this.actionBarPage.runAllButton).toBeVisible();
+    await expect(this.actionBarPage.runAllButton).toBeEnabled();
+
+    await this.actionBarPage.clickRunAll();
+
+    // Check if confirmation dialog appears (it might not in some 
configurations)
+    try {
+      // Try multiple possible confirmation dialog selectors
+      const confirmSelector = this.page
+        .locator('nz-popconfirm button:has-text("OK"), .ant-popconfirm 
button:has-text("OK"), button:has-text("OK")')
+        .first();
+      await expect(confirmSelector).toBeVisible({ timeout: 2000 });
+      await confirmSelector.click();
+      await expect(confirmSelector).not.toBeVisible();
+    } catch (error) {
+      // If no confirmation dialog appears, that's also valid behavior
+      console.log('Run all executed without confirmation dialog');
+    }

Review Comment:
   e92d5ae
   I’ve removed the try/catch blocks from tests that should fail instead of 
continuing. Please let me know if I missed any cases.



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