Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cypress/e2e/integration/device/delete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ describeWhenNotCloud('Test Device Deletion', () => {
body: empty.response
}).as('get-devices-after-delete')

// Click delete and confirm
cy.get('mat-cell').contains('delete').click()
// Scope deletion to this device's row (matched by hostname/IP) so that
// multiple devices sharing the friendly name are not affected (ISOLATE=N).
cy.contains('mat-row', Cypress.env('DEVICE')).find('mat-cell').contains('delete').click()
cy.get('button').contains('Yes').click()

// Wait for delete and list refresh requests
Expand All @@ -94,8 +95,8 @@ describeWhenNotCloud('Test Device Deletion', () => {
})
cy.wait('@get-devices-after-delete').its('response.statusCode').should('eq', httpCodes.SUCCESS)

// Verify the device no longer appears in the list
// Only this device (matched by hostname/IP) must be gone; under ISOLATE=N other
// devices may still carry the shared 'Test Device' friendly name.
cy.contains(Cypress.env('DEVICE')).should('not.exist')
cy.contains('Test Device').should('not.exist')
})
})
Loading