mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 17:36:15 -08:00
fix(e2e): use mat-button-toggle value selectors for playlist type selection
mat-button-toggle elements inside a group render their internal buttons
with role="radio", not role="button", so getByRole('button') selectors
fail. Switch to attribute selectors targeting the value attribute instead.
https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
This commit is contained in:
3 files changed
+3
-3
No files matched your search
@@ -12,7 +12,7 @@ test('basic test', async ({ page }) => {
|
||||
// Upload playlist test
|
||||
await page.getByRole('button', { name: 'Add playlist' }).click();
|
||||
const dialog = page.locator('mat-dialog-container');
|
||||
await dialog.getByRole('button', { name: 'Add via file upload' }).click();
|
||||
await dialog.locator('mat-button-toggle[value="file"]').click();
|
||||
await page.setInputFiles('input[type="file"]', fixturePath);
|
||||
await page.waitForURL(/\/workspace\/playlists\/.+\/all$/);
|
||||
await expect(page.getByText('test.m3u')).toBeVisible();
|
||||
|
||||
Reference in new issue
Block a user