-
Notifications
You must be signed in to change notification settings - Fork 5
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 automated testing support #39
Conversation
Uses [puppeteer](https://github.com/GoogleChrome/puppeteer) and Mocha Inspired by https://github.com/GoogleChrome/lighthouse/pull/4640/files
Wooo, thanks 👍 Could you give me some use case or quick demo ? PS : there is extensive changes in #34 , it may be great to merge from there. |
Quick demo : Firstly, install the required node modules, including mocha - a test framework, with Then use It basically launch a programmatically controlled chromium instance with your extension loaded, and does each test in there. It uses mocha; here's a Getting Started Guide about it if you're not familiar with it. Puppeteer is used to control the special Chromium instance. |
Two tests are included in tests.js, and it's up to us to create more
Using a user's list could cause issues honestly though. Plus @gervasiocaj isn't using staging.trakt.tv as suggested in trakt's API docs,
Currently, the tests are failing : I believe it's because he uses pt-br for the test translations, which is not a ISO 639-1 code as required by the extension. |
Also, I'd move all these files in a subdirectory - they should not be included with the extension when shipped and should be properly separated. |
The 1st test is now passing, however the underlying issue isn't fixed, we'll have to look into it - As you noticed, pt-BR works but not pt-br. However, when submitted by an user in the options windows, the extension always change the entered string to lowercase- we bypassed since we were manually writing to the extension's storage. I also went ahead and fixed the issue causing the second test to fail in #42. |
Will #34 be merged into |
I believe it'd be merged when deemed stable, so when the individual additions of 0.5 are tested - since @nliautaud marked them as "await testing". He's probably busy ATM though. |
You'd still have to edit the PR to set the target branch to nliautaud:0.5 so that only the correct diff/commits are shown :) |
Thanks both of you ! |
Uses puppeteer and Mocha
Inspired by https://github.com/GoogleChrome/lighthouse/pull/4640/files