Group the device overview by hypervisor, Hetzner, physical and unassigned devices
Rust development slice / linux (push) Failing after 7s

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 22:57:02 +01:00
co-authored by Claude Fable 5.2
parent dbfa76184d
commit e29257b808
8 changed files with 352 additions and 104 deletions
+13 -8
View File
@@ -441,9 +441,10 @@ test('shows real VM hosts and the Hetzner placeholder without adding a device',
});
await page.goto(origin + '/#geraete');
const vmRow = page.getByRole('row').filter({ has: page.getByRole('button', { name: vm.hostname }) });
await expect(vmRow).toContainText('Hetzner Cloud');
await expect(vmRow).toContainText('Platzhalter');
const block = (name: string) => page.getByRole('group', { name });
await expect(block('Hetzner Cloud')).toContainText('Platzhalter');
await expect(block('Hetzner Cloud').getByRole('button', { name: vm.hostname })).toBeVisible();
await expect(block('Hypervisor pve-01')).toContainText('Keine zugeordneten virtuellen Maschinen');
await expect(page.getByRole('button', { name: 'Hetzner Cloud' })).toHaveCount(0);
await expect(page.locator('.fleet-table tbody tr')).toHaveCount(2);
await page.getByRole('button', { name: vm.hostname }).click();
@@ -455,10 +456,14 @@ test('shows real VM hosts and the Hetzner placeholder without adding a device',
await expect(page.getByText('Hypervisor zugeordnet.', { exact: true })).toBeVisible();
await page.getByRole('button', { name: 'Zur Geräteliste' }).click();
await page.setViewportSize({ width: 390, height: 844 });
const hostLink = vmRow.getByRole('link', { name: pve.hostname });
await expect(hostLink).toBeVisible();
await expect(vmRow).not.toContainText('Hetzner Cloud');
await hostLink.click();
const hostBlock = block('Hypervisor pve-01');
await expect(hostBlock.locator('tbody tr')).toHaveCount(2);
await expect(hostBlock.locator('tbody tr').first()).toContainText(pve.hostname);
await expect(hostBlock.locator('tr.guest')).toContainText(vm.hostname);
await expect(hostBlock.locator('tr.guest')).toContainText('manuell zugeordnet');
await expect(hostBlock).toContainText('1 virtuelle Maschine');
await expect(block('Hetzner Cloud')).toHaveCount(0);
await hostBlock.getByRole('link', { name: pve.hostname }).click();
await expect(page.getByRole('heading', { name: pve.hostname })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Virtuelle Maschinen und Container' })).toBeVisible();
await expect(page.getByRole('row').filter({ hasText: 'alpine-ct' })).toContainText('Container');
@@ -473,5 +478,5 @@ test('shows real VM hosts and the Hetzner placeholder without adding a device',
await page.getByRole('button', { name: 'Zuordnung speichern' }).click();
await expect(page.getByText('Hostzuordnung entfernt.', { exact: true })).toBeVisible();
await page.getByRole('button', { name: 'Zur Geräteliste' }).click();
await expect(vmRow).toContainText('Hetzner Cloud');
await expect(block('Hetzner Cloud').getByRole('button', { name: vm.hostname })).toBeVisible();
});