Skip to content

Fix the failing LexOptionsDlg InitializeUIModeControls shift test - #1048

Merged
jasonleenaylor merged 1 commit into
mainfrom
claude/lexoptionsdlgtests-stale-d0760d
Aug 7, 2026
Merged

Fix the failing LexOptionsDlg InitializeUIModeControls shift test#1048
jasonleenaylor merged 1 commit into
mainfrom
claude/lexoptionsdlgtests-stale-d0760d

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Measure the shift delta from m_labelAdvanced's observed move instead of recomputing it with a hardcoded padding literal, this will keep the test from drifting from the actual code. Add an assertion that the injected group box clears m_labelAdvanced to keep proof the shift was sufficient, and drop the label position check.

Also rename the Advanced heading from label4 to m_labelAdvanced so the layout code names the control it moves.

Why the test was failing

PR #964 changed InitializeUIModeControls to derive its padding from the dialog font (Font.Height / 2) instead of a literal 8, but the test kept recomputing its expected positions with the old literal. Wherever Font.Height / 2 != 8 the expectations are off by the difference (at 96 DPI, 13 / 2 = 6, hence "Expected: 217 / But was: 215"), so the test could pass on one machine and fail on another.

🤖 Generated with Claude Code


This change is Reviewable

Measure the shift delta from m_labelAdvanced's observed move instead
of recomputing it with a hardcoded padding literal, so the test
asserts the one-shift invariant rather than the production arithmetic.
Add an assertion that the injected group box clears m_labelAdvanced to
keep proof the shift was sufficient, and drop the label position check.

Also rename the Advanced heading from label4 to m_labelAdvanced so the
layout code names the control it moves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jasonleenaylor
jasonleenaylor enabled auto-merge (squash) August 7, 2026 00:51
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   11m 31s ⏱️ +17s
5 761 tests ±0  5 680 ✅ +1  81 💤 ±0  0 ❌  - 1 
5 770 runs  ±0  5 689 ✅ +1  81 💤 ±0  0 ❌  - 1 

Results for commit 057e77f. ± Comparison against base commit 31c0a61.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.45%. Comparing base (31c0a61) to head (057e77f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1048      +/-   ##
==========================================
+ Coverage   36.44%   36.45%   +0.01%     
==========================================
  Files        1354     1354              
  Lines      295676   295676              
  Branches    40223    40223              
==========================================
+ Hits       107757   107788      +31     
+ Misses     158645   158625      -20     
+ Partials    29274    29263      -11     
Files with missing lines Coverage Δ
.../LexText/LexTextControls/LexOptionsDlg.Designer.cs 97.79% <100.00%> (ø)
Src/LexText/LexTextControls/LexOptionsDlg.cs 43.05% <100.00%> (ø)

... and 3 files with indirect coverage changes

🚀 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.

@thejambi thejambi 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.

:lgtm:

@thejambi reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on jasonleenaylor).

@jasonleenaylor
jasonleenaylor merged commit 8dd2468 into main Aug 7, 2026
8 of 9 checks passed
@jasonleenaylor
jasonleenaylor deleted the claude/lexoptionsdlgtests-stale-d0760d branch August 7, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants