// The Lucia project. // Copyright 2024-2026 DSP, inc. All rights reserved. // Authors: // cindy.chang@dsp.im (Cindy Chang), 2024/07/03 // imacat.yang@dsp.im (imacat), 2026/03/05 import { loginWithFixtures } from '../../support/intercept'; describe('Delete an Account', () => { beforeEach(() => { loginWithFixtures(); cy.visit('/account-admin'); cy.wait('@getUsers'); }); it('Delete button opens confirmation modal and deletes on confirm.', () => { cy.get('img.delete-account').first().click(); cy.contains('ARE YOU SURE TO DELETE').should('be.visible'); cy.get('#sure_to_delete_acct_btn').click(); cy.wait('@deleteUser'); cy.contains('Account deleted').should('be.visible'); }); it('Cancel button closes the delete confirmation modal.', () => { cy.get('img.delete-account').first().click(); cy.contains('ARE YOU SURE TO DELETE').should('be.visible'); cy.get('#calcel_delete_acct_btn').click(); cy.contains('ARE YOU SURE TO DELETE').should('not.exist'); }); });