Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress e2e tooling - New cy.loadProjectConfig to load project configurations in tests #2578

Merged
merged 14 commits into from
Feb 11, 2025

Conversation

marcosnav
Copy link
Collaborator

Intent

PR to introduce a handy command to test the resulting configuration generated by the extension.

E.g:

cy.loadProjectConfig("an-R-project").then((config) => {
    // config is a JS object generated from the configuration .toml file
    /*
    {
        title: "r-proj",
        type: "rmd-shiny",
        entrypoint: "app.R",
        files: [
          //  ...
        ],
        r: {
            version: "4.3.3",
            //   ...
    }
    */
    expect(config.r.version).to.equal("4.3.3");

Type of Change

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

Approach

Just a Cypress command to load and parse configuration .toml files

User Impact

No user impact, testing purposes.

Automated Tests

Absolutely

Directions for Reviewers

Not much, take a look to the command and try out deployments suite which asserts the configuration for the only static project we have at the moment.

Checklist

@marcosnav marcosnav added this to the v1.12.0 milestone Jan 31, 2025
@marcosnav marcosnav self-assigned this Jan 31, 2025
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.

Looks quite handy! 😎

Copy link
Collaborator

@sagerb sagerb left a comment

Choose a reason for hiding this comment

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

I'd love to see a loadProjectDeploymentFile, but we can add that easily enough, as you've confirmed with our private chat. Let's get this merged in!

Had a nit..

Base automatically changed from e2e-init-setup to main February 11, 2025 18:52
@marcosnav marcosnav merged commit 3a31e02 into main Feb 11, 2025
13 checks passed
@marcosnav marcosnav deleted the e2e-assert-configs branch February 11, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants