Skip to content

Commit

Permalink
fixed id
Browse files Browse the repository at this point in the history
  • Loading branch information
DAQEM committed Jan 10, 2024
1 parent 87c1e4e commit cd4d94a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<TableBodyRow
on:click={() => toggleRow(i)}
class="cursor-pointer"
id={device.ipAddress?.replace(/\./g, '')}
id={`device-${device.ipAddress?.replace(/\./g, '-')}`}
>
<TableBodyCell>
<img
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import deviceApi from '$lib/api/device_api';
import type { Device } from '$lib/types/device_types';
import type { PageServerLoad } from './$types';

export const load = (async ({params}) => {
Expand Down
6 changes: 4 additions & 2 deletions Services/AdminWebApp/tests/device/add/add_device_e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ test.describe.serial('Add Device', () => {
test('Device should be added to table', async ({ page }) => {
await page.goto('/device');

const device = await page.innerText(`#${ipAddress.replace(/\./g, '')} > td:nth-child(3)`);
const device = await page.innerText(
`#device-${ipAddress.replace(/\./g, '-')} > td:nth-child(3)`
);
expect(device).toBe(ipAddress);
});
});
});

0 comments on commit cd4d94a

Please sign in to comment.