Skip to content

Add 6 high-priority E2E tests for redeployment, Quarto, multi-deploym…#3674

Draft
zackverham wants to merge 5 commits intomainfrom
e2e/add-high-priority-tests
Draft

Add 6 high-priority E2E tests for redeployment, Quarto, multi-deploym…#3674
zackverham wants to merge 5 commits intomainfrom
e2e/add-high-priority-tests

Conversation

@zackverham
Copy link
Collaborator

@zackverham zackverham commented Mar 9, 2026

Summary

Adds 6 new Cypress E2E tests covering the highest-priority gaps identified during test coverage analysis. Also adds supporting custom commands and a Quarto content fixture.

New Test Files

File Priority Coverage Gap
redeployment.cy.js P0 Deploy, modify content, redeploy — verifies same record is reused and bundle_id changes
quarto-deployment.cy.js P0 Quarto document deployment — validates type=quarto-static, files include _quarto.yml
multi-deployment-switching.cy.js P1 Creates two deployments, switches between them via picker, verifies UI updates
file-include-exclude.cy.js P1 Toggles file checkboxes in project-files tree, verifies TOML config updates
package-management.cy.js P1 Verifies python-packages section displays detected packages from requirements.txt
deployment-logs.cy.js P1 Verifies "Last Deployment Successful" status, "View Content" button, and deployment record fields

Supporting Changes

  • test/e2e/support/commands.js — Added modifyFileInContainer() and countDeploymentRecordFiles() custom commands
  • test/e2e/content-workspace/quarto-doc/ — New fixture with _quarto.yml and a markdown-only .qmd file (no Python/R engine dependency)

Test plan

  • Run redeployment test: npx cypress run --spec tests/redeployment.cy.js
  • Run Quarto deployment test: npx cypress run --spec tests/quarto-deployment.cy.js
  • Run multi-deployment switching test: npx cypress run --spec tests/multi-deployment-switching.cy.js
  • Run file include/exclude test: npx cypress run --spec tests/file-include-exclude.cy.js
  • Run package management test: npx cypress run --spec tests/package-management.cy.js
  • Run deployment status test: npx cypress run --spec tests/deployment-logs.cy.js
  • Verify all tests pass against Connect via just dev from test/e2e/
  • FastAPI tests require Connect >= 2025.03 (requires-python support)

🤖 Generated with Claude Code

zackverham and others added 5 commits March 9, 2026 15:40
…ent switching, file toggling, packages, and deployment status

Addresses coverage gaps identified in E2E test analysis:
- redeployment.cy.js: deploy, modify content, redeploy; verify same record reused
- quarto-deployment.cy.js: Quarto document deployment with new fixture
- multi-deployment-switching.cy.js: create two deployments, switch via picker
- file-include-exclude.cy.js: toggle file checkboxes, verify TOML updates
- package-management.cy.js: verify Python packages section shows detected packages
- deployment-logs.cy.js: verify post-deploy status, View Content button, record fields

Also adds modifyFileInContainer and countDeploymentRecordFiles custom commands
and a quarto-doc content fixture (markdown-only, no Python/R engine).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The version skip is only needed when actually deploying to Connect (for
requires-python support). These tests only create configs and interact
with the sidebar UI, so they don't need the version gate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add resetCredentials() call before setAdminCredentials() so the
credentials file is clean before appending. Without this, each spec
file's before() hook appends a duplicate [credentials.admin-code-server]
TOML table, causing the credential picker to fail after enough specs run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator

@dotNomad dotNomad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some of these will be able to be converted to more rigorous unit tests on the different components or parts of the code that do these things. Like file-include-exclude.cy.js I think we can verify that the checkboxes work with specific data, the data we get from our TS method is what we expect, and the TOML config reader gets that data.

Having said that though these are great tests to catch us while we are doing this migration.

If these pass CI I'm very happy to get them merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants