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 12bce1c commit 87c1e4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Services/AdminWebApp/src/lib/components/DevicesTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
</TableBodyRow>
{/if}
{#each devices as device, i}
<TableBodyRow on:click={() => toggleRow(i)} class="cursor-pointer" id="{device.ipAddress?.replace(/\./g, '-')}">
<TableBodyRow
on:click={() => toggleRow(i)}
class="cursor-pointer"
id={device.ipAddress?.replace(/\./g, '')}
>
<TableBodyCell>
<img
src={'https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/UbuntuCoF.svg/768px-UbuntuCoF.svg.png'}
Expand Down
2 changes: 1 addition & 1 deletion Services/AdminWebApp/tests/device/add/add_device_e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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(`#${ipAddress.replace(/\./g, '')} > td:nth-child(3)`);
expect(device).toBe(ipAddress);
});
});

0 comments on commit 87c1e4e

Please sign in to comment.