Просмотр исходного кода

fix: update custom sidebar test to verify edit_note icon visibility

Shun Miyazawa 2 месяцев назад
Родитель
Сommit
521a8c15bf
1 измененных файлов с 7 добавлено и 3 удалено
  1. 7 3
      apps/app/playwright/50-sidebar/access-to-sidebar.spec.ts

+ 7 - 3
apps/app/playwright/50-sidebar/access-to-sidebar.spec.ts

@@ -29,9 +29,13 @@ test.describe('Access to sidebar', () => {
   test('Successfully access to custom sidebar', async ({ page }) => {
   test('Successfully access to custom sidebar', async ({ page }) => {
     await page.getByTestId('grw-sidebar-nav-primary-custom-sidebar').click();
     await page.getByTestId('grw-sidebar-nav-primary-custom-sidebar').click();
     await expect(page.getByTestId('grw-sidebar-contents')).toBeVisible();
     await expect(page.getByTestId('grw-sidebar-contents')).toBeVisible();
-    await expect(
-      page.locator('.grw-sidebar-content-header > h3').locator('a'),
-    ).toBeVisible();
+    await expect(page.locator('.grw-sidebar-content')).toBeVisible();
+
+    // Check if edit_note icon is visible within the button
+    const editNoteIcon = page
+      .locator('.grw-custom-sidebar-content button .material-symbols-outlined')
+      .filter({ hasText: 'edit_note' });
+    await expect(editNoteIcon).toBeVisible();
   });
   });
 
 
   test('Successfully access to GROWI Docs page', async ({ page }) => {
   test('Successfully access to GROWI Docs page', async ({ page }) => {