Shared Javascript codebase for CLIQZ browsers
JavaScript HTML CSS Python Shell Groovy
Latest commit 38a00e5 Dec 30, 2016 @cliqz-ci cliqz-ci 2.11.1
Permalink
Failed to load latest commit information.
broccoli
configs
fern 2.9.0 Oct 6, 2016
git-hooks 2.9.0 Oct 6, 2016
modules
platforms
specific 2.11.0 Dec 22, 2016
subprojects 2.11.0 Dec 22, 2016
tests 2.11.0 Dec 22, 2016
.editorconfig 1.7.4 Jul 25, 2016
.eslintrc
.gitignore 1.10.0 Nov 14, 2016
Brocfile.js 2.11.1 Dec 30, 2016
Dockerfile
Dockerfile.firefox 1.10.0 Nov 14, 2016
Dockerfile.testem 2.11.0 Dec 22, 2016
Jenkinsfile 2.11.0 Dec 22, 2016
Jenkinsfile.docker-images 2.11.0 Dec 22, 2016
Jenkinsfile.publish 2.11.1 Dec 30, 2016
LICENSE 1.7.4 Jul 25, 2016
README.md 1.10.0 Nov 14, 2016
VERSION 2.11.1 Dec 30, 2016
bower.json 2.11.0 Dec 22, 2016
build-for-mobile.sh 1.10.0 Nov 14, 2016
build-helpers.groovy 2.11.0 Dec 22, 2016
fern.js 2.11.1 Dec 30, 2016
package.json
run_tests.sh
run_tests_docker.sh 1.10.0 Nov 14, 2016
run_tests_testem.sh 2.11.0 Dec 22, 2016
testem.json 2.11.0 Dec 22, 2016
yuidoc.json 1.7.4 Jul 25, 2016

README.md

Browser Core

CLIQZ is available on multiple platforms: browsers for Windows, Mac, Linux, and iOS (based on Mozilla/Firefox), as well as the CLIQZ browser for Android (based on Lightning). There's also the CLIQZ for Firefox browser extension.

Browser Core is used in:

Core modules

Browser Core consist of independent modules that together form the CLIQZ product. The most important ones are:

Requirements

Node version required: is >= 4.x

(use nvm to manage multiple node versions)

./fern.js install

Development

To start build system:

./fern.js serve

Release channel configuration file can be specified via optional argument (default is ./config/jenkins.json`):

./fern.js serve ./configs/amo.json

To run ember freshtab:

cd modules/fresh-tab-frontend ember serve -p 3000

You can then access freshtab under http://localhost:3000. Every change you make in fresh-tab-frontend folder will be live reloaded. However if you change anything in freshtab folder (backend), restart browser to see your changes.

To build ember freshtab: ./fern.js serve --freshtab ./configs/browser.json

By running above command you end up with minified distributed files in fresh-tab-frontend/dist folder. If you want these files to be moved into build/firefox folder, you also have to be running fern.

Flavours

All release channels configurations files are stored in ./configs folder. Choose your channel and build it with:

./fern.js build ./configs/<CHANNEL_NAME>.json

Examples:

  • ./fern.js build ./configs/amo.json
  • ./fern.js build ./configs/browser.json
  • ./fern.js build ./configs/mobile.json

Testing

you need to build extension with ./fern.js serve ./configs/jenkins.json configuration file in order to run tests.

Then open this URL to start tests chrome://cliqz/content/firefox-tests/index.html

Testing in Docker

It's now possible to run tests inside of docker locally. It can be useful for several reasons:

  1. Test any version of firefox without poluting your system.
  2. Make integration tests more robust as interacting with the browser while testing could break some tests.

The current setup allows you to:

  1. Choose a firefox version at build time.
  2. Run tests inside of docker.
  3. Connect and interact with running docker using any VNC client.
  4. Logs and test results are saved in the current extension directory.

Make sure the followings are available: fabric and jinja2. Also, if xtightvncviewer is available on your system, a vnc connection will automatically be created to the running docker so that you can inspect running tests.

Everything can be done with only one command but make sure your developement environment is setup correctly; that is, you can run ./fern.js build and it should build the extension successfuly (which will be attempted by the script if no build folder is present):

./run_tests_docker.sh <FIREFOX_VERSION>

Where <FIREFOX_VERSION> can be any released version. For example: ./run_tests_docker.sh 47.0.1.

You can manually connect to docker with any VNC client on localhost, port 15900, password vnc.

Contributions

Please use the configuration from editorconfig. Make sure to check out the JavaScript Style Guide and ensure that your code complies with the rules.