Skip to content

feat: add Nightwatch for end-to-end testing #257

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

Merged
merged 17 commits into from
Jun 8, 2023

Conversation

vaibhavsingh97
Copy link
Contributor

Hello 👋 ,

This PR integrates nightwatch as an end-to-end testing solution for the create-vue CLI. With this integration, developers can quickly write and run automated tests for their Vue applications using the popular nightwatch testing framework.

Thank you

cc @sodatea

@vaibhavsingh97
Copy link
Contributor Author

vaibhavsingh97 commented Apr 25, 2023

I wonder why the tests are failing in CI; locally, the tests are passing.

@@ -0,0 +1,12 @@
{
"extends": "@vue/tsconfig/tsconfig.web.json",
Copy link
Member

Choose a reason for hiding this comment

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

Should be changed to .dom.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@haoqunjiang
Copy link
Member

Thanks! The templates look pretty good to me now.
However, I still need some more time to play with it a little bit more because of the complexity.

So I'd like to cut one more release of create-vue before merging this one.
I plan to ship this feature with the coming update to Vue 3.3, or soon after if the testing takes longer.

@vaibhavsingh97
Copy link
Contributor Author

Hi @sodatea, I was wondering if there are any updates I need to make to this PR for it to be merged.

@haoqunjiang
Copy link
Member

As far as I've tested, the changes are good.

The only concern is the implicit hard dependency on the jsx option, because the jsx plugin is used in the new vite.config.js. We want JSX support to be optional.

To fix that issue, we need some kind of logical composition for vite.config.js templates, so that the templates can handle more complex scenarios.
But I think that deserves another PR, and I'm merging this one now.

@haoqunjiang haoqunjiang merged commit ff67dcb into vuejs:main Jun 8, 2023
@vaibhavsingh97 vaibhavsingh97 deleted the feat/add-nightwatch branch June 8, 2023 07:22
haoqunjiang added a commit that referenced this pull request Jun 9, 2023
The base template has an `vite.config.js.ejs` template file, which reads
data from a corresponding `vite.config.js.data.mjs` file. The data file
has a default export called `getData()`.
Other templates can also have data files that can be chained together
so that they can modify the data fed into the template. They don't have
to write the template again, though.

This fixes the issue mentioned in #257 (comment)

As we don't support plugins or extensions for this tool, I didn't choose
to design the feature in an extensible way, but only considered ease of
implementation and ease of modification.
haoqunjiang added a commit that referenced this pull request Jun 12, 2023
The base template has a `vite.config.js.ejs` template file, which reads data from a corresponding `vite.config.js.data.mjs` file. The data file has a default export called `getData()`.
Other templates can also have data files that can be chained together so that they can modify the data fed into the template. They don't have to define the template again, though.

This fixes the issue mentioned in #257 (comment)

As we don't support plugins or extensions for this tool, I didn't choose to design the feature in an extensible way, but only considered ease of implementation and ease of modification.
jasonreyes9 added a commit to jasonreyes9/create-vue-script that referenced this pull request Oct 31, 2023
The base template has a `vite.config.js.ejs` template file, which reads data from a corresponding `vite.config.js.data.mjs` file. The data file has a default export called `getData()`.
Other templates can also have data files that can be chained together so that they can modify the data fed into the template. They don't have to define the template again, though.

This fixes the issue mentioned in vuejs/create-vue#257 (comment)

As we don't support plugins or extensions for this tool, I didn't choose to design the feature in an extensible way, but only considered ease of implementation and ease of modification.
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