GithubHelp home page GithubHelp logo

jason-cooke / all-aboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozilla/all-aboard

1.0 1.0 0.0 173.93 MB

Mozilla Firefox Desktop Onboarding Add-On

License: Mozilla Public License 2.0

JavaScript 62.33% CSS 6.35% HTML 19.01% Python 12.31%

all-aboard's Introduction

Build Status

#All Aboard The Mozilla Firefox Educational Tool

Installing All-Aboard

Your first step in trying this, in development add-on, is to tweak your Firefox config a little. Open up Firefox and go to about:config. Click on the blue button to acknowledge that you will be careful, and search for:

xpinstall.signatures.required

See SUMO if you get stuck

Double click on the item and it's value should change to false. You can now download and install the add-on.

First run

In order to trigger the onboarding experiment, you must visit the firstrun page and answer the two questions your are prompted with.

https://www.mozilla.org/firefox/47.0/firstrun/

Contributing

To run the add-on during development and testing, you will need to first follow the jpm installation instructions found on MDN here: https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm#Installation

Once installed you can launch the add-on as follows:

jpm run --binary-args www.mozilla.org/en-US/firefox/47.0/firstrun/

To run the addon in keeping with proper sessioning, you can launch the addon using:

jpm run --binary-args www.mozilla.org/en-US/firefox/47.0/firstrun/ --profile PROFILE_NAME --no-copy

To ease development and testing of the add-on, it is possible to configure the time intervals and elapsed time formula using a JSON config file.

In the root of the project folder, add a file called config.json as follows:

{
    "afterInteractionCloseTime": 5000,
    "defaultSidebarInterval": 10,
    "defaultSidebarCloseTime": 7000,
    "timeElapsedFormula": 1000,
    "waitInterval": 10000
}

The values are defined as follows:

  • afterInteractionCloseTime - The amount of time to wait before auto closing the sidebar after user interaction.
  • defaultSidebarInterval - Time between sidebars defined in seconds
  • defaultSidebarCloseTime - Time to wait before auto closing the sidebar if there is no interaction by the user.
  • timeElapsedFormula - This is the formula used to convert milliseconds to either minutes, hours etc. If you for example set this to 1000, it will devide the milliseconds to seconds.
  • waitInterval - This is the interval, set in milliseconds, that the timer will wait until triggering the next badge update and notification.

If the above file is not present, the add-on will use it’s defaults of 24 hours.

Functional tests

Functional tests are implemented using Selenium and the python Marionette client to allow access to both web content and the browser chrome.

To write and run the tests you need a couple of additional dependecies:

Once you have the above installed, create a virtual environment for the project:

mkvirtualenv all-aboard

Once the environment has been created, you need to install Tox:

pip install tox

In order to run the tests, you will either have to have the geckodriver on your path or, pass it on the command line. To add it to your path, run the following:

export PATH=$PATH:/path/to/gecko/driver/

Note that currently you need the change the name of the driver from geckodriver to wires or else selenium will not detect the driver.

Run the tests with Tox:

tox -e tests

You can also specifiy a specific Firefox binary to run the tests again as follows:

tox -e tests -- --firefox-path=/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox

all-aboard's People

Contributors

alexgibson avatar francescostl avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.