feat: 워크스페이스 편의 개선 + 매뉴얼에 화면구성·단축키 페이지 추가

워크스페이스(탭)
- 탭 전환 시 좌측 사이드바(대메뉴/소메뉴) 강조 자동 동기화
  - nav 스크립트에 window.govPortalNav.syncByUrl() 공개, renderSidebar(overrideHref) 확장
- 키보드 단축키(Alt 기반): Alt+1~9 탭 이동, Alt+W 닫기, Alt+[ / Alt+] 이전·다음
  - iframe 내부 포커스에서도 동작하도록 같은 출처 문서에 핸들러 부착
- 탭 가운데(휠) 클릭으로 닫기, 잘린 탭 제목 전체 툴팁

매뉴얼
- 신규 페이지 [화면 구성·워크스페이스·단축키] (05_workspace.md, 목차 2번째)
  - 화면 구성, 탭 사용법·유지 범위, 단축키 표, 이동/도움말 안내
- 개요 페이지에서 새 페이지로 안내

e2e: 워크스페이스(사이드바 동기화·가운데클릭) + 매뉴얼(새 페이지·단축키·검색) 케이스 추가

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
taekyoungc
2026-06-08 23:09:25 +09:00
parent 1a443de02e
commit 7e32f579e8
7 changed files with 174 additions and 2 deletions

View File

@@ -66,4 +66,32 @@ test.describe('워크스페이스 탭', () => {
await page.waitForTimeout(2500);
await expect(page.locator('.ws-tab')).toHaveCount(2);
});
test('편의: 가운데클릭 닫기·사이드바 동기화', async ({ page }) => {
await login(page, 'admin');
await page.goto('/admin/select-local-government');
await page.evaluate(() => {
const r = document.querySelector('input[name="lg_idx"][value="1"]');
if (r) { r.checked = true; r.form.submit(); }
});
await page.waitForTimeout(700);
await page.goto('/workspace');
await page.waitForTimeout(2500);
await expect(page.locator('.ws-tab')).toHaveCount(1);
// 소메뉴를 탭으로 열기 → 사이드바에서 해당 항목이 active 로 동기화됨
const firstMenu = page.locator('.sidebar .my-menu-list a').first();
const menuText = (await firstMenu.textContent() || '').trim();
await firstMenu.click();
await page.waitForTimeout(1500);
await expect(page.locator('.ws-tab')).toHaveCount(2);
await expect(page.locator('.sidebar .my-menu-list a.active')).toBeVisible();
// 두 번째 탭 가운데(휠) 클릭으로 닫기
await page.locator('.ws-tab').nth(1).click({ button: 'middle' });
await page.waitForTimeout(400);
await expect(page.locator('.ws-tab')).toHaveCount(1);
});
});