Repository navigation
test: use controller.OutputCode in the R intent tests - #251
Merged
Merged
Conversation
`controller.OutputTextVerbatim` is deprecated in py-shiny 1.8.0 and warns on
every construction. `OutputCode` is the replacement and is identical in
behaviour -- same `pre#{id}.shiny-text-output` locator, same
`_OutputTextValue` base -- so the swap is mechanical and does not depend on
R's `verbatimTextOutput()` markup differing from the py side.
Closes #250
Contributor
Coverage report
Test suite run success342 tests passing in 20 suites. Report generated by 🧪jest coverage report action from b44d08d |
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.
Closes #250.
controller.OutputTextVerbatimis deprecated in py-shiny 1.8.0 and warns on every construction. This swaps the five uses intests/test_examples_intent_r.pytocontroller.OutputCode.The open question in the issue, answered
#250 asked whether
OutputCodelocates and reads R'sverbatimTextOutput()markup correctly, since it is a py-side control driving R-rendered DOM. It does — the two controllers are identical apart from the deprecation warning. At the pinned py-shiny submodule commit (7ba439c), inshiny/playwright/controller/_output.py:OutputCode.__init__→loc=f"pre#{id}.shiny-text-output"(line 194)OutputTextVerbatim.__init__→loc=f"pre#{id}.shiny-text-output"(line 251)Both subclass
_OutputTextValueand define the sameexpect_has_placeholder. Same selector, same base, same methods. Whatever the old controller matched in R'sverbatimTextOutput()output, the new one matches identically, so there is no py-control-vs-R-DOM risk and nothing to raise upstream.Testing
Not run locally:
make test-examples-intentneedsmake allfirst, and_shinylive/in this worktree is unbuilt. Leaving verification to CI. The change is a pure identifier swap with no behavioural delta.