Skip to content
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

Merge web extension experiments support to master #73

Merged
merged 170 commits into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
c20531e
Two nits
motin Mar 10, 2018
0529c28
Use npm run lint instead of npm run eslint + committing the effects o…
motin Mar 10, 2018
2b738d1
Moved majority of docs from readme to DEV and TESTPLAN, making the re…
motin Feb 15, 2018
5749e6b
Changed structure of template from hybrid add-on with embedded webext…
motin Mar 2, 2018
89c9d2e
Restored most of the button icon example study
motin Mar 2, 2018
21ea464
Let readme reflect the current conversion to web extension experiments
motin Mar 2, 2018
b6c2f4f
Npm commands restored (using web-ext)
motin Mar 2, 2018
3671078
Renamed webextension source directory to src
motin Mar 2, 2018
aefba05
Using web-ext-config.js simplifies commands drastically
motin Mar 2, 2018
3ba5224
Using dist/ as build output directory
motin Mar 2, 2018
e0d2ae5
Updated docs and commands to reflect web extensions
motin Mar 2, 2018
4ac9f97
Restored initiation of test runs
motin Mar 2, 2018
1511701
Improved dev docs
motin Mar 2, 2018
d460d0c
Tweaks, formatting, linting
motin Mar 2, 2018
0fe681f
Removed unused example study icons
motin Mar 2, 2018
42a4a03
Minor tweaks while debugging the broken browserAction
motin Mar 2, 2018
e18cbd2
Updated package-lock.json
motin Mar 2, 2018
9ba41eb
Specified study utils as a runtime dependency since it is
motin Mar 4, 2018
6f63fe7
Example study ui works as advertised
motin Mar 4, 2018
cd0f4ed
Linting of manifest.json
motin Mar 4, 2018
73cb290
Fixpack results
motin Mar 4, 2018
ee5feb0
Fixed incorrect path in npm run lint:addons-linter
motin Mar 4, 2018
c47af61
Removed likely-to-be-obsolete dependencies
motin Mar 4, 2018
055d652
Updated package-lock.json
motin Mar 4, 2018
6050333
Removed unused icons from file tree docs (again)
motin Mar 9, 2018
74460a9
Removed some stale files and doc references due to rebase
motin Mar 10, 2018
ff69cd4
Updated path to add-on zip in npm commands
motin Mar 22, 2018
9a8521c
Nits in DEV.md
motin Mar 22, 2018
838e813
Excluded verbose output for web-ext lint
motin Mar 22, 2018
be41ea6
Removed addons-linter since we use web-ext lint instead
motin Mar 22, 2018
6ffe693
Improved eslint config as proposed in https://github.com/mozilla/shie…
motin Mar 22, 2018
1ef51ec
Linting
motin Mar 22, 2018
697f1bc
Valid license field value
motin Mar 22, 2018
9dd81c4
Ensured that tests are not run without the minimum required node version
motin Mar 22, 2018
cee1128
Npm run format
motin Mar 22, 2018
18a0961
Added and applied npm run docformat
motin Mar 22, 2018
b63c8f0
Added "Using this template" to readme
motin Mar 22, 2018
660f571
Moved doc headers to the top
motin Mar 22, 2018
b523490
Nit: WebExtension instead of Web Extension + updated readme title
motin Mar 22, 2018
dc0b91a
Imported dev docs + functional and unit testing structure from latest…
motin Mar 22, 2018
a8860bc
Included adapted version of About This Repository from https://github…
motin Mar 22, 2018
68b861e
Npm run format + linting
motin Mar 22, 2018
e8a25bf
Ported relevant parts of the example-addon-repo test/utils.js before …
motin Mar 22, 2018
4c94705
Moved javascript files related to functional tests into test/functional
motin Mar 22, 2018
ff66d34
Restored and tweaked npm test command
motin Mar 23, 2018
0a8af98
Moved module.exports.promiseAddonButton to button_test + async await …
motin Mar 23, 2018
8e86259
Restored loading Config.jsm (will not work with const or let)
motin Mar 23, 2018
d14267e
Web ext verbose mode only for npm start
motin Mar 23, 2018
62faeb6
Npm run test:func bail after first test failure
motin Mar 23, 2018
b34135e
Using extension id from manifest instead of hard-coding add-on widget…
motin Mar 23, 2018
08c3403
Moved ui button related test stubs to button_test and implemented the…
motin Mar 23, 2018
8c10bb9
Moved notification-bar related tests to own test file + moved relevan…
motin Mar 23, 2018
5749c55
Linting
motin Mar 23, 2018
271cc64
Renamed functional_tests to basic_telemetry and cleaned it up a bit
motin Mar 23, 2018
7ac9281
Removed js that will be part of study utils v5 rather than the templa…
motin Mar 23, 2018
c434e64
Minimal l10n incl test
motin Apr 5, 2018
7ede0d8
Updated the template to confirm to the latest shield-studies-addon-ut…
motin Apr 5, 2018
4492050
Npm run script tweaks
motin Apr 5, 2018
41ebf12
Updated functional tests to use the new test util namespaces in ssat
motin Apr 5, 2018
4cb9223
Converted legacy Feature.jsm into Feature.js and introductionNotifica…
motin Apr 5, 2018
c4135d9
Fix to event listener issue as per https://bugzilla.mozilla.org/show_…
motin Apr 5, 2018
b29a721
Added npm link instructions to readme for developers to be able to tr…
motin Apr 5, 2018
c867148
Minor fixes mostly related to testing and circle ci
motin Apr 20, 2018
9770376
Doc nits
motin Apr 20, 2018
f3b8a35
Not initiating study - awaiting refactoring to the latest proposal of…
motin Apr 20, 2018
276733f
Updated package-lock json - without utils dep
motin Apr 20, 2018
f1bb7ea
Not requiring npm link to try out the latest develop branch
motin Apr 20, 2018
1e2b6f9
Npm start no longer verbose web-ext by default
motin Apr 20, 2018
aa86b6f
Converted study to work with the latest wip v5 API
motin Apr 25, 2018
f2cd681
Clarified the event emitted class and instance variable in the introb…
motin Apr 25, 2018
d2b95d2
Linting and formatting
motin Apr 25, 2018
f060987
Restored the introduction notification bar to be shown on first run
motin Apr 25, 2018
3756c4e
Using release firefox until support for latest nightly has been restored
motin Apr 25, 2018
b27a17f
Restored tests
motin Apr 25, 2018
b56539b
Smaller nits and tweaks
motin Apr 25, 2018
2349332
Updated circle ci config to run only functional tests + cleanly insta…
motin Apr 25, 2018
b68d376
Update Circle-CI badge to point to Circle-CI (as per https://github.c…
motin Apr 25, 2018
70c7936
Fix https://github.com/mozilla/shield-studies-addon-template/issues/65
motin Apr 25, 2018
a5624c9
Nit readme wording
motin Apr 25, 2018
23764ba
Update the cache keys to force a newer version of nightly in circle
motin Apr 25, 2018
da88946
Not falling back to an old circle cache if cache does not exist alrea…
motin Apr 25, 2018
6b66b2b
One more attempt to invalidate the cache properly and get the latest …
motin Apr 25, 2018
ce8e795
Updated upstream api: isFirstRun is baked into studyInfo
motin Apr 26, 2018
6b46a03
Updated shield utils to 5.0 RC
motin May 23, 2018
3da2dfc
Updated shield utils boilerplate as per the small study example (exce…
motin May 23, 2018
314d652
Attempt to implement browser.alarms but ultimately had to comment it …
motin May 24, 2018
884a4db
Updated shield utils
motin May 24, 2018
e244348
Test utils setup -> setupWebdriver
motin May 24, 2018
2be1ce3
Restored tests
motin May 24, 2018
8ea9827
Enable verbose shield study utils logging
motin May 24, 2018
392b4d3
Updated cache ref for circle to use the latest nightly
motin May 24, 2018
75a422d
Letting circle ci cache be invalidated by changes to package-lock.jso…
motin May 24, 2018
1a7ef1f
Increased wait for initial pings in tests
motin May 24, 2018
439f1c5
Updated to latest utils develop branch and corresponding small-study …
motin Jun 3, 2018
6c99c82
Renamed basic telemetry test group to shield utils integration
motin Jun 3, 2018
56c6a96
Hook for feature cleanup
motin Jun 3, 2018
374a15f
Formatting
motin Jun 3, 2018
2dc28db
Using dev edition instead of nightly as target
motin Jun 3, 2018
1cfa228
Merge pull request #64 from motin/wip-restore-tests
motin Jun 3, 2018
45f895e
Include commits merged to master branch during develop-branch lifetim…
motin Jun 3, 2018
c7dc2bd
Renamed Feature.js -> feature.js and moved construct to feature.js
motin Jun 8, 2018
0831c80
Partial removal of the bundle shield studies addon utils bash script
motin Jun 8, 2018
982e970
Updated template with latest utils small-study boilerplate
motin Jun 8, 2018
a4bab0f
Formatting
motin Jun 8, 2018
c692d0c
Restored loading feature.js background script
motin Jun 8, 2018
3dbfde9
Tests clean-up and restoration
motin Jun 8, 2018
b4d24f2
Removed use of utils.telemetry.filterPings
motin Jun 8, 2018
980be7a
Removed unnecessary eslint flag
motin Jun 8, 2018
1236565
Clarified the feature instance creation line comment
motin Jun 8, 2018
ec2e43a
Unit test example
motin Jun 9, 2018
d68e2b5
Using spec.js suffix for unit tests
motin Jun 9, 2018
d5a1189
Code coverage for unit tests
motin Jun 9, 2018
8ce7820
Mention npm 6+ in docs
motin Jun 9, 2018
69b77e8
Removed unused files in test directory
motin Jun 9, 2018
9058ac0
Updated docs about unit tests
motin Jun 9, 2018
275e03e
Updated circle ci config to run unit tests + store coverage reports
motin Jun 9, 2018
e686a28
Using npm ci instead of npm install in circle ci workflow
motin Jun 9, 2018
dc22193
Revert "Using npm ci instead of npm install in circle ci workflow"
motin Jun 9, 2018
0bc649b
Setting $FIREFOX_DEVELOPER_BIN so that karma launches an up to date f…
motin Jun 9, 2018
4625556
Merge pull request #72 from motin/cleanups-and-improvements
motin Jun 12, 2018
c7d8d0e
Moved to official published v5 of utils
motin Jun 15, 2018
c184b86
Temporarily disabling nsp check awaiting upstream package.json-fix to…
motin Jun 15, 2018
ae6f79a
Restored nsp check during lint, but with --warn-only (thanks @pdehaan)
motin Jun 15, 2018
51efc55
Updated shield utils to 5.0.1 and restored nsp checks
motin Jun 19, 2018
c1d624b
Updated boilerplate as per shield utils 5.0.1
motin Jun 19, 2018
5672b43
Running CI tests on both dev edition and nightly
motin Jun 19, 2018
b12cab4
Inactivated an invalid button test
motin Jun 19, 2018
f55ef1c
Npm start (web-ext run) takes FIREFOX_BINARY into consideration
motin Jun 19, 2018
098248d
Removing docs originally imported from mozilla/example-addon-repo
motin Jun 19, 2018
f875e62
Refreshed dev docs to reflect current template
motin Jun 19, 2018
7bcd92a
Updated eslintignore to not lint get-firefox artifacts
motin Jun 19, 2018
d722f37
Results of npm audit fix --force
motin Jun 19, 2018
ab95d74
Restored ci tests
motin Jun 19, 2018
e2477a7
Showing all shield log messages on npm start
motin Jun 20, 2018
a4ce68e
Updated the wee notice of the readme to reflect the status after the …
motin Jun 20, 2018
afe4676
Synced eslint rules with utils eslint
motin Jun 21, 2018
ef2658a
General doc improvements
motin Jun 21, 2018
4598446
Noting that main telemetry is somewhat affected by add-ons using shie…
motin Jun 21, 2018
ba5dac2
Smaller nits and clean-ups
motin Jun 21, 2018
7bc03a1
Added browser.testingOverrides API to be able to set testing flags vi…
motin Jun 21, 2018
c3cc984
Unit tests also runs against release and beta by default
motin Jun 21, 2018
109e69c
Formatting
motin Jun 21, 2018
4a735fd
Renamed tests to control execution order
motin Jun 21, 2018
f977221
Improved and clarified readme
motin Jun 22, 2018
d31e965
Using shield utils 5.0.2 from npm
motin Jun 24, 2018
ea8c195
Mark package as private, to prevent accidental publish to npm
motin Jun 24, 2018
e22dd49
Manifest requests permission to browser.management, necessary for bro…
motin Jun 24, 2018
14e9776
The ending for ineligible should not trigger opening of a survey by d…
motin Jun 24, 2018
a8d829e
Smaller clean-ups
motin Jun 24, 2018
d5b55ca
Corrected the pref for variationName override
motin Jun 24, 2018
90bab52
Extended tests to cover expiration cases (confirmed passing)
motin Jun 24, 2018
1b0b4d9
Added (passing) test: should have sent exit telemetry upon uninstalla…
motin Jun 26, 2018
cc60f20
Npm audit fix
motin Jun 26, 2018
870ce4d
Documented npm run generate and npm run format in DEV.md
motin Jul 5, 2018
0e42eee
Not running CI tests on branded releases
motin Jul 5, 2018
9fddb2b
Import EventEmitter from ExtensionUtils or ExtensionCommon depending …
motin Jul 28, 2018
19ff770
Using nightly as default target for npm start and functional tests
motin Jul 28, 2018
8031abb
Updated circle ci cachebuster
motin Jul 28, 2018
31efc21
Using npm version of shield utils 5.0.3
motin Jul 28, 2018
a2ec1b3
Eslint fix
motin Jul 28, 2018
fddc2d0
Upgraded geckodriver from 0.20.0 to 0.21.0
motin Jul 29, 2018
3fc9ac3
Updated selenium-webdriver from 3.5.0 to 3.6.0 (latest available on npm)
motin Jul 29, 2018
cdee692
Producing trace-level geckodriver logs in test/results/logs - for deb…
motin Jul 29, 2018
20c2999
Storing geckodriver logs in circle ci as artifacts, so that they can …
motin Jul 29, 2018
e349697
Modified timings in expiration tests
motin Jul 29, 2018
351ab42
Avoid EISGIT error on subsequent npm installs
motin Jul 30, 2018
4ece663
Added note about functional tests ADDON_ZIP env var
motin Jul 30, 2018
0267866
Restored and ran npm run format
motin Jul 30, 2018
b307f14
Geckodriver npm package is now fixed upstream
motin Aug 31, 2018
75be261
Updated ci cachebusters to ensure that latest nightly is used
motin Aug 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"test": {
"plugins": [
[
"istanbul",
{
"exclude": [
"test/**/*.js"
]
}
]
]
}
}
}
77 changes: 57 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,86 @@ jobs:
docker:
- image: circleci/node:latest-browsers
environment:
FIREFOX_BINARY: /home/circleci/checkout/firefox/firefox-bin
FIREFOX_BIN: /home/circleci/checkout/firefox-release/firefox-bin
FIREFOX_AURORA_BIN: /home/circleci/checkout/firefox-beta/firefox-bin
FIREFOX_DEVELOPER_BIN: /home/circleci/checkout/firefox-devedition/firefox-bin
FIREFOX_NIGHTLY_BIN: /home/circleci/checkout/firefox-nightly/firefox-bin

