diff options
| author | Yuchen Pei <hi@ypei.me> | 2021-12-08 21:28:04 +1100 | 
|---|---|---|
| committer | Yuchen Pei <hi@ypei.me> | 2021-12-08 21:28:04 +1100 | 
| commit | 363292644c504033b35b1dfff1342c35f17d66f4 (patch) | |
| tree | 6b6f1109ea83d615d40d3387f0e37fe045a4d6d8 /README | |
| parent | 17a7b73d5446ad7e0f1eab4caba3b4b93c447275 (diff) | |
Added a script that checks a url for compliance in the command line.
Also added copyright and license header to the headless test script.
Diffstat (limited to 'README')
| -rw-r--r-- | README | 28 | 
1 files changed, 25 insertions, 3 deletions
| @@ -37,9 +37,12 @@ is loaded as a "temporary add-on" from about:debugging.  Otherwise (if included in the xpi, see BUILD above) it can be launched from the  UI by clicking the [Automated self test...] button. -To launch the test in command line, ensure the extension has been -built with automated test suite. Then install selenium-webdriver and -geckodriver, and ensure the latter is in $PATH: + +HEADLESS TESTS: + +To launch the test suite from the command line, ensure the extension +has been built with automated test suite. Then install +selenium-webdriver and geckodriver, and ensure the latter is in $PATH:    $ npm install selenium-webdriver    $ npm install geckodriver @@ -56,6 +59,25 @@ Optionally you can also test with a chosen seed    $ node ./test.js 12345 +HEADLESS COMPLIANCE CHECK: + +To check whether a webpage is LibreJS-compliant from the command line, ensure that the extension has NOT been built with automated test suite. Then install selenium-webdriver and geckodriver, and ensure the latter is in $PATH: + +  $ npm install selenium-webdriver +  $ npm install geckodriver +  $ export PATH=$PATH:./node_modules/.bin + +Now you can check a webpage for compliance with + +  $ node ./compliance.js <url> + +It will open the url in a headless browser, save a screenshot, and output the compliance check result. + +For example, to check the compliance of the FSF homepage, do + +  $ node ./compliance.js https://fsf.org + +  CONTACT:  Development mailing list: bug-librejs@gnu.org | 
