Repository navigation
Testing Form Select I18n
Validated on 2026-09-14 with the production build of DesignSetGo 2.7.5, WordPress 6.9, PHP 8.3.33, and Chromium.
-
tests/unit/form-select-placeholder.test.jschecks translated and missing editor catalogs, custom text, clearing, both reset controls, and serialization. It also resets with the bundled French JSON catalog, then reopens with the German catalog and verifies that the default was never saved as authored text. -
tests/unit/form-select-migration.test.jsparses historical static markup with the real WordPress deprecation pipeline. Localized text, English text, and an absent placeholder migrate to dynamic blocks without validation issues. The label, options, help text, and required state survive serialization/reopening. -
tests/phpunit/blocks/form-select-field/render-test.phpusesdo_blocks()and the registered built block, including WordPress schema-default preparation. It covers all nine bundled MO catalogs, missing translations, explicit empty and custom placeholders, differing site/user locales, and WordPress loading the JSON catalog for the registered editor script.
The migration test exposed an additional edge case: static markup with no
placeholder option migrated to undefined, enabling the new translated default.
The static deprecation now migrates that state to an explicit empty string.
npm run build
npm run test:unit -- --runInBand
npm run lint:js
npm run wp-env:start
npm run wp-env -- run tests-cli --env-cwd=wp-content/plugins/designsetgo composer install
npm run wp-env -- run tests-cli --env-cwd=wp-content/plugins/designsetgo \
vendor/bin/phpunit --test-suffix=-test.php tests/phpunit/blocks/form-select-field
vendor/bin/phpcs --standard=phpcs.xml --warning-severity=0 \
tests/phpunit/blocks/form-select-field/render-test.phpFor this run, WP_ENV_HOME=/tmp/designsetgo-step4-wp-env was used for wp-env's
files. The complete Jest suite passed 159 suites / 3,456 tests; the focused
WordPress suite passed 14 tests / 45 assertions. The production build and
JavaScript/PHP lint checks passed. All seven Issue 4 strings were also verified
in every PO/MO catalog, with applicable source/built JavaScript JSON checked.
Using the local test site, install the fr_FR and de_DE core language packs,
set the site language to French, and set the test editor user's language to
German. Insert a select inside a Form Builder block.
- Supply a custom placeholder. Use the inspector menu's placeholder reset,
save the draft, and reopen it. Repeat with Reset all. Both must display
the German default in the editor while leaving
placeholderabsent from the saved block comment. - Preview that draft on the frontend while logged in as the same German user. The placeholder must use French. Normal WordPress content typography turns the default's double hyphens into em dashes on this theme's frontend.
- Enter
Texte <choix> & café, save, reopen, and preview. The displayed text must remain intact, with HTML-sensitive characters escaped in the markup. - Clear the placeholder, save, reopen, and preview. The select must still render, with no placeholder option.
- Parse the three historical fixtures through the built editor's
wp.blocks.parse(), serialize, and parse again. Verify valid blocks, no validation issues, preserved attributes, and no static<select>markup.
All five browser checks passed in Chromium. Validation used temporary drafts; no release was published.
Auto-generated from
docs/testing/FORM-SELECT-I18N.md. To update, edit the source file and changes will sync on next push to main.
- Accordion
- Advanced Heading
- Blobs
- Breadcrumbs
- Card
- Chart
- Comparison Table
- Countdown Timer
- Counter Group
- Divider
- Dynamic Image
- Fifty Fifty
- Flip Card
- Form Builder
- Grid
- Hotspot
- Icon
- Icon Button
- Icon List
- Image Accordion
- Map
- Modal
- Modal Api Reference
- Modal Auto Triggers
- Modal Fse Compatibility
- Modal Gallery Navigation
- Modal Trigger
- Pill
- Product Categories Grid
- Product Showcase Hero
- Progress Bar
- Query
- Query Filter
- Query Group Header
- Query No Results
- Query Pagination
- Query Results
- Row
- Scroll Accordion
- Scroll Marquee
- Scroll Slides
- Section
- Section Divider
- Slider
- Star Rating
- Sticky Sections
- Table Of Contents
- Tabs
- Text Path
- Timeline
- Background Video
- Block Animations
- Clickable Group
- Conditional Visibility
- Custom Css
- Draft Mode
- Dynamic Tags
- Expanding Background
- Grid Mobile Order
- Grid Span
- Hover Effects
- Max Width
- Responsive Visibility
- Reveal Control
- Scroll Parallax
- Sticky Header
- Style Binding
- Svg Patterns
- Text Alignment Inheritance
- Text Reveal
- Abilities Api
- Abilities Api Guide
- Block Bindings
- Draft Mode Api
- Form Webhooks
- Generation Contract
- Interactive Blocks
- Layout Flexibility
- Markdown Content Negotiation
- Rest Api Reference
- Wp Cli Reference
- Ai Assisted Development
- Best Practices Summary
- Block Controls Organization
- Block Development Best Practices Comprehensive
- Block Exclusion Guide
- Deploying To Wordpress Org
- Design System
- 2026 04 16 Blocks Editor Ux Design
- 2026 04 17 Theme 3 Inspector Ia
- 2026 04 21 Query Block Onboarding
- 2026 04 21 Query Capable Layout Blocks Design
- 2026 04 27 Block Roadmap Ideas
- 2026 07 01 Shape Divider Theme Inheritance
- 2026 07 02 Icon Block Dynamic Render Pilot
- 2026 07 06 Section Divider Block Design
- 2026 07 06 Section Style Variations Fse Design
- 2026 07 06 Section Styles Editor Preview
- 2026 07 07 Row Grid Overlay Hover Parity Design
- 2026 07 21 Conditional And Dup Label Sourcing
- 2026 07 23 Theme Block Type Animation Defaults
- 2026 08 16 Chart Block
- 2026 08 16 Greenshift Gap Roadmap
- 2026 08 17 Woocommerce Surface
- 2026 08 24 Loop Carousel
- 2026 08 24 Star Rating Block
- 2026 09 17 Abilities Drift Prevention
- 2026 09 17 Abilities Drift Prevention Implementation
- 2026 09 29 Existing User Regression Fixes
- 2026 09 29 Release Preflight Fixes
- Readme
- 2026 07 02 Block Authorability Audit
- 2026 09 29 Regression Fixes
- 2026 09 29 Release 2.9.0
- 2026 09 29 Release Fixes
- 2026 10 19 Bug Hunt
- 2026 10 20 Bug Hunt Round 2