Skip to content

test(e2e): cover devices page#43

Merged
vitramir merged 1 commit into
mainfrom
noa/issue-42
Apr 11, 2026
Merged

test(e2e): cover devices page#43
vitramir merged 1 commit into
mainfrom
noa/issue-42

Conversation

@casey-brooks

Copy link
Copy Markdown
Contributor

Summary

  • add device API helpers for create/list/delete in e2e console API
  • add devices e2e specs for empty state, JWT display, and delete confirmation with cleanup

Testing

  • npm run lint
  • npm run typecheck
  • npm test
  • npm run build

Closes #42

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • npm run lint (no errors)
  • npm run typecheck
  • npm test (passed: 35, failed: 0, skipped: 0)
  • npm run build

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean PR — API helpers and test scenarios fully match the issue spec and follow established e2e patterns. One minor nit on dead code in the delete test. Approving as-is; the nit can be addressed at your discretion.

Comment thread test/e2e/devices.spec.ts
const deviceName = buildDeviceName('delete');
const created = await createDevice(page, { name: deviceName });
const deviceId = created.device?.meta?.id;
if (!deviceId) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] createDevice already throws if device.meta.id is missing (line 528 of console-api.ts), so this extraction and guard are redundant — deviceId is never used after the check. Remove the dead code:

test('deletes a device with confirmation', async ({ page }) => {
  const deviceName = buildDeviceName('delete');
  await createDevice(page, { name: deviceName });

  await page.goto('/devices');
  // ...

@vitramir
vitramir merged commit 136457c into main Apr 11, 2026
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add e2e tests for Devices page (Port Exposure)

3 participants