🎨 Reformat test code for improved readability and consistency

This commit is contained in:
2026-01-28 22:42:22 +00:00
parent d782eba3b4
commit 177ae5c60d
2 changed files with 125 additions and 7 deletions

View File

@@ -41,12 +41,15 @@ describe('ApiKeyManager - Integration Tests', () => {
it('shows delete confirmation modal using BaseModal', async () => {
wrapper = mount(ApiKeyManager);
// Find the button that triggers the delete modal
const deleteButton = wrapper.findAll('button').find(b =>
b.text().includes('Clear Stored Key') || b.text().includes('Delete')
);
const deleteButton = wrapper
.findAll('button')
.find(
b =>
b.text().includes('Clear Stored Key') || b.text().includes('Delete')
);
// Modal should not be visible initially
expect(document.querySelector('.modal-overlay')).toBeFalsy();
});
@@ -54,12 +57,14 @@ describe('ApiKeyManager - Integration Tests', () => {
it('contains ChallongeApiKeyGuide component', () => {
wrapper = mount(ApiKeyManager);
// The guide component is conditionally rendered
expect(wrapper.findComponent({ name: 'ChallongeApiKeyGuide' }).exists()).toBe(true);
expect(
wrapper.findComponent({ name: 'ChallongeApiKeyGuide' }).exists()
).toBe(true);
});
it('has proper form structure for API key input', () => {
wrapper = mount(ApiKeyManager);
const input = wrapper.find('#api-key');
expect(input.exists()).toBe(true);
expect(input.attributes('type')).toBe('password');