-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 a test framework to test the JS part of the course #2471
Conversation
410fa34
to
7b3ac51
Compare
a7099cc
to
154b081
Compare
154b081
to
92ef84d
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.
This looks really cool from a quick local test run!
Small things to add here or in a later PR:
Feel free to do all this here or in later PRs, the existing setup is already a great improvement on what we have right now. |
Thinking about mdbook serve, yes there is a benefit to this I have not thought of by not having to recreate the book. |
…tart" and "npm test"
c23f458
to
01fa3dd
Compare
I included a second config, deriving from the regular config that uses |
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.
Looks awesome, please merge this so we can get it into production!
This is a first draft for a test framework for testing the JS part of the book that is discussed in #2462
It is using webdriverIO and the webdriverIO Expect API in combination with Mocha. WebdriverIO is taking care of accessing the webpage with a real browser and can access the state of the page so behavior can be asserted.
Currently only a small test for the speaker-notes implementation demos the functionality.
The Static Server Service is used to serve the book in a way that the test runner can access it.
A CI integration can look like https://webdriver.io/docs/githubactions/ and is implemented with a headless setup. In CI it uses the language variable to set environment variable that configures where the built book should be mounted from
Fixes #2462.