working_directory: ~/checkout

steps:
- checkout

# Download and cache dependencies
# Download and cache dependencies (update the cache keys to force a newer version)
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- dependencies-and-browsers-{{ checksum "package.json" }}-20180831

- run: npm install
- run:
name: Install dependencies
command: npm install

- run:
name: Get nightly
name: Install different versions of Firefox
command: |
if [ -d ./firefox ]; then
echo "firefox dir exists, must be from cache"
else
./node_modules/.bin/get-firefox -b nightly -p linux -e
ls ./firefox/firefox-bin
fi
[ ! -d "./firefox-release" ] && npx get-firefox -b release -p linux -e && mv ./firefox ./firefox-release || true
[ ! -d "./firefox-beta" ] && npx get-firefox -b beta -p linux -e && mv ./firefox ./firefox-beta || true
[ ! -d "./firefox-devedition" ] && npx get-firefox -b devedition -p linux -e && mv ./firefox ./firefox-devedition || true
[ ! -d "./firefox-nightly" ] && npx get-firefox -b nightly -p linux -e && mv ./firefox ./firefox-nightly || true
# Prevent any tests from using the default installed version of Firefox
sudo rm /usr/bin/firefox || true

- save_cache:
paths:
- node_modules
- firefox
key: v1-dependencies-{{ checksum "package.json" }}
- firefox-nightly
- firefox-devedition
- firefox-beta
- firefox-release
- firefox-unbranded-release
key: dependencies-and-browsers-{{ checksum "package.json" }}-20180831

- run:
name: Reveal which Firefox versions are installed
command: |
echo "Versions of Firefox installed:"
./firefox-release/firefox-bin -v
./firefox-beta/firefox-bin -v
./firefox-devedition/firefox-bin -v
./firefox-nightly/firefox-bin -v

- run:
name: Lint
command: npm run eslint
command: npm run lint

- run:
name: Build .XPI
name: Build add-on
command: npm run build

- store_artifacts:
path: "dist"
destination: "dist"

- run:
name: Functional tests
command: npm run test
name: Unit tests
command: npm run test:unit

# Needs signed add-on to work on branded releases
#- run:
# name: Functional tests with Firefox Release
# command: FIREFOX_BINARY=/home/circleci/checkout/firefox-release/firefox-bin npm run test:func && mkdir test/results/logs-release && mv test/results/logs/* test/results/logs-release/
#- run:
# name: Functional tests with Firefox Beta
# command: FIREFOX_BINARY=/home/circleci/checkout/firefox-beta/firefox-bin npm run test:func && mkdir test/results/logs-beta && mv test/results/logs/* test/results/logs-beta/

- run:
name: Functional tests with Firefox Developer Edition
command: FIREFOX_BINARY=/home/circleci/checkout/firefox-devedition/firefox-bin npm run test:func && mkdir test/results/logs-devedition && mv test/results/logs/* test/results/logs-devedition/

- run:
name: Functional tests with Firefox Nightly
command: FIREFOX_BINARY=/home/circleci/checkout/firefox-nightly/firefox-bin npm run test:func && mkdir test/results/logs-nightly && mv test/results/logs/* test/results/logs-nightly/

- store_artifacts:
path: "dist"
path: "test/results"
destination: "test/results"
2 changes: 2 additions & 0 deletions .circleci/reports/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!*.gitignore
17 changes: 11 additions & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# do not lint/format generated artifacts
dist
test/results/
dist/
package-lock.json
# do not lint/format bundled util libraries
src/privileged/prefs/api.js
src/privileged/prefs/schema.json
src/privileged/study/api.js
src/privileged/study/schema.json
# makes sure that eslintrc.js gets linted/formatted
!.eslintrc.js
# do not lint/format bundled util libraries (PioneerUtils.jsm is included for Pioneer Shield studies only; eventually it will be merged with StudyUtils.jsm)
addon/StudyUtils.jsm
addon/PioneerUtils.jsm
# for circleCI; don't lint/format code in the Firefox directory
firefox
# don't lint/format code the directory where get-firefox stores the Firefox binaries
/firefox-*
# don't lint/format package.json since npm install formats it differently by default
package.json
# don't lint node_modules
node_modules
53 changes: 35 additions & 18 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@

"use strict";

/* All Mozilla specific rules and enviroments at:
* http://firefox-source-docs.mozilla.org/tools/lint/linters/eslint-plugin-mozilla.html
*/
// All Mozilla specific rules and environments at:
// http://firefox-source-docs.mozilla.org/tools/lint/linters/eslint-plugin-mozilla.html

module.exports = {
env: {
es6: true,
},
extends: [
"eslint:recommended",
// list of rules at: https://dxr.mozilla.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
"plugin:mozilla/recommended",
],
overrides: [
{
files: "src/**",
env: {
browser: true,
webextensions: true,
},
},
],
parserOptions: {
ecmaVersion: 8,
sourceType: "module",
Expand All @@ -15,32 +31,33 @@ module.exports = {
experimentalObjectRestSpread: true,
},
},
env: {
es6: true,
// 'browser-window': false
},
extends: [
"eslint:recommended",
/* list of rules at:
* https://dxr.mozilla.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
*/
"plugin:mozilla/recommended",
],

plugins: ["json", "mozilla"],

root: true,
rules: {
"babel/new-cap": "off",
"mozilla/no-aArgs": "warn",
"mozilla/balanced-listeners": "off",
"comma-dangle": ["error", "always-multiline"],
eqeqeq: "error",
indent: ["warn", 2, { SwitchCase: 1 }],
"mozilla/no-aArgs": "warn",
"mozilla/balanced-listeners": "off",
"max-len": [
"warn",
{
code: 100,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
"no-console": "warn",
"no-shadow": "error",
"no-unused-vars": "error",
"no-var": "error",
"prefer-const": "warn",
"prefer-spread": "error",
semi: ["error", "always"],
"valid-jsdoc": "warn",
},
};
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
chrome.manifest
install.rdf
*.xpi
node_modules
addon/StudyUtils.jsm
addon/PioneerUtils.jsm
dist/*
node_modules/
.env
/firefox-*
65 changes: 49 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,74 @@
# Shield Study Embedded Web Extension Template
# Shield Studies Add-On Template

[![CircleCI badge](https://img.shields.io/circleci/project/github/mozilla/shield-studies-addon-template/master.svg?label=CircleCI)](https://circleci.com/gh/mozilla/shield-studies-addon-template/)
[![Coverage Status](https://coveralls.io/repos/github/mozilla/shield-studies-addon-template/badge.svg)](https://coveralls.io/github/mozilla/shield-studies-addon-template)

## Important notice
## About This Repository

This repository is intended as an example repository containing templates and good
practices for creating a [Shield Study](https://wiki.mozilla.org/Firefox/Shield/Shield_Studies) add-on for Firefox.

### We are moving to Web Extension Experiments
### Important notice

In an effort to remove the necessity of creating legacy add-ons for Shield studies, we are working on [supporting a pure Web Extension Experiment workflow in this template](https://github.com/mozilla/shield-studies-addon-template/issues/53) with a new version, v5, of the [Shield utilities](https://github.com/mozilla/shield-studies-addon-utils/). Support for these workflows is not yet stable. In the meantime, **we do not recommend using this v4 template**.
We just started [supporting a pure Web Extension Experiment workflow in this template](https://github.com/mozilla/shield-studies-addon-template/issues/53) with a new version, v5, of the [Shield utilities](https://github.com/mozilla/shield-studies-addon-utils/).
Even though support for these workflows are yet to pass official QA review, **we do not recommend using the old template (for creating legacy boostrapped add-ons using Shield Utils v4) of this template**. Creating a legacy boostrapped add-on with the outdated master branch will likely result in a broken Shield study add-on in recent versions of Firefox.

Instead, we recommend that you:

* build your study as a WEE ([Web Extension Experiment](https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/index.html))
* help us test the requisite [experimental Shield API(s)](https://github.com/mozilla/shield-studies-addon-utils/)
* help us test the requisite [new Shield Web Extension API(s)](https://github.com/mozilla/shield-studies-addon-utils/)

Example Shield add-ons using the experimental Shield API(s):

Example Shield add-ons (implemented as WEEs) using the experimental Shield API(s):
* https://github.com/mozilla/shield-studies-addon-utils/blob/develop/examples/small-study
* https://github.com/mozilla/shield-cloudstorage
* This template
* <https://github.com/mozilla/shield-studies-addon-utils/tree/master/examples/small-study>
* <https://github.com/motin/taar-experiment-v3-shield-study>
* <https://github.com/motin/dataleak-pioneer-shield-study>
* <https://github.com/mozilla/shield-cloudstorage>

Chat with us: #shield on Slack about the latest progress and how to help us move faster away from legacy add-ons.

## About This Repository
### Aims

The aim is to bring together tools and services we've used on other Shield Study add-ons into a template/example repository, so that new projects can come
along and get infrastructure together, and be up and running with code, test suites, coverage etc quickly.

Using this template will get you these things:

**Note**: This contains an example [Shield Study](https://wiki.mozilla.org/Firefox/Shield/Shield_Studies) Legacy Add-on. Use this as a template for yours.
* [Shield Utils](https://github.com/mozilla/shield-studies-addon-utils/) integration and example usage
* Functional tests
* Unit tests
* Continuous integration testing against Release, Beta, Dev Edition and Nightly (via Circle CI)
* [Example web extension experiment implementing custom ui using privileged code](./src/privileged/introductionNotificationBar/)
* Linting
* Partial code coverage (specific files)

(Note: Make this README reflect your study).
Bonus:

Goal: Determine which if any TOOLBAR BUTTONS DESIGNS is the most enticing to the user.
* Consistent package.json (fixpack) and package-lock.json
* Addon-linter
* Runs nsp during lint

### Documentation

It is intended that all parts of this repository have at least outline
documentation. If you find any parts that are missing, please file an issue or
create a PR.

### Using this template

1. Fork this repository, rename it to reflect your study. Make the repo end with `-shield-study`
2. Make this README reflect your study (including removing all of this `About This Repository` section whilst keeping `Seeing the add-on in action` and below)
3. Remove irrelevant example code
4. Build your study add-on and make the docs reflect your study
5. File issues/PRs against https://github.com/mozilla/shield-studies-addon-template/ when you come across things to improve in the template

## Seeing the add-on in action

See [TESTPLAN.md](./docs/TESTPLAN.md) for more details on how to get the add-on installed and tested.

## Data Collected / Telemetry Pings

Measure:

* Button (BrowserAction) usage.

See [TELEMETRY.md](./docs/TELEMETRY.md) for more details on what pings are sent by this add-on.

## Analyzing data
Expand Down
Loading