Skip to content

test: replace mock axis tests with component-level fill/class tests#517

Merged
gka merged 6 commits intomainfrom
test/issue-142-axis-fill-class
Mar 9, 2026
Merged

test: replace mock axis tests with component-level fill/class tests#517
gka merged 6 commits intomainfrom
test/issue-142-axis-fill-class

Conversation

@ljodea
Copy link
Copy Markdown
Collaborator

@ljodea ljodea commented Mar 8, 2026

Summary

  • Replace axis-properties-fix.test.ts (mock-only interface tests) with real component-level tests in axisY.test.ts
  • Add test for AxisY fill prop with constant value ('red')
  • Add test for AxisY fill prop with function accessor ((d, i) => ...)

All 3 bugs from #142 are now accounted for:

  1. GridY.dx — fixed in fix: add support for dx/dy transform to Grid marks #175 (merged)
  2. AxisY.fill — confirmed working via new component tests
  3. AxisY.class — confirmed working (existing axisY.test.ts tests verify class application)

Closes #142

Test plan

  • pnpm test -- src/tests/axisY.test.ts — all 19 tests pass
  • Pre-commit hooks (prettier, oxlint) pass

🤖 Generated with Claude Code

ljodea and others added 5 commits February 28, 2026 10:05
Pin color.domain and fx.domain in faceted bars example so unchecking
a party checkbox no longer reshuffles remaining bars' colors.

Allow null values in fx/fy scale domains (#99) — null is a valid
grouping category for facet scales. Also exempt fx/fy from the
data validity check in Mark.svelte so null-faceted records render.

Fix HTMLTooltip event listener mismatch: removeEventListener was
using 'mouseleave' instead of 'pointerleave', causing a leak.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use a scheme dictionary mapping party names to recognizable colors
instead of relying on domain + default categorical colors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…chemes

The runtime already supports dictionary objects as color schemes
(autoScales.ts:246) but the type definition didn't include them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace axis-properties-fix.test.ts (mock-only tests) with real
component-level tests in axisY.test.ts that verify AxisY fill prop
works with both constant values and function accessors.

Closes #142

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 8, 2026

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 8b7d157
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/69ad954dea91af000919c364
😎 Deploy Preview https://deploy-preview-517--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gka gka merged commit 22a9f11 into main Mar 9, 2026
8 checks passed
@gka gka deleted the test/issue-142-axis-fill-class branch March 9, 2026 23:15
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.

[BUG] Multiple Mark props issues

2 participants