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


##########
zeppelin-web-angular/e2e/tests/home/home-page-note-operations.spec.ts:
##########
@@ -0,0 +1,250 @@
+/*
+ * 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, test } from '@playwright/test';
+import { HomePage } from '../../models/home-page';
+import { addPageAnnotationBeforeEach, performLoginIfRequired, 
waitForZeppelinReady, PAGES } from '../../utils';
+
+addPageAnnotationBeforeEach(PAGES.WORKSPACE.HOME);
+
+test.describe('Home Page Note Operations', () => {
+  let homePage: HomePage;
+
+  test.beforeEach(async ({ page }) => {
+    homePage = new HomePage(page);
+    await page.goto('/');
+    await waitForZeppelinReady(page);
+    await performLoginIfRequired(page);
+    await page.waitForSelector('zeppelin-node-list', { timeout: 15000 });
+  });
+
+  test.describe('Given note operations are available', () => {
+    test('When note list loads Then should show note action buttons on hover', 
async ({ page }) => {
+      const notesExist = await page.locator('.node .file').count();
+
+      if (notesExist > 0) {
+        const firstNote = page.locator('.node .file').first();
+        await firstNote.hover();
+
+        await expect(page.locator('.file .operation a[nztooltiptitle*="Rename 
note"]').first()).toBeVisible();
+        await expect(page.locator('.file .operation a[nztooltiptitle*="Clear 
output"]').first()).toBeVisible();
+        await expect(page.locator('.file .operation a[nztooltiptitle*="Move 
note to Trash"]').first()).toBeVisible();
+      } else {
+        console.log('No notes available for testing operations');
+      }
+    });
+
+    test('When hovering over note actions Then should show tooltip 
descriptions', async ({ page }) => {
+      const noteExists = await page
+        .locator('.node .file')
+        .first()
+        .isVisible()
+        .catch(() => false);
+
+      if (noteExists) {
+        const firstNote = page.locator('.node .file').first();
+        await firstNote.hover();
+
+        const renameIcon = page.locator('.file .operation 
a[nztooltiptitle*="Rename note"]').first();
+        const clearIcon = page.locator('.file .operation 
a[nztooltiptitle*="Clear output"]').first();
+        const deleteIcon = page.locator('.file .operation 
a[nztooltiptitle*="Move note to Trash"]').first();
+
+        await expect(renameIcon).toBeVisible();
+        await expect(clearIcon).toBeVisible();
+        await expect(deleteIcon).toBeVisible();
+      }

Review Comment:
   I’ve applied the change.



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