Plan device actions exclusively as approved scripts and provide reboot library revisions
This commit is contained in:
@@ -138,7 +138,9 @@ test('removes the confirmed historical installation and keeps its successor', as
|
||||
await page.route(origin + '/api/v1/**', async r => {
|
||||
const req = r.request(), url = new URL(req.url());
|
||||
const historical = { ...device, agent_id: old, lifecycle: revoked ? 'revoked' : 'replaced', status: 'offline' };
|
||||
const successor = { ...device, agent_id: active, lifecycle: 'current', status: 'online' };
|
||||
const successor = { ...device, agent_id: active, lifecycle: 'current', status: 'online', source_id: 'windows.base',
|
||||
capabilities: ['windows.base/1', 'rmm.sync.v1', 'run_script', 'script.powershell/1', 'script.powershell.process_remote_signed/1',
|
||||
'script.full_maintenance/1', 'helper.system.v1', 'system:run_script'] };
|
||||
if (url.pathname === '/api/v1/tenants') return r.fulfill({ json: listing([customer]) });
|
||||
if (url.pathname === '/api/v1/devices' || url.pathname === path.slice(0, path.lastIndexOf('/'))) {
|
||||
return r.fulfill({ json: listing(url.searchParams.get('view') === 'history' ? (deleted ? [] : [historical]) : [successor]) });
|
||||
@@ -191,6 +193,7 @@ test('removes the confirmed historical installation and keeps its successor', as
|
||||
await page.getByRole('button', { name: 'Bestand' }).click();
|
||||
await page.getByRole('button', { name: 'NORD-PC' }).click();
|
||||
await expect(page).toHaveURL(new RegExp(active + '$'));
|
||||
await expect(page.getByText('PowerShell als Dienstkonto und als Administrator (SYSTEM)')).toBeVisible();
|
||||
await page.getByText('Gerät verwalten', { exact: true }).click();
|
||||
await expect(page.getByRole('button', { name: 'Kopplung löschen' })).toHaveCount(0);
|
||||
await expect(page.getByText('Geräteidentität widerrufen', { exact: true })).toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user