fixed arr ui spec for the media managers page

This commit is contained in:
Flaminel committed 2026-10-28 22:27:42 +02:00
1 parent 8ce295a21f
commit 6a29b7033e
1 file changed
+7 -7
+7 -7
View File
@@ -4,9 +4,9 @@ import { loginAndGotoSettings } from '../helpers/ui';
// Behavior-parity spec for the Arr (Sonarr) instance create/edit modal.
test.describe('Arr Settings UI', () => {
test('required fields gate the modal Save button', async ({ page }) => {
await loginAndGotoSettings(page, 'arr/sonarr');
await page.getByRole('button', { name: 'Add Instance' }).click();
const modal = page.getByRole('dialog', { name: 'Add Instance' });
await loginAndGotoSettings(page, 'arr');
await page.getByRole('button', { name: 'Sonarr', exact: true }).click();
const modal = page.getByRole('dialog', { name: 'Add Sonarr Instance' });
await expect(modal).toBeVisible();
const save = modal.getByRole('button', { name: 'Save' });
@@ -21,16 +21,16 @@ test.describe('Arr Settings UI', () => {
});
test('create then delete an instance round-trip', async ({ page }) => {
await loginAndGotoSettings(page, 'arr/sonarr');
await page.getByRole('button', { name: 'Add Instance' }).click();
const modal = page.getByRole('dialog', { name: 'Add Instance' });
await loginAndGotoSettings(page, 'arr');
await page.getByRole('button', { name: 'Sonarr', exact: true }).click();
const modal = page.getByRole('dialog', { name: 'Add Sonarr Instance' });
await modal.locator('app-input').first().locator('input').fill('E2E Sonarr RT');
await modal.locator('app-input').filter({ hasText: 'URL' }).first().locator('input').fill('http://localhost:9999');
await modal.locator('app-input').filter({ hasText: 'API Key' }).locator('input').fill('0123456789abcdef0123456789abcdef');
await modal.getByRole('button', { name: 'Save' }).click();
const row = page.locator('.instance-row').filter({ hasText: 'E2E Sonarr RT' });
const row = page.locator('.item-row').filter({ hasText: 'E2E Sonarr RT' });
await expect(row).toBeVisible({ timeout: 10_000 });
await row.getByRole('button', { name: 'Delete' }).click();