Conversation
Integrate Puppeteer tests into the existing Python Editor tests.
|
In |
|
Move existing tests -> each test should have its own |
- restructure tests so each test has its own -spec.js file - start & stop local server after all tests - remove device aspect of tests, and remove dependencies
|
@microbit-carlos I've restructured the tests in 25c8f59 |
Neaten & fix tests by fixing test file paths.
Allows us to use a single browser object across all tests.
|
@microbit-carlos I've updated the tests so that the Puppeteer tests all belong in a single |
tests/spec/puppeteer-spec.js
Outdated
| let fileInput = await page.$('[name="load-form-file-upload"]'); | ||
| await fileInput.uploadFile('./src/makecode.hex'); | ||
| await page.click('[value="Load"]'); | ||
| await page.waitFor(2000); |
There was a problem hiding this comment.
Is there any way to avoid this wait loop?
There was a problem hiding this comment.
It's not immediately obvious to me how we could, this also ensures the dialog opens within a given time limit.
- rearrange AAA - remove dialogs from old hex tests - clarify flags - reduce dialog wait
|
Great work Ross, this is good to go! Do you want to submit a PR upstream and get it running on azure pipelines? |
297e5ca to
d07f4f8
Compare
2e28d99 to
156ac57
Compare
Integrate Puppeteer tests into the existing Python Editor tests.
Includes: