Show the detected machine type in device inventory

This commit is contained in:
2026-11-18 17:39:43 +01:00
parent 6963ad332c
commit c599baa494
9 changed files with 231 additions and 16 deletions
+8 -2
View File
@@ -56,7 +56,7 @@ test('creates and renames a customer, opens its inventory, and hides editing for
if (!customer) throw new Error('Kunde fehlt im Testbestand');
return route.fulfill({ json: listing([{
tenant_id: customerId, customer_name: customer.name, asset_id: 'device-1', agent_id: 'agent-1',
lifecycle: 'current', status: 'online', hostname: 'NORD-PC', os: 'Linux'
lifecycle: 'current', status: 'online', hostname: 'NORD-PC', device_type: 'hypervisor', os: 'Proxmox VE'
}]) });
}
if (method === 'POST' || method === 'PATCH') {
@@ -101,7 +101,13 @@ test('creates and renames a customer, opens its inventory, and hides editing for
await expect(page.getByRole('heading', { name: 'Geräte', exact: true })).toBeVisible();
await expect(page.getByRole('combobox', { name: 'Kunde', exact: true })).toHaveValue(customerId);
await expect(page.getByRole('combobox', { name: 'Kunde im Gerätebestand', exact: true })).toHaveValue(customerId);
await expect(page.getByRole('row').filter({ hasText: 'NORD-PC' })).toContainText('Nord GmbH');
const device = page.getByRole('row').filter({ hasText: 'NORD-PC' });
await expect(device).toContainText('Nord GmbH');
const headers = page.getByRole('columnheader');
await expect(headers.nth(1)).toHaveText('Hostname');
await expect(headers.nth(2)).toHaveText('Type');
await expect(device.getByRole('cell').nth(2)).toHaveText('hypervisor');
await expect(device.getByRole('cell').nth(3)).toHaveText('Proxmox VE');
const navigation = page.getByRole('navigation', { name: 'Hauptnavigation' });
await navigation.getByRole('link', { name: 'Aufträge', exact: true }).click();
await expect(page.getByRole('combobox', { name: 'Kunde', exact: true })).toHaveValue(customerId);