Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Jun 13, 2024
1 parent 770e1dc commit ebc79f4
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions features/makepot.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3682,6 +3682,51 @@ Feature: Generate a POT file of a WordPress project
msgid "My style variation"
"""

Scenario: Extract strings from the styles.blocks.variations section of theme.json files
Given an empty foo-theme directory
And a foo-theme/theme.json file:
"""
{
"version": "1",
"settings": {
"color": {
"duotone": [
{ "slug": "dark-grayscale", "name": "Dark grayscale", "colors": [] }
],
}
},
"styles": {
"blocks": {
"variations": {
"variationSlug": {
"title": "My variation",
"color": {
"background": "grey"
}
}
}
}
}
}
"""

When I try `wp i18n make-pot foo-theme`
Then STDOUT should be:
"""
Success: POT file successfully generated.
"""
And the foo-theme/foo-theme.pot file should exist
And the foo-theme/foo-theme.pot file should contain:
"""
msgctxt "Duotone name"
msgid "Dark grayscale"
"""
And the foo-theme/foo-theme.pot file should contain:
"""
msgctxt "Style variation name"
msgid "My style variation"
"""

Scenario: Extract strings from the blocks section of theme.json files
Given an empty foo-theme directory
And a foo-theme/theme.json file:
Expand Down

0 comments on commit ebc79f4

Please sign in to comment.