From 04c594a064a1cc542ba8154e9c27b92ec0c416f8 Mon Sep 17 00:00:00 2001 From: Andrea Vesterhus Date: Tue, 25 Jun 2024 21:39:09 +0200 Subject: [PATCH 1/5] fix: sidebar collapse --- e2e/tests/plugin-view_selector-car_garage.spec.ts | 4 ++-- packages/dm-core-plugins/src/view_selector/Sidebar.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/tests/plugin-view_selector-car_garage.spec.ts b/e2e/tests/plugin-view_selector-car_garage.spec.ts index f1d1aa73f..65da2eeb8 100644 --- a/e2e/tests/plugin-view_selector-car_garage.spec.ts +++ b/e2e/tests/plugin-view_selector-car_garage.spec.ts @@ -13,7 +13,7 @@ test('View selector - car garage', async ({ page }) => { await test.step('Collapse and expand sidebar', async () => { await page.getByRole('tab', { name: 'Self' }).click() - await page.getByRole('button', { name: 'Collapse' }).click() + await page.getByRole('button', { name: 'Collapse sidebar' }).click() await expect(page.getByRole('tab', { name: 'Self' })).not.toBeVisible() await expect(page.getByRole('tab', { name: 'Audi' })).not.toBeVisible() await expect(page.getByRole('tab', { name: 'Volvo' })).not.toBeVisible() @@ -23,7 +23,7 @@ test('View selector - car garage', async ({ page }) => { ) await page.getByRole('tab').first().click() await expect(page.getByLabel('Name')).toHaveValue('CarGarage') - await page.getByRole('button', { name: 'Expand' }).click() + await page.getByRole('button', { name: 'Expand sidebar' }).click() await expect(page.getByRole('tab', { name: 'Self' })).toBeVisible() await expect(page.getByRole('tab', { name: 'Audi' })).toBeVisible() await expect(page.getByRole('tab', { name: 'Volvo' })).toBeVisible() diff --git a/packages/dm-core-plugins/src/view_selector/Sidebar.tsx b/packages/dm-core-plugins/src/view_selector/Sidebar.tsx index c611a2a6c..7e856b62c 100644 --- a/packages/dm-core-plugins/src/view_selector/Sidebar.tsx +++ b/packages/dm-core-plugins/src/view_selector/Sidebar.tsx @@ -115,6 +115,7 @@ export const Sidebar = (props: {