Repository navigation
fix(e2e): record report files before jobsWorkoff, diff after - #2245
Conversation
…f after The cron job could write a report-*.txt file before jobsWorkoff if it ran early (e.g. during scheduleCronJob). Snapshot report files before workoff and diff to count only newly created ones, making the assertion correct regardless of pre-existing reports. Co-Authored-By: Tobbe Lundberg <tobbe@tlundberg.com>
👷 Deploy request for cedarjs pending review.Visit the deploys page to approve it
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t build:pack --exclude create-ceda... |
✅ Succeeded | 1s | View ↗ |
nx run-many -t build --output-style=stream |
✅ Succeeded | 6s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-27 12:42:23 UTC
Greptile SummaryUpdates the background-jobs end-to-end test to distinguish reports created during the current workoff from stale report files.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The test now snapshots matching report filenames immediately before the workoff and compares that snapshot with the post-workoff directory contents, preventing stale reports from satisfying the assertion without changing production behavior. Important Files Changed
Reviews (1): Last reviewed commit: "fix(e2e-background-jobs): record report ..." | Re-trigger Greptile |
|
The changes in this PR are now available on npm. Try them out by running Or try it in a new app with |
Co-authored-by: Lisa <lisa@cedar.local> Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>

Problem
The e2e background jobs test was counting all
report-*.txtfiles in the project directory afterjobsWorkoff(), but some of those files may have existed before the workoff started (e.g. from a previous test run). This caused false positives where stale report files were counted as newly created.Fix
Snapshot the report files present before
jobsWorkoff(), then diff against what's present after to get only the newly created files.confirmJobsRan()now accepts the before-snapshot and filters:The error output also now shows both before/after lists to make debugging easier.