From a8e436ea1d440761c716261321204373bf08a8a5 Mon Sep 17 00:00:00 2001 From: jackkav Date: Fri, 4 Aug 2023 22:30:00 +0200 Subject: [PATCH] fix prerelease tests --- .../tests/prerelease/debug-sidebar-interactions.test.ts | 5 ++--- .../tests/prerelease/plugins-interactions.test.ts | 2 +- .../src/ui/components/dropdowns/workspace-dropdown.tsx | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/insomnia-smoke-test/tests/prerelease/debug-sidebar-interactions.test.ts b/packages/insomnia-smoke-test/tests/prerelease/debug-sidebar-interactions.test.ts index b5ab729a0..d5ff71012 100644 --- a/packages/insomnia-smoke-test/tests/prerelease/debug-sidebar-interactions.test.ts +++ b/packages/insomnia-smoke-test/tests/prerelease/debug-sidebar-interactions.test.ts @@ -30,7 +30,6 @@ test.describe('Debug-Sidebar', async () => { await page.getByRole('button', { name: 'example grpc' }).click(); await page.locator('[data-testid="Dropdown-example-grpc"]').click(); await page.getByRole('menuitem', { name: 'Settings' }).click(); - await page.getByRole('tab', { name: 'Preview' }).click(); // Close settings modal await page.locator('.app').press('Escape'); }); @@ -61,8 +60,8 @@ test.describe('Debug-Sidebar', async () => { }); test('Open properties of the collection', async ({ page }) => { - await page.getByRole('button', { name: 'simple' }).click(); - await page.getByRole('menuitem', { name: 'Collection Settings' }).click(); + await page.getByTestId('workspace-dropdown').locator('button').click(); + await page.getByRole('menuitem', { name: 'Settings' }).click(); await page.getByText('Collection Settings').click(); }); diff --git a/packages/insomnia-smoke-test/tests/prerelease/plugins-interactions.test.ts b/packages/insomnia-smoke-test/tests/prerelease/plugins-interactions.test.ts index b4156946f..b05c0a4a6 100644 --- a/packages/insomnia-smoke-test/tests/prerelease/plugins-interactions.test.ts +++ b/packages/insomnia-smoke-test/tests/prerelease/plugins-interactions.test.ts @@ -26,7 +26,7 @@ test.describe('Plugins', async () => { await expect(page.locator('.app')).toContainText('This is a sample server Petstore server'); // Open declarative config - await page.getByRole('button', { name: 'New Document' }).click(); + await page.getByTestId('workspace-dropdown').locator('button').click(); await page.getByRole('menuitem', { name: 'Declarative Config (Legacy)' }).click(); // Check for declarative config contents await page.getByText('_format_version').click(); diff --git a/packages/insomnia/src/ui/components/dropdowns/workspace-dropdown.tsx b/packages/insomnia/src/ui/components/dropdowns/workspace-dropdown.tsx index 2682a28b9..54771ec41 100644 --- a/packages/insomnia/src/ui/components/dropdowns/workspace-dropdown.tsx +++ b/packages/insomnia/src/ui/components/dropdowns/workspace-dropdown.tsx @@ -106,6 +106,7 @@ export const WorkspaceDropdown: FC = () => { return ( <>