feat(workbench): verify expected R/Python runtime versions (closes #303)#327
Conversation
- Add r_excluded_versions and python_excluded_versions to RuntimesConfig so admins can assert that EOL versions are absent from the dialog - Add R_VERSION_DROPDOWN and PYTHON_VERSION_DROPDOWN selectors to NewSessionDialog page object - New feature file and step definitions under src/vip_tests/workbench/: * Scenario 1: all expected R versions present in New Session dialog * Scenario 2: all expected Python versions present in New Session dialog * Scenario 3: launched RStudio session reports the expected R version - Selftests cover RuntimesConfig fields, selector presence, and feature file structure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📸 Preview Screenshots for PR #327Successfully captured 7 out of 8 preview pages. Full-page screenshots are shown below. Website Preview ScreenshotsHome Page
Getting Started
Feature Matrix
Test Inventory
Example Report (Website)
Shiny App
Report Preview ScreenshotsDetailed Results
|
📸 Preview ScreenshotsThis PR's preview deployments have been captured. All 8 pages were successfully rendered and screenshotted. Website PreviewBase URL: https://posit-dev.github.io/vip/pr-preview-site/pr-327/ Report PreviewBase URL: https://posit-dev.github.io/vip/pr-preview/pr-327/ Summary
All pages rendered without critical issues. Some console errors were noted (likely from third-party resources), but all pages loaded and displayed correctly. Warning Firewall blocked 7 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "cdn.jsdelivr.net"
- "clients2.google.com"
- "fonts.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
|















Closes #303
Implements the plan from #314
What changed and why
This PR implements runtime version verification for Workbench, mirroring the existing Connect tests in
src/vip_tests/connect/test_runtime_versions.feature.Config (
src/vip/config.py)Added
r_excluded_versionsandpython_excluded_versionstoRuntimesConfigso administrators can assert that EOL (end-of-life) versions are absent from the Workbench session dialog — complementing the existing allow-list check.Page object (
src/vip_tests/workbench/pages/homepage.py)Added
R_VERSION_DROPDOWNandPYTHON_VERSION_DROPDOWNselectors toNewSessionDialog. These use the#rstudio_label_*ID pattern consistent with other dialog dropdowns.Tests (
src/vip_tests/workbench/test_runtime_versions.{feature,py})Three new BDD scenarios:
<select>and custom ARIA listbox), asserts all configured versions are present and no excluded versions appear. Skips gracefully if the dropdown is absent.R.version$majorin the console, and verifies the output matches.All three skip when the relevant
expected_r_versions/expected_python_versionslists are empty.Selftests (
selftests/test_workbench_runtime_versions.py)Unit tests covering:
RuntimesConfignew fields default to[]load_configreadsr_excluded_versions/python_excluded_versionsfrom TOMLNewSessionDialogexposes the two new CSS selectors@workbenchtag, has exactly 3 scenarios covering R, Python, and sessionDemo
The implementation follows the four-layer architecture:
@workbenchtag for auto-skipsession_contextfixture (consistent with all other workbench step files)NewSessionDialogholds all selectors<select>and custom ARIA listbox dropdowns