diff --git a/packages/core/src/components/dropdown/test/filter/dropdown.e2e.ts b/packages/core/src/components/dropdown/test/filter/dropdown.e2e.ts index 5488cb1cf..2a417af88 100644 --- a/packages/core/src/components/dropdown/test/filter/dropdown.e2e.ts +++ b/packages/core/src/components/dropdown/test/filter/dropdown.e2e.ts @@ -96,4 +96,30 @@ test.describe.parallel('tds-dropdown-filter', () => { await expect(inputElement).toHaveValue(''); // Ensure input is cleared await expect(resetButton).toBeHidden(); // Reset button should hide again after clearing the input }); + + test('toggle dropdown visibility and select option two', async ({ page }) => { + await page.goto(componentTestPath); + + const inputElement = page.getByRole('textbox'); + const dropdownListElementTwoButton = page + .locator('tds-dropdown-option') + .filter({ hasText: /Option 2/ }); + + const dropdownButton = page.locator('tds-icon[aria-label="Open/Close dropdown"]'); + + // Focus on the input element and start typing + await expect(dropdownListElementTwoButton).toBeHidden(); + await inputElement.click(); + await expect(inputElement).toBeVisible(); + + // Click the dropdown button to open the dropdown list + await dropdownListElementTwoButton.click(); + await inputElement.click(); + // Click the dropdown button to close the dropdown list + await dropdownButton.click(); + // Click the dropdown button to open the dropdown list + await dropdownButton.click(); + + await expect(page).toHaveScreenshot({ maxDiffPixels: 0 }); + }); }); diff --git a/packages/core/src/components/dropdown/test/filter/dropdown.e2e.ts-snapshots/tds-dropdown-filter-Select-option-from-dropdown-list-and-check-if-the-input-value-is-updated-1-linux.png b/packages/core/src/components/dropdown/test/filter/dropdown.e2e.ts-snapshots/tds-dropdown-filter-Select-option-from-dropdown-list-and-check-if-the-input-value-is-updated-1-linux.png new file mode 100644 index 000000000..89f330192 Binary files /dev/null and b/packages/core/src/components/dropdown/test/filter/dropdown.e2e.ts-snapshots/tds-dropdown-filter-Select-option-from-dropdown-list-and-check-if-the-input-value-is-updated-1-linux.png differ diff --git a/packages/core/src/components/dropdown/test/multiselect-filter/dropdown.e2e.ts-snapshots/tds-dropdown-multiselect-filter-When-focusing-on-the-input-it-should-clear-itself-1-darwin.png b/packages/core/src/components/dropdown/test/multiselect-filter/dropdown.e2e.ts-snapshots/tds-dropdown-multiselect-filter-When-focusing-on-the-input-it-should-clear-itself-1-darwin.png deleted file mode 100644 index 1575420c3..000000000 Binary files a/packages/core/src/components/dropdown/test/multiselect-filter/dropdown.e2e.ts-snapshots/tds-dropdown-multiselect-filter-When-focusing-on-the-input-it-should-clear-itself-1-darwin.png and /dev/null differ