🎨 Reformat test code for improved readability and consistency
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user