Skip to content

test: Add E2E test for last selected deployment on init#3457

Open
zackverham wants to merge 9 commits intomainfrom
test/last-selection-initialization
Open

test: Add E2E test for last selected deployment on init#3457
zackverham wants to merge 9 commits intomainfrom
test/last-selection-initialization

Conversation

@zackverham
Copy link
Collaborator

@zackverham zackverham commented Feb 5, 2026

Intent

Add integration test verifying that the last selected deployment is automatically loaded when the extension initializes. This is a regression test for #2459 which was fixed in #2460.

Closes #2473

Type of Change

This is a test addition - so not really any of the below checkboxes.

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

Adds a test to validate a regression fix.

User Impact

n/a

Automated Tests

Improves test coverage.

Directions for Reviewers

Checklist

  • I have updated the root CHANGELOG.md to cover notable changes.

Add integration test verifying that the last selected deployment
is automatically loaded when the extension initializes. This is a
regression test for #2459 which was fixed in #2460.

Closes #2473

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@zackverham zackverham marked this pull request as ready for review February 5, 2026 21:02
@zackverham zackverham requested a review from a team as a code owner February 5, 2026 21:02
@zackverham zackverham self-assigned this Feb 5, 2026
cy.expectInitialPublisherState();

// Create a deployment (this also selects it)
cy.createPCSDeployment(
Copy link
Collaborator

Choose a reason for hiding this comment

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

May have to clear up with deployment after the test runs to get other e2e tests passing

zackverham and others added 3 commits February 6, 2026 11:50
Ensure the static project deployments are cleaned up after the test
to prevent affecting other E2E tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The propagateDeploymentSelection function was not awaiting the async
saveSelectionState call, causing a race condition where the UI would
update before the workspace state was persisted. This caused the
E2E test for last selection initialization to fail because cy.reload()
could happen before the selection was saved.

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

I wonder if this will start to work after a rebase now that #3367 is merged

zackverham and others added 5 commits February 12, 2026 18:32
…g tests

Changes to deployments.cy.js:
- Add cy.debugIframes() after reload for consistency with beforeEach
- Wait for webview to fully initialize before checking for entrypoint-label
- Use two-phase check: first wait for any UI element, then verify selection

Changes to error-err-config.cy.js:
- Add retryWithBackoff when searching for error deployments in quick-input
- Use jQuery pattern to avoid Cypress timeout issues when list is loading

These changes address timing issues in CI where the webview or quick-input
list may not be immediately ready after page load.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

Add integration test verifying last selection loaded on initialization

2 participants