Skip to content

Add e2e tests for sidebar Scan button behavior with interpreter detection #3716

@zackverham

Description

@zackverham

Context

PR #3704 replaced the Go /interpreters endpoint with a TypeScript interpreter detection module. A bug was found where relative projectDir paths caused requirements.txt detection to fail, making the sidebar erroneously show the Scan button for projects that should have been fully configured. This was fixed by resolving projectDir to an absolute path in state.ts.

Unit and integration tests were added to cover the path resolution and the interpreter detection pipeline, but there are no e2e tests validating the sidebar's end-to-end behavior — i.e., that the Scan button does not appear when a project has a valid requirements.txt and a Python interpreter is available.

What to test

Add Cypress e2e tests that validate:

  1. Python project with requirements.txt: The sidebar should display the detected Python version and requirements.txt as the package file — the Scan button should not appear.
  2. R project with renv.lock/DESCRIPTION: The sidebar should display the detected R version — the Scan button should not appear.
  3. Project with no package file: The Scan button (or equivalent prompt) should appear, since interpreter defaults are incomplete.

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions