Skip to content

Conversation

@lukaszlenart
Copy link
Member

Summary

This PR adds the HTML5 theme to Struts core framework and implements comprehensive unit testing:

  • Migrated HTML5 theme from showcase to core/src/main/resources/template/html5/
  • Fixed all 32 HTML5 templates to use attributes instead of deprecated parameters variable
  • Added theme.properties with parent theme configuration
  • Implemented unit tests for 13 UI components (26 test methods total)
  • All tests passing (100% success rate)

Changes

Theme Implementation

  • Created 45 HTML5 FreeMarker templates in core
  • Added theme.properties with parent=simple configuration
  • Migrated templates from parameters to attributes variable

Unit Tests

Added testGenericHtml5() and testGenericHtml5_clearTagStateSet() methods to:

  • TextfieldTest, TextareaTest, PasswordTest
  • CheckboxTest, CheckboxListTest, RadioTest
  • SelectTest, FileTest, HiddenTest
  • LabelTest, ComboBoxTest, ResetTest, SubmitTest

Excluded: DoubleSelect and UpDownSelect (not supported in HTML5 theme)

Documentation

  • Added implementation plan and testing research documents
  • Updated CLAUDE.md with current guidelines

Test Results

  • 26/26 HTML5 theme tests passing
  • All template path resolution working correctly
  • Proper theme inheritance from simple theme

Closes WW-5444

🤖 Generated with Claude Code

lukaszlenart and others added 6 commits November 26, 2025 18:42
- Move 42 FreeMarker templates to core/src/main/resources/template/html5/
- Remove duplicate templates from showcase
- Makes html5 theme available to all applications via struts2-core.jar
- Enables unit testing in core module
- Fix Html5Action import from XWork2 to Struts2 package
- Add Apache license header to Html5Action

Resolves WW-5444

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add detailed implementation plan documenting the migration of html5 theme
from showcase to core, including step-by-step instructions, verification
procedures, and acceptance criteria.

Related to WW-5444

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ables

- Add testGenericHtml5() methods to 13 UI tag test classes
- Create theme.properties with parent=simple configuration
- Migrate all 32 HTML5 templates from deprecated 'parameters' to 'attributes' variable
- Exclude DoubleSelect and UpDownSelect (not supported in HTML5 theme)
- All 26 HTML5 theme tests passing (100% success rate)

Components tested: Textfield, Textarea, Password, Checkbox, CheckboxList,
Radio, Select, File, Hidden, Label, ComboBox, Reset, Submit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update CLAUDE.md with current project guidelines
- Update test-runner agent documentation
- Remove deprecated jakarta-migration-helper agent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
lukaszlenart and others added 2 commits November 26, 2025 19:23
…asses

Add HTML5 theme tests to ActionErrorTagTest, ActionMessageTagTest,
FieldErrorTagTest, AnchorTest, and FormTagTest. This completes Phase 1
of the HTML5 theme testing plan.

Changes:
- Add 24 new HTML5 theme unit tests across 5 test classes
- Create 17 expected output files for HTML5 theme validation
- Test coverage: action errors, action messages, field errors, anchors, and forms
- All tests verify HTML5 clean markup without table-based layouts

Coverage: 18 of 18 UI tag test classes now have HTML5 tests (100%)
Tests passing: 24/24 HTML5 tests successful

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create Html5TagExampleTest with 5 comprehensive integration tests
- Add fielderror tag demonstration to html5/index.jsp
- Validate HTML5 theme rendering, error display, and clean markup
- All tests passing (5/5) with HtmlUnit and Jetty integration

Tests validate:
- Page load and HTTP status (200)
- Action errors, messages, and field errors display
- Clean semantic markup (ul lists, no table layouts)
- Anchor tag rendering
- Namespace isolation under /html5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants