-
Notifications
You must be signed in to change notification settings - Fork 36
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
deps/upgrade webauthn test support #2747
deps/upgrade webauthn test support #2747
Conversation
092bf6e
to
e12d995
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉
I think it is a great step to enable js testing. It seems like this pr would close #2583, so it probably makes sense that @seluianova also takes a look at this.
When I tested this pr, I got an error that vitest exceeds the maximum number of file watchers on my system, because it seems to be watching every file in this repo (Including files of dependencies) for some reason. I managed to get rid of the error using this vitest.config.ts
file:
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['integreat_cms/static/src/js/__tests__/**'],
watch: false,
}
})
But I find it very weird that the watch: false
option seems to be required to prevent this error, and that the glob is not enough to prevent it from watching every file.
Apart from that I think it makes sense to run npm test as part of our ./tools/test.sh
, or is there a reason against that?
Watching files in .venv is not required, since we don't have any tests there and it can also lead to problems on platforms that only allow a limited number of file watchers. Co-authored-by: deen13 <[email protected]>
7479405
to
8506b64
Compare
Just for the record: @david-venhoff and I successfully resolved the mentioned issue in commit 09be3e5. |
That's a good point @david-venhoff! I took a look at |
I believe the pull request only partially resolves the issue because it focuses solely on adding unit tests, whereas the mentioned issue pertains to UI tests. Nevertheless, I'm eager to contribute to UI testing if it's still necessary. Otherwise, feel free to disregard my comment. |
@david-venhoff right, in UI tests we wanted to add end-2-end kind of tests, that simulate user interaction. Like opening the browser, filling in fields, clicking on buttons, etc. At least that was my understanding of the task |
Ah okay 👍
Imo in an ideal world, we would have the parameters that can be passed to |
Short Description
This pull request configures vitest and adds a simple test as suggested in my review of deps/upgrade_webauthn_2_0.
Proposed Changes
package.json
Pull Request Review Guidelines