-
Notifications
You must be signed in to change notification settings - Fork 502
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
Add client component testing framework and tests #2853
Conversation
A couple of additional changes:
|
…cy-id (which doesn't)
OK, another couple of changes (some discussed over discord yesterday):
Please let me know if you have any additional comments. |
What do you think about moving the tests into a separate folder? I would prefer that if there isn't some specific reason to keep them together. |
Will do.
…On Tue, Apr 30, 2024, 00:28 advplyr ***@***.***> wrote:
What do you think about moving the tests into a separate folder? I would
prefer that if there isn't some specific reason to keep them together.
—
Reply to this email directly, view it on GitHub
<#2853 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMDFVWV5M6V7ID67M4IC7DY723Q5AVCNFSM6AAAAABGIGDPVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTG4YDQMBXGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I moved the tests to a separate directory. |
Also, can you please share your setup for auto-formatting/linting in vs code, so that I replicate them in my dev setup? |
I think it's just using prettier (auto formatting happens on my machine in the dev container and I never set it up) |
The In any case, that's not relevant to me, as I'm not running vs code in a devcontainer. I'm running it directly in Winodws 11. I suspect that even if you have the right extensions installed (and I'm not sure I do), the workspace settings in .vscode/settings.json are not covering all the required settings. |
Great, thanks! I don't use the devcontainer either. I think the settings is missing somethings I've been meaning to look at updating. The PR #2183 is helpful for this. The number of files that prettier formatter was changing will take hours to go through so I haven't gotten to it yet |
I just committed an update using @ahobsonsayers suggested changes in #2183 minus the formatter. cb1ebd4 A lot of files will have formatting changes for a bit but this should get us on the same track. |
I took a stab at adding client component testing.
My goals were, roughly:
I tried a few options. I must say that in most options I tried, it has been quite difficult to even reach something that actually works in our current Nuxt2+Vue2 environment.
I eventually settled on Cypress (which was already tried in #2240), but taking a very different approach from that PR, which tried to introduce complex e2e test scenarios. The reasons for picking Cypress, in a nutshell, were:
Obviously, there are also some caveats:
But, all-in-all, I think it's a quite reasonable testing framework for component-testing (and, as I mentioned above, really the only working one).
In this PR:
Please let me know what you think.