fix: flaky Linear integration test + missing ready label in SessionDetail
Linear API has eventual consistency — updateIssue state changes don't propagate instantly. Poll with retries instead of asserting immediately. Also adds "ready" entry to SessionDetail activityLabel map (was missing, causing fallback to dim/unstyled rendering). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a20766a8ec
commit
3576683342
|
|
@ -250,7 +250,13 @@ describe.skipIf(!canRun)("tracker-linear (integration)", () => {
|
|||
it("updateIssue closes the issue and isCompleted reflects it", async () => {
|
||||
await tracker.updateIssue!(issueIdentifier, { state: "closed" }, project);
|
||||
|
||||
const completed = await tracker.isCompleted(issueIdentifier, project);
|
||||
// Linear API has eventual consistency — poll until the state propagates
|
||||
let completed = false;
|
||||
for (let attempt = 0; attempt < 5; attempt++) {
|
||||
completed = await tracker.isCompleted(issueIdentifier, project);
|
||||
if (completed) break;
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
}
|
||||
expect(completed).toBe(true);
|
||||
|
||||
const issue = await tracker.getIssue(issueIdentifier, project);
|
||||
|
|
@ -260,7 +266,13 @@ describe.skipIf(!canRun)("tracker-linear (integration)", () => {
|
|||
it("updateIssue reopens the issue", async () => {
|
||||
await tracker.updateIssue!(issueIdentifier, { state: "open" }, project);
|
||||
|
||||
const completed = await tracker.isCompleted(issueIdentifier, project);
|
||||
// Linear API has eventual consistency — poll until the state propagates
|
||||
let completed = true;
|
||||
for (let attempt = 0; attempt < 5; attempt++) {
|
||||
completed = await tracker.isCompleted(issueIdentifier, project);
|
||||
if (!completed) break;
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
}
|
||||
expect(completed).toBe(false);
|
||||
|
||||
const issue = await tracker.getIssue(issueIdentifier, project);
|
||||
|
|
|
|||
Loading…
Reference in New Issue