test: Add E2E for file and directory interaction#3458
Conversation
test/e2e/support/commands.js
Outdated
| if (excludeDirs.includes(subdir)) return; | ||
| const target = `content-workspace/${subdir}/.posit`; | ||
| cy.exec(`rm -rf ${target}`, { failOnNonZeroExit: false }); | ||
| const dockerPath = target.replace( |
There was a problem hiding this comment.
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.
This seems like the clearupDeployment might not be working as expected for some deployments.
There was a problem hiding this comment.
@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 */ | |||
There was a problem hiding this comment.
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... 🤔
There was a problem hiding this comment.
A dependency update got this fixed up on main. It turns out our CI wasn't linting test/e2e, it is now.

Intent
Adds back an E2E test for file and directory opening.
Type of Change
Automated Tests
Add back E2E test
Checklist