Skip to content

Commit ce3fec4

Browse files
feat(small): Add data-testid to SpotifyDeviceSelector (#9548)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
1 parent cdea374 commit ce3fec4

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

components/SpotifyDeviceSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const SpotifyDeviceSelector = ({
3232
'&:hover': { backgroundColor: 'grey.800' },
3333
}}
3434
aria-label="Select playback device"
35-
data-testid="spotify-device-selector-button"
35+
data-testid="spotify-device-select"
3636
>
3737
<SpeakerIcon fontSize="small" />
3838
</IconButton>
@@ -59,7 +59,7 @@ const SpotifyDeviceSelector = ({
5959
key={device.id}
6060
onClick={() => onDeviceSelect(device.id)}
6161
selected={device.is_active}
62-
data-testid={`spotify-device-selector-item-${device.id}`}
62+
data-testid={`spotify-device-select-option-${device.id}`}
6363
>
6464
{device.name} {device.is_active && '✓'}
6565
</MenuItem>

tests/playwright/vrt-components.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ test.describe('Component-Specific VRT', () => {
132132
],
133133
})
134134

135-
const selectorButton = dashboardPage.getByTestId(
136-
'spotify-device-selector-button'
137-
)
135+
const selectorButton = dashboardPage.getByTestId('spotify-device-select')
138136
await expect(selectorButton).toBeVisible({
139137
timeout: VRT_TIMEOUTS.STANDARD,
140138
})

0 commit comments

Comments
 (0)