Add E2E tests for my-account, account info modal, and compare tab

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 20:52:38 +08:00
parent 1a4062487e
commit 6641bc1f8f
7 changed files with 217 additions and 31 deletions

View File

@@ -0,0 +1,35 @@
import { loginWithFixtures } from '../support/intercept';
describe('Account Info Modal', () => {
beforeEach(() => {
loginWithFixtures();
cy.visit('/account-admin');
cy.wait('@getUsers');
});
it('double-click username opens info modal with user data', () => {
cy.get('.account-cell').first().dblclick();
cy.get('#modal_container').should('be.visible');
cy.get('#acct_info_user_name').should('exist');
});
it('info modal shows Account Information header', () => {
cy.get('.account-cell').first().dblclick();
cy.get('#modal_container').should('be.visible');
cy.contains('Account Information').should('exist');
});
it('info modal shows account visit info', () => {
cy.get('.account-cell').first().dblclick();
cy.get('#modal_container').should('be.visible');
cy.get('#account_visit_info').should('exist');
cy.get('#account_visit_info').should('contain', 'Account:');
});
it('info modal can be closed via X button', () => {
cy.get('.account-cell').first().dblclick();
cy.get('#modal_container').should('be.visible');
cy.get('img[alt="X"]').click();
cy.get('#modal_container').should('not.exist');
});
});