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

fix: set the value of testingType in project-ct #16885

Merged
merged 2 commits into from Jun 10, 2021
Merged

Conversation

elevatebart
Copy link
Contributor

@elevatebart elevatebart commented Jun 9, 2021

User facing changelog

Before this PR launching cypress open-ct (Component Testing) with the function exported by cypress/plugins/index.js returning nothing would yield a "No test found" error.
Now we can omit this return config if it is not changed in the function.

Additional details

const path = require('path')
const { startDevServer } = require('../dist')

module.exports = (on, config) => {
  on('dev-server:start', async (options) => {
    return startDevServer({
      options,
      viteConfig: {
        configFile: path.resolve(__dirname, '..', 'vite.config.ts'),
      },
    })
  })

  return config; // << this statement is not necessary anymore
}

The main file to review is the last one: project-ct.ts
The rest are examples updates and changes to scaffolding with create cypress-tests to reflect the simplified setup.

How has the user experience changed?

Before: with no return config every spec file would yield the error below
Screen Shot 2021-06-09 at 5 02 24 PM

After: tests are running with or without the return config

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 9, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Jun 9, 2021



Test summary

17994 0 214 7Flakiness 0


Run details

Project cypress
Status Passed
Commit f41c8b6
Started Jun 10, 2021 12:21 AM
Ended Jun 10, 2021 12:31 AM
Duration 10:55 💡
OS Linux Debian - 10.8
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

LGTM, one comment!

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.

Forced to return config in the plugins file even I don't change it
2 participants