feat(project): tooltips stay above the cursor; create project/section from meeting task table

- Hover tips: keep above the cursor even near the top edge (tighter tail gap); flip below only
  when there is no room, 28px under the cursor so the pointer never covers the text
- Meeting task table: "new project" (Pro user+) and "new section" at the top of the pickers,
  created by name and selected right away
- Help + docs; jsdom tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 13:52:34 +09:00
parent 7cdca852bd
commit fa6e7066ae
11 changed files with 117 additions and 29 deletions
+48 -1
View File
@@ -541,7 +541,7 @@ function meetServer(env, st) {
return items.map(itemLabel);
};
const projLabels = await pickItem("project", "브랜드");
check("[2g] 프로젝트 목록 = 최상위 프로젝트", JSON.stringify(projLabels) === JSON.stringify(["브랜드"]), projLabels);
check("[2g] 프로젝트 목록 = 맨 위 '새 프로젝트'(Pro user) + 최상위 프로젝트", JSON.stringify(projLabels) === JSON.stringify(["새 프로젝트", "브랜드"]), projLabels);
const row = d.querySelector("#pj-meet-quick tbody tr");
check("[2g] 프로젝트 고르면 첫 섹션 자동", row.querySelector('[data-pick="stage"]').textContent === "할 일", row.querySelector('[data-pick="stage"]').textContent);
const people = await pickItem("assignee", "Kim");
@@ -564,6 +564,53 @@ function meetServer(env, st) {
check("[2g] 적용 전 줄 × → 줄만 지움", d.querySelectorAll("#pj-meet-quick tbody tr").length === n - 1 && env.calls.length === calls);
}, { notifyOnFail: true });
// ════════════════════ [2g2] 작업 등록 — 프로젝트·섹션 목록 맨 위에서 바로 만들기 ════════════════════
await section(async function () {
const env = makeEnv(PAGE.meeting_admin, MEET_URL, { promptAnswer: "신규 브랜드" });
meetServer(env);
let madeProject = null, madeStage = null;
env.route("GET", /\/project\/api\/projects$/, function () { return { body: { projects: [{ id: 7, name: "브랜드", parent_id: null }] } }; });
env.route("POST", /\/project\/api\/projects$/, function (u, body) {
madeProject = body;
return { status: 201, body: { project: { id: 9, name: body.name, parent_id: null, owner_email: "me@test.local" } } };
});
env.route("POST", /\/project\/api\/projects\/9\/stages$/, function (u, body) {
madeStage = body;
return { status: 201, body: { stage: { id: 91, project_id: 9, name: body.name, sort_order: 0 } } };
});
await boot(env);
const d = env.d;
const open = async function (kind) {
d.querySelector('#pj-meet-quick tbody tr [data-pick="' + kind + '"]').click(); await settle(); await wait(5); await settle();
return Array.from(d.querySelectorAll(".pj-ctxmenu-item"));
};
const click = async function (items, label) {
items.find(function (n) { return itemLabel(n) === label; }).click(); await settle(); await wait(5); await settle();
};
await click(await open("project"), "새 프로젝트");
const row = function () { return d.querySelector("#pj-meet-quick tbody tr"); };
check("[2g2] 새 프로젝트 → 이름 묻고 만들어 바로 고름(섹션은 비움)",
madeProject && madeProject.name === "신규 브랜드" && row().querySelector('[data-pick="project"]').textContent === "신규 브랜드" &&
row().querySelector('[data-pick="stage"]').classList.contains("is-empty"), [madeProject, row().textContent]);
const stageItems = await open("stage");
check("[2g2] 섹션 목록 맨 위 '새 섹션'", itemLabel(stageItems[0]) === "새 섹션", stageItems.map(itemLabel));
await click(stageItems, "새 섹션");
check("[2g2] 새 섹션 → 그 프로젝트에 만들고 바로 고름", madeStage && madeStage.name === "신규 브랜드" &&
row().querySelector('[data-pick="stage"]').textContent === "신규 브랜드", [madeStage, row().textContent]);
});
await section(async function () {
const env = makeEnv(PAGE.meeting_member, MEET_URL);
meetServer(env);
env.route("GET", /\/project\/api\/projects$/, function () { return { body: { projects: [{ id: 7, name: "브랜드", parent_id: null }] } }; });
await boot(env);
const d = env.d;
const box = d.querySelector('#pj-meet-quick tbody tr [data-pick="project"]');
if (!box) { check("[2g2] 직원 화면 작업 등록 표", false); return; }
box.click(); await settle(); await wait(5); await settle();
const labels = Array.from(d.querySelectorAll(".pj-ctxmenu-item")).map(itemLabel);
check("[2g2] 직원(User)에겐 '새 프로젝트' 없음(새 프로젝트는 Pro user 이상)", labels.indexOf("새 프로젝트") < 0 && labels.indexOf("브랜드") >= 0, labels);
});
// ════════════════════ [2h] 회의록은 누구나 수정 · [회의 완료](관리자)면 잠금 ════════════════════
await section(async function () {
const env = makeEnv(PAGE.meeting_member, MEET_URL);