feat(extension): field-history pane visual polish — section headers + glyph buttons

This commit is contained in:
adlee-was-taken
2026-05-30 10:32:27 -04:00
parent ed6e21806f
commit 32e674eb40
4 changed files with 56 additions and 126 deletions

View File

@@ -38,7 +38,7 @@ describe('field-history view', () => {
expect(app.innerHTML).toContain('No history available');
});
it('renders history entries masked by default', async () => {
it('renders history entries masked by default with section-header and glyph buttons', async () => {
(sendMessage as ReturnType<typeof vi.fn>).mockResolvedValueOnce({
ok: true,
data: {
@@ -53,9 +53,17 @@ describe('field-history view', () => {
await renderFieldHistory(app);
// Masked by default
expect(app.innerHTML).toContain('••••••••••••');
expect(app.innerHTML).not.toContain('secret123');
expect(app.innerHTML).toContain('current');
// Section-header per field with uppercase name + entry count
expect(app.innerHTML).toContain('section-header');
expect(app.innerHTML).toContain('PASSWORD · 2 entries');
// Current entry annotation
expect(app.innerHTML).toContain('current · ');
// Explicit glyph buttons (reveal + copy) on each entry
expect(app.querySelectorAll('[data-entry-reveal]').length).toBe(2);
expect(app.querySelectorAll('[data-entry-copy]').length).toBe(2);
});
it('back button navigates to detail', async () => {