mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-06 07:29:42 +02:00
feat(git-status): repositories start collapsed when several are listed
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JrzFKEdBLwVfu6ev2ZscJS
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
948c7c54dd
commit
4fc75d494f
@@ -330,7 +330,13 @@ describe('Git status indicator in a real browser', () => {
|
||||
expect(await page.getAttribute('#gitStatusBtn', 'title')).toMatch(/Git \(2 repositories\)/);
|
||||
const names = await page.$$eval('.git-status-repo-name', (els) => els.map((e) => e.textContent));
|
||||
expect(names).toEqual(['api', 'web']);
|
||||
// The one with something outstanding is open; the clean one is collapsed.
|
||||
// Every repository starts collapsed (the summary line shows what is outstanding); one the user
|
||||
// opens stays open when a refresh re-renders the panel.
|
||||
const allClosed = await page.$$eval('.git-status-repo', (els) => els.map((e) => (e as HTMLDetailsElement).open));
|
||||
expect(allClosed).toEqual([false, false]);
|
||||
await page.click('.git-status-repo:nth-of-type(1) > summary');
|
||||
await refresh();
|
||||
await page.waitForSelector('.git-status-repo[open]');
|
||||
const open = await page.$$eval('.git-status-repo', (els) => els.map((e) => (e as HTMLDetailsElement).open));
|
||||
expect(open).toEqual([true, false]);
|
||||
const apiBody = (await page.textContent('.git-status-repo:nth-of-type(1)')) ?? '';
|
||||
|
||||
Reference in New Issue
Block a user