-
Notifications
You must be signed in to change notification settings - Fork 0
fix(admin): label the page and post status selects #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
logbie
wants to merge
2
commits into
dev
Choose a base branch
from
fix/admin-status-field-label
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| include from "fixtures/http-helpers.wfl" | ||
|
|
||
| // Implicit label: the Status text and status select share one label element. | ||
| define action called editor_inline_label with parameters html_text: | ||
| store open_marker as "<label class=\"field field--inline\">" | ||
| store open_at as indexof of html_text and open_marker | ||
| expect open_at is greater than or equal to 0 to be yes | ||
| store label_tail as substring of html_text and open_at and ((length of html_text) minus open_at) | ||
| store close_at as indexof of label_tail and "</label>" | ||
| expect close_at is greater than 0 to be yes | ||
| return substring of label_tail and 0 and close_at | ||
| end action | ||
|
|
||
| describe "Editor status labels through HTTP": | ||
| test "new page and post status selects sit inside the Status label": | ||
| store site_spec as http_new_site of "configured" | ||
| try: | ||
| store running_site as http_launch of site_spec | ||
| try: | ||
| store admin_cookie as http_install of site_spec | ||
| for each editor_route in ["/admin/pages/new", "/admin/posts/new"]: | ||
| store editor_reply as http_get of site_spec and editor_route and admin_cookie | ||
| expect editor_reply["status"] to equal 200 | ||
| store label_html as editor_inline_label of editor_reply["body"] | ||
| expect label_html to contain "<span>Status</span>" | ||
| expect label_html to contain "<select name=\"status\">" | ||
| expect label_html to contain "value=\"draft\"" | ||
| expect label_html to contain "value=\"published\"" | ||
| expect label_html contains "<select name=\"role\">" to be no | ||
| expect label_html contains "type=\"file\"" to be no | ||
| end for | ||
| finally: | ||
| call http_stop with running_site | ||
| end try | ||
| finally: | ||
| call http_destroy with site_spec | ||
| end try | ||
| end test | ||
| end describe | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Regression and UI checks remain unverified
The PR records no Red/Green run or browser checks for the changed forms. Testing policy requires regression evidence and UI checks require keyboard, focus, label, and narrow-screen verification before merge.
Was this helpful? React with 👍 or 👎 to provide feedback.