Accept the W3C validator's new message in the Excel preview test - #5363
Merged
Merged
Conversation
…block The validator now reports pandas' `<style scoped>` inside a `<div>` as `Attribute "scoped" not allowed on element "style" at this point.` instead of the message the test already accepts. Keep the old message too, since the service may serve either. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5363 +/- ##
==========================================
+ Coverage 38.41% 42.69% +4.28%
==========================================
Files 753 770 +17
Lines 24866 27362 +2496
Branches 6794 6794
==========================================
+ Hits 9552 11683 +2131
- Misses 13553 13918 +365
Partials 1761 1761
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The test-only change is narrowly scoped and has no unresolved issues.
Review effort: Lite
Findings: None
What changed in this PR
Updates the Excel preview validator test to accept the W3C validator’s new message while retaining the previous one.
Changes:
- Adds the new validator message to the accepted errors list.
- Preserves compatibility with the prior message.
| File | Description |
|---|---|
lambdas/shared/tests/test_preview.py |
Expands accepted W3C validator messages for Excel previews. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The need
test-lambda (shared)fails on every branch.test_excelposts the Excel preview's HTML to the W3C HTML validator and allows only the errors it lists, and the validator now reports the preview's<style scoped>inside a<div>asAttribute "scoped" not allowed on element "style" at this point.instead ofElement "style" not allowed as child of element "div" in this context. (Suppressing further errors from this subtree.). Neither the markup nor the lambdas changed; the service did. The test has to accept the current message for the same markup.What changed
The test accepts the validator's new message. The old one stays, since the service may serve either.
Verification
cd lambdas/shared && uv run pytest --cov=src --cov-report=term-missing --cov-report=xml, the CI step:test_excelfails before this change on the new message and passes after it (22 passed, 1 xfailed).uvx ruff@0.16.0 check . --exclude catalog/ --exclude api/python/passes.Links
None: no issue or spec change, and no sibling pull requests.
Risk and rollback
Test-only; nothing that ships changes. The new entry exempts the validator's current complaint about the same pandas markup and nothing broader. Revert the commit to roll back.
The optionality note
Closes no door. The test still depends on the live validator's wording; taking it off that dependency stays open.
🤖 Generated with Claude Code
The PR appears safe to merge.
Summary
The PR adds the W3C validator’s current
<style scoped>error message to the Excel preview test’s allowlist while retaining the previous message.Reviews (1) · Last reviewed commit: "Accept the W3C validator's new message f..."