From 9b409ac3b1b932cab56feaaa5c573ec2232cc13e Mon Sep 17 00:00:00 2001 From: lim-chris Date: Tue, 11 Aug 2026 15:56:22 +0000 Subject: [PATCH] refactor(e2e): support delete multiple devices for console --- cypress/e2e/integration/device/delete.spec.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/integration/device/delete.spec.ts b/cypress/e2e/integration/device/delete.spec.ts index 8a431dad8..0ad8d3d58 100644 --- a/cypress/e2e/integration/device/delete.spec.ts +++ b/cypress/e2e/integration/device/delete.spec.ts @@ -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 @@ -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') }) })