Repository navigation
port Wave 3a BRAT tests to Playwright - #17691
Merged
Merged
Conversation
Ports chat.R, chat-satellite.R, projects.R, terminal.R, and suspend.R to Playwright. Updates the Server fixture to accept --auth-none mode so the @server_only suspend tests can run against local rserver-dev. - chat.R -> chat-pane-persistence.test.ts (2 tests: no-refresh on Options dismiss + restart-survival) - chat-satellite.R -> chat-satellite-commands.test.ts (command-driven popOutChat/returnChatToMain; DOM-click variant already covered by detachable-sidebar; Chrome-reload WindowCloseMonitor test dropped as Unportable, no user gesture) - projects.R -> create_projects.test.ts (new git-enabled new-project test) and project_id.test.ts (ProjectId regression around the project_user_data_directory pref) - terminal.R -> tests/panes/terminal/terminal.test.ts (2 tests) - suspend.R -> tests/panes/misc/session_suspend.test.ts (2 tests, @server_only)
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
When PW_RSTUDIO_SERVER_URL is unset, the Server fixture now launches its own rserver-dev process with HOME pointed at PW_SANDBOX/user-home, a unique www-port, and per-worker server-data-dir / RSTUDIO_CONFIG_HOME -- the same isolation the Desktop fixture has had. Set PW_RSTUDIO_SERVER_URL to point at an external server to skip the spawn. The server-data-dir is anchored under os.tmpdir() with a short prefix so the Unix-domain sockets rserver writes there stay under the macOS sockaddr_un.sun_path 104-char limit (PW_SANDBOX inside /var/folders/... is already too long on its own).
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.
Summary
Wave 3a of the BRAT-to-Playwright migration: ports
chat.R,chat-satellite.R,projects.R,terminal.R, andsuspend.R(12 tests total). Plus a Server fixture upgrade so it sandboxes its rserver-dev the same way the Desktop fixture sandboxes RStudio.app.Tests ported
chat.Rchat-pane-persistence.test.ts(2)chat-satellite.Rchat-satellite-commands.test.ts(1)popOutChat/returnChatToMain; DOM-click variant already covered bydetachable-sidebar; Chrome-reloadWindowCloseMonitortest dropped (no user gesture)projects.Rcreate_projects.test.ts(+1 git case),project_id.test.ts(1)project_user_data_directoryprefterminal.Rtests/panes/terminal/terminal.test.ts(2)sendTerminalToEditorsuspend.Rtests/panes/misc/session_suspend.test.ts(2)@server_onlyFixture changes
fixtures/server.fixture.ts: whenPW_RSTUDIO_SERVER_URLis unset, spawn a privaterserver-devper worker withHOMEpointed atPW_SANDBOX/user-home, a unique--www-port, and per-worker--server-data-dir/RSTUDIO_CONFIG_HOME. This matches the per-worker isolation the Desktop fixture has had. SetPW_RSTUDIO_SERVER_URLto point at an external server (CI) to skip the spawn.os.tmpdir()with a short prefix so the Unix-domain sockets stay under the macOSsockaddr_un.sun_path104-char limit.--auth-none, we skip filling credentials.tests/projects/create_projects.test.ts: extendedcreateProjectInNewDirwith an optionalwithGitflag so the wizard's git checkbox can be toggled deterministically.Test plan
chat-pane-persistence.test.ts(2),chat-satellite-commands.test.ts(1),terminal.test.ts(2),project_id.test.ts(1),create_projects.test.tsgit case (1) -- all passingsession_suspend.test.ts(2) -- passing against the sandboxedrserver-dev