Fix Full Suite test failures: productivity fixtures + delete teardown race
Three failures in the non-blocking Full Suite: - CommandCenter mobile-scroll / tablet-layout regression tests rendered with productivity fixtures missing the `hoursSaved` field added in FN-6721. That made ProductivityArea throw on `data.hoursSaved.unavailable`, an uncaught exception that crashed the CommandCenter render (no `command-center` testid) and polluted the shared worker, causing collateral QuickEntryBox failures. Add `hoursSaved` to both fixtures. - github-tracking-delete route test failed intermittently with `ENOTEMPTY: ... rmdir '.../.fusion'` because the fire-and-forget delete handler can write into `.fusion` while afterEach removes the temp dir. Make rm tolerant via maxRetries/retryDelay. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,7 @@ function populatedProductivityFixture() {
|
||||
commits: 2,
|
||||
pullRequests: 1,
|
||||
loc: { value: 42, unavailable: false },
|
||||
hoursSaved: { value: 3, unavailable: false },
|
||||
taskDuration: {
|
||||
completedTasks: 2,
|
||||
averageMs: 1_800_000,
|
||||
@@ -135,6 +136,7 @@ function emptyProductivityFixture() {
|
||||
commits: 0,
|
||||
pullRequests: 0,
|
||||
loc: { value: null, unavailable: true },
|
||||
hoursSaved: { value: null, unavailable: true },
|
||||
taskDuration: {
|
||||
completedTasks: 0,
|
||||
averageMs: null,
|
||||
|
||||
@@ -105,6 +105,7 @@ function populatedProductivityFixture() {
|
||||
commits: 2,
|
||||
pullRequests: 1,
|
||||
loc: { value: 42, unavailable: false },
|
||||
hoursSaved: { value: 3, unavailable: false },
|
||||
taskDuration: {
|
||||
completedTasks: 2,
|
||||
averageMs: 1_800_000,
|
||||
@@ -123,6 +124,7 @@ function emptyProductivityFixture() {
|
||||
commits: 0,
|
||||
pullRequests: 0,
|
||||
loc: { value: null, unavailable: true },
|
||||
hoursSaved: { value: null, unavailable: true },
|
||||
taskDuration: {
|
||||
completedTasks: 0,
|
||||
averageMs: null,
|
||||
|
||||
@@ -106,8 +106,11 @@ describe("github tracking delete flow", () => {
|
||||
afterEach(async () => {
|
||||
stateService.stop();
|
||||
store.close();
|
||||
await rm(rootDir, { recursive: true, force: true });
|
||||
await rm(globalDir, { recursive: true, force: true });
|
||||
// The delete handlers are fire-and-forget (`void this.handleTaskDeleted`), so a
|
||||
// trailing async write into `.fusion` can race this cleanup and surface as
|
||||
// ENOTEMPTY. `maxRetries`/`retryDelay` make rm tolerant of that teardown race.
|
||||
await rm(rootDir, { recursive: true, force: true, maxRetries: 5, retryDelay: 50 });
|
||||
await rm(globalDir, { recursive: true, force: true, maxRetries: 5, retryDelay: 50 });
|
||||
});
|
||||
|
||||
it("closes the linked issue as not_planned when a tracked task is deleted", async () => {
|
||||
|
||||
Reference in New Issue
Block a user