Skip to content

fix(tests): resolve post-merge test regressions from #7646 and #7647#7766

Merged
walterbender merged 1 commit into
sugarlabs:masterfrom
Ashutoshx7:fix/test-regressions-7646-7647
Jul 9, 2026
Merged

fix(tests): resolve post-merge test regressions from #7646 and #7647#7766
walterbender merged 1 commit into
sugarlabs:masterfrom
Ashutoshx7:fix/test-regressions-7646-7647

Conversation

@Ashutoshx7

@Ashutoshx7 Ashutoshx7 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Description

Quick follow-up to fix test failures that slipped into master after #7646 and #7647 were merged on top of #7719.

What changed

  • Updated the _playOne test in pitchstaircase.test.js to match the new _playOne(stepCell, playCell) signature.
  • Added the missing style mock on stepCell so the background color update does not throw.
  • Improved the mocked widget buttons by adding replaceChildren and classList.contains, since later tests rely on those methods during init().
  • Mocked _syncLayouts() in the _sortLayout test in musickeyboard.test.js so the test stays focused on sorting only, without chromatic gap filling changing the layout.

Testing

  • All 84 tests in both files pass
  • npm run lint passes
  • npx prettier --check . passes

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.91%. Comparing base (170bac9) to head (832af3c).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7766      +/-   ##
==========================================
+ Coverage   57.51%   57.91%   +0.39%     
==========================================
  Files         173      173              
  Lines       57751    57758       +7     
==========================================
+ Hits        33218    33449     +231     
+ Misses      24533    24309     -224     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…garlabs#7647

pitchstaircase.test.js: add style:{} and playCell arg to the _playOne
test to match the updated two-arg signature added by sugarlabs#7719; add
replaceChildren and classList to addButton mocks in init button handlers
describe so the mock does not pollute downstream assertions.

musickeyboard.test.js: mock _syncLayouts in the _sortLayout ordering
test so fillChromaticGaps does not expand the 3-item layout before the
toEqual assertion runs.
@Ashutoshx7 Ashutoshx7 force-pushed the fix/test-regressions-7646-7647 branch from d005529 to 832af3c Compare July 8, 2026 18:56

@vanshika2720 vanshika2720 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ashutoshx7 Confirmed locally. This fixes the test regression. LGTM

@Ashutoshx7

Copy link
Copy Markdown
Member Author

@walterbender fixes the regression reported by vanshika

@Chaitu7032 Chaitu7032 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@walterbender walterbender merged commit da3c268 into sugarlabs:master Jul 9, 2026
12 of 15 checks passed
rakshityadav1868 pushed a commit to rakshityadav1868/musicblocks that referenced this pull request Jul 9, 2026
…garlabs#7647 (sugarlabs#7766)

pitchstaircase.test.js: add style:{} and playCell arg to the _playOne
test to match the updated two-arg signature added by sugarlabs#7719; add
replaceChildren and classList to addButton mocks in init button handlers
describe so the mock does not pollute downstream assertions.

musickeyboard.test.js: mock _syncLayouts in the _sortLayout ordering
test so fillChromaticGaps does not expand the 3-item layout before the
toEqual assertion runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants