Path: blob/main/tests/docs/manual/publish-connect-cloud/README.md
12922 views
Manual Testing: quarto publish posit-connect-cloud
Testing protocol for the Posit Connect Cloud publish provider.
Prerequisites
Dev quarto built (
./configure.cmdcompleted)Browser available for OAuth flow
Setup
To test against staging instead of production, set the environment:
Dev quarto path (from repo root):
Token storage location:
Windows:
%LOCALAPPDATA%\quarto\publish\accounts\posit-connect-cloud\accounts.jsonmacOS/Linux:
~/.local/share/quarto/publish/accounts/posit-connect-cloud/accounts.json
Test 1: First-Time Authorization
Verify the OAuth device code flow works end-to-end.
Pre-condition: No existing posit-connect-cloud accounts. Check with:
Run:
Expected behavior:
Prompt: "Authorize" confirmation
Authorization code displayed (green, bold)
Browser opens to login page (the code is pre-filled in URL)
After approving in browser, terminal resumes automatically
If no publishable accounts: browser opens account creation, spinner shows "Waiting for account setup"
If one account: auto-selected with debug message
If multiple accounts: interactive selection prompt
Confirmation: "Authorized to publish as account-name"
Rendering happens
Spinner: "Uploading files"
Spinner: "Publishing document"
Final message:
Published: https://...connect.posit.cloud/<account>/content/<id>Browser opens to published content
Check:
Auth code shown in terminal
Browser opens automatically
No manual code entry required (pre-filled URL)
Account selected/created
Document published and accessible at URL
Content renders correctly in browser (title, formatting, link)
Account shows server URL in prompt (e.g.
cderv (https://connect.posit.cloud))
Record: Account name: ___ | Content ID: ___ | URL: ___
Test 2: Token Persistence
Verify re-publish works without re-authorization.
Pre-condition: Test 1 completed. Close the terminal entirely.
Run (in fresh terminal):
Check:
No authorization flow triggered
Existing target detected from
_publish.ymlPublish succeeds
URL unchanged from Test 1
Test 3: Publish RevealJS Slides
Verify single-document revealjs publishing works (reveal.js assets bundled correctly).
Run:
Check in browser:
Slides load with reveal.js navigation (arrow keys, progress bar)
Slide 3 has aquamarine background color
Slide 4 has syntax-highlighted Python code block
No broken assets (check browser console for 404s)
All reveal.js transitions and controls functional
Record: Content ID: ___ | URL: ___
Test 4: Publish a Website
Verify multi-page site publishing.
Run:
Check in browser:
Home page loads with correct title
Navbar present with "Home" and "About" links
Click "About" -> about page loads
Click "Home" -> home page loads
Both pages render correctly
Published as new content (different URL from Test 1)
Record: Content ID: ___ | URL: ___
Test 5: Update Existing Content
Verify re-publishing updates content in-place.
Setup: Edit simple-website/index.qmd — add a line:
Run:
Check:
URL is same as Test 4
Hard-refresh (Ctrl+F5) shows updated text
About page still works
No duplicate content created on dashboard
Cleanup: Revert the edit:
Test 6: Account Management
Verify accounts listing and removal.
Run:
Check:
Posit Connect Cloud account(s) listed
Account name from Test 1 shown
Server URL displayed next to account name
Remove the account (select it from the interactive menu, confirm removal).
Verify removed, then re-authorize (needed for remaining tests):
Test 7: CI/CD Mode (Environment Token)
Verify non-interactive publishing with environment variables.
Setup: Extract the stored token:
Note the accessToken and accountId values.
Set env vars and remove stored account:
Remove stored accounts via quarto publish accounts so only env var token is used.
Run:
Check:
No browser opens
No interactive prompts
Token from environment variable used
Account resolved from ACCOUNT_ID
Publish succeeds
No ghost token persisted (run
quarto publish accountsafter — should show no posit-connect-cloud accounts)
7b: Multiple Accounts Without ACCOUNT_ID (--no-prompt)
If the access token has access to multiple publishable accounts:
Publish fails with error: "Multiple publishable accounts found. Set POSIT_CONNECT_CLOUD_ACCOUNT_ID to select a specific account."
No content published
This matches other providers' behavior: ambiguous account selection fails in non-interactive mode.
Cleanup:
Re-authorize interactively for remaining tests.
Test 8: Provider Selection (Interactive)
Verify posit-connect-cloud appears in the interactive provider menu.
Run:
(No provider argument — triggers interactive selection.)
Check:
"Provider:" prompt shown
"Posit Connect Cloud" listed as an option
Selecting it proceeds to publish flow
Ctrl+C to cancel (or complete the publish)
Test 9: posit-cloud Deprecation Warning
Verify the old provider name shows a helpful warning.
Run:
Check:
Warning message displayed
Message mentions "no longer supported"
Message suggests
posit-connect-cloudMessage includes link to docs.posit.co
Command fails (provider not found after warning)
Test 10: Error Cases
10a: Invalid Token
Clear authentication error
No crash/stacktrace
10b: Deleted Content
Publish the single doc (or use existing from Test 1)
Delete the content from the Connect Cloud dashboard
Re-publish:
Silently detects content is gone via
resolveTarget(debug log: "not found" or "deleted")No "Publish update to:" prompt for the deleted target
Falls through to new publish flow ("Publish with account:" prompt)
Publishes successfully with new content ID
Old stale entry remains in
_publish.yml(not cleaned up — known limitation)
10c: --no-render Flag
Skips rendering
Still uploads and publishes (uses last rendered output)
Known issue: --no-render may produce incomplete bundles for single documents (missing supporting resources). This affects all bundle-based providers, not just Connect Cloud.
Test 11: Token Refresh
Access tokens expire after some time. To test proactive refresh:
Pre-condition: The stored token file must contain a valid refreshToken (present by default after interactive auth in Test 1).
Open the stored token file (see token storage path in Setup)
Change
expiresAtto a past timestamp (e.g.,1000)Publish:
Publish succeeds (token refreshed automatically)
Check stored token file:
expiresAtupdated to future valueNo re-authorization prompt
Results Template
| # | Test | Result | Notes |
|---|---|---|---|
| 1 | First-time authorization | ||
| 2 | Token persistence | ||
| 3 | Publish revealjs slides | ||
| 4 | Publish website | ||
| 5 | Update existing content | ||
| 6 | Account management | ||
| 7 | CI/CD mode | ||
| 7b | Multiple accounts without ACCOUNT_ID | ||
| 8 | Provider selection | ||
| 9 | posit-cloud deprecation | ||
| 10a | Invalid token error | ||
| 10b | Deleted content | ||
| 10c | --no-render flag | ||
| 11 | Token refresh |
Post-Testing Cleanup
Delete test content from the Connect Cloud dashboard
Remove stored tokens:
Unset env vars:
Revert any test fixture edits:
Test artifacts (
_publish.yml,_site/, rendered HTML) are covered by.gitignorein each fixture directory.