Skip to content

test: Add E2E for file and directory interaction#3458

Open
fizzboop wants to merge 3 commits intomainfrom
bh-file-open-e2e-test
Open

test: Add E2E for file and directory interaction#3458
fizzboop wants to merge 3 commits intomainfrom
bh-file-open-e2e-test

Conversation

@fizzboop
Copy link
Contributor

@fizzboop fizzboop commented Feb 5, 2026

Intent

Adds back an E2E test for file and directory opening.

Type of Change

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

Automated Tests

Add back E2E test

Checklist

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

@fizzboop fizzboop self-assigned this Feb 5, 2026
@fizzboop fizzboop requested a review from a team as a code owner February 5, 2026 22:06
if (excludeDirs.includes(subdir)) return;
const target = `content-workspace/${subdir}/.posit`;
cy.exec(`rm -rf ${target}`, { failOnNonZeroExit: false });
const dockerPath = target.replace(
Copy link
Contributor Author

@fizzboop fizzboop Feb 6, 2026

Choose a reason for hiding this comment

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

Claude noticed that the clearupDeployments method had a different setup than other methods savePublisherFile and writeTomlFile which used the dockerPath. The files created inside Docker containers are owned by the container user (coder). When the test cleanup tries to
delete these files from the host machine using cy.exec('rm -rf ...'), it fails due to permission mismatches.

This works locally, but fails in CI.

When reviewing the video from the Github artifact, there was a long list of deployments for the error-err-config.cy.js file.

Image

This seems like the clearupDeployment might not be working as expected for some deployments.

Locally, it looks like this:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dotNomad @marcosnav: I'm not too familiar with CI setup, so feedback is greatly appreciated.

@@ -1,4 +1,5 @@
// Copyright (C) 2025 by Posit Software, PBC.
/* eslint-disable cypress/unsafe-to-chain-command */
Copy link
Contributor Author

@fizzboop fizzboop Feb 6, 2026

Choose a reason for hiding this comment

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

When running the lint command, I was getting errors from the chained commands of:

cy.get(".quick-input-widget input").clear().type(`${value}{enter}`);
cy.get(".quick-input-widget input").clear().type(`> ${commandLabel}`);

Not entirely sure how this wasn't caught before... 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

A dependency update got this fixed up on main. It turns out our CI wasn't linting test/e2e, it is now.

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