diff --git a/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-in-dark-mode-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-in-dark-mode-1-snap.png new file mode 100644 index 0000000000..c54fad11d3 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-in-dark-mode-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-1-snap.png index 4e5bcd31ea..017517a67c 100644 Binary files a/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-1-snap.png and b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-in-dark-mode-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-in-dark-mode-1-snap.png new file mode 100644 index 0000000000..e2b460f655 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-in-dark-mode-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-over-inverse-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-over-inverse-1-snap.png index b1ba4532a3..88a30a809f 100644 Binary files a/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-over-inverse-1-snap.png and b/src/__screenshot_tests__/__image_snapshots__/form-select-screenshot-test-tsx-select-display-all-options-with-native-select-over-inverse-1-snap.png differ diff --git a/src/__screenshot_tests__/form-select-screenshot-test.tsx b/src/__screenshot_tests__/form-select-screenshot-test.tsx index 86c806d700..43dbbc4918 100644 --- a/src/__screenshot_tests__/form-select-screenshot-test.tsx +++ b/src/__screenshot_tests__/form-select-screenshot-test.tsx @@ -151,6 +151,21 @@ test('Select - display all options', async () => { expect(image).toMatchImageSnapshot(); }); +test('Select - display all options in dark mode', async () => { + const page = await openStoryPage({ + id: 'components-select--controlled', + isDarkMode: true, + device: 'DESKTOP', + }); + + const field = await screen.findByRole('button', {name: 'Select a fruit'}); + await field.click(); + + const image = await page.screenshot(); + + expect(image).toMatchImageSnapshot(); +}); + test('Select - display all options over inverse', async () => { const page = await openStoryPage({ id: 'components-select--controlled', @@ -181,6 +196,22 @@ test('Select - display all options with native select', async () => { expect(image).toMatchImageSnapshot(); }); +test('Select - display all options with native select in dark mode', async () => { + const page = await openStoryPage({ + id: 'components-select--controlled', + device: 'DESKTOP', + isDarkMode: true, + args: {native: true}, + }); + + const field = await screen.findByLabelText('Select a fruit'); + await field.click(); + + const image = await page.screenshot(); + + expect(image).toMatchImageSnapshot(); +}); + test('Select - display all options with native select over inverse', async () => { const page = await openStoryPage({ id: 'components-select--controlled', diff --git a/src/select.tsx b/src/select.tsx index e7f3f0992c..a9b5af637d 100644 --- a/src/select.tsx +++ b/src/select.tsx @@ -365,7 +365,9 @@ const Select: React.FC = ({ ))}