DEPRECATED - Migrated to https://github.com/mozilla/fxa
Перейти к файлу
vladikoff 23bead9a30 fix(test): Force focus in Mocha tests. 2014-05-21 18:57:25 -04:00
app fix(test): Force focus in Mocha tests. 2014-05-21 18:57:25 -04:00
grunttasks Merge pull request #1096 from mozilla/issue-1021-into-antiquity 2014-05-19 10:58:42 -07:00
locale chore(l10n): extract strings and update templates for train 13 2014-05-13 13:50:01 -07:00
scripts use npm shrinkwrap 2014-03-06 12:50:16 -08:00
server show the git sha recorded in app/bower_components/fxa-content-server-l10n/.bower.json 2014-05-19 17:00:35 -07:00
tests Merge pull request #1097 from mozilla/issue-1095-ie9-blank 2014-05-19 13:12:47 -07:00
.awsbox.json add static directory configuration param and fix awsbox config 2013-12-10 15:08:32 -08:00
.bowerrc Fixed gitignore. Added .bowerrc. 2013-12-04 14:17:06 -08:00
.editorconfig Generated basic Yeoman project. 2013-12-04 11:55:48 -08:00
.gitattributes Generated basic Yeoman project. 2013-12-04 11:55:48 -08:00
.gitignore feature(templates): generate static 500 error pages with a grunt task 2014-04-16 19:37:59 -07:00
.jscs.json Last bit of jscs cleanup 2014-01-21 17:38:11 -08:00
.jshintrc Tweaking jshintrc rules slightly 2014-05-07 15:12:06 -07:00
.travis.yml refactor(test): Less auth-server logging for travis tests! 2014-04-24 15:41:39 +01:00
CHANGELOG.md Release v0.13.0 2014-05-19 14:52:45 -07:00
CONTRIBUTING.md Update CONTRIBUTING.md with git commit guidelines 2014-05-15 11:54:33 -07:00
CONTRIBUTORS.md feature(contributors): Adding CONTRIBUTING and CONTRIBUTORS files 2014-02-27 10:37:15 -08:00
Gruntfile.js Cleaning up the Gruntfile into the grunttasks dir 2014-02-17 17:21:13 +00:00
README.md docs(README): mention default port number 2014-05-21 17:26:19 +12:00
bower.json fix(client): update js-client so xhr works in IE 2014-05-19 14:03:07 -07:00
npm-shrinkwrap.json chore(install): Update npm-shrinkwrap.json for the downgraded grunt-contrib-imagemin 2014-05-20 11:41:26 +01:00
package.json fix(build): Downgrade imagemin 2014-05-20 02:09:57 -04:00

README.md

Firefox Accounts Content Server

Build Status

Static server that hosts Firefox Account sign up, sign in, email verification, etc. flows.

Prerequisites

  • node 0.10.x or higher
  • npm
  • Grunt (npm install -g grunt-cli)
  • PhantomJS (npm install -g phantomjs)
  • bower (npm install -g bower)
  • libgmp
    • On Linux: install libgmp and libgmp-dev packages
    • On Mac OS X: brew install gmp
  • fxa-auth-server running on 127.0.0.1:9000.

Development Setup

cp server/config/local.json-dist server/config/local.json
npm install
npm start

It will listen on http://127.0.0.1:3030 by default.

Testing

Setup

There is quite a bit of setup to do before you can test this service, which is non-optimal, but for now:

  • Set up saucelabs credentials (we have an opensource account: SAUCE_USERNAME=fxa-content SAUCE_ACCESS_KEY=ee5354a4-3d5e-47a0-84b0-0b7aaa12a720)
  • PhantomJS: phantomjs --webdriver=4444 (see Prerequisites)
  • Run the Firefox Content Server locally: npm start
  • Run an instance of the fxa-auth-server at 127.0.0.1:9000.

e.g. in shell form:

export SAUCE_USERNAME=fxa-content
export SAUCE_ACCESS_KEY=ee5354a4-3d5e-47a0-84b0-0b7aaa12a720
phantomjs --webdriver=4444 &
cd fxa-auth-server
npm start &
cd ../fxa-content-server
npm start &

Running the tests

To run tests locally against phantomjs:

npm test

To run tests against saucelabs:

npm run-script test-remote

Advanced local testing using headed browsers

It is possible to run the Selenium tests against local browsers like Firefox, Chrome, and Safari.

Prerequisites:

Configuration:

  • edit tests/intern.js to select the browsers to test under environments.
  • comment out phantom

Running the tests

  • Start the Selenium Server: java -jar selenium-server-standalone-2.38.0.jar
  • Stop PhantomJS if it is running.
  • from the fxa-content-server directory, type npm test

Configuration

The default auth server is http://api-accounts.dev.lcip.org. To change this, edit server/config/*.json on your deployed instance.

{
  'fxaccount_url': 'http://your.auth.server.here.org'
}

Grunt Commands

Grunt is used to run common tasks to build, test, and run local servers.

  • grunt jshint - run JSHint on client side and testing JavaScript.
  • grunt build - build production resources.
  • grunt clean - remove any built production resources.
  • grunt test - run local Intern tests.
  • grunt server - run a local server running on port 3030 with development resources.
  • grunt server:dist - run a local server running on port 3030 with production resources. Production resources will be built as part of the task.
  • grunt version - stamp a new minor version. Updates the version number and creates a new CHANGELOG.md
  • grunt version:patch - stamp a new patch version. Updates the version number and creates a new CHANGELOG.md

Servers

License

MPL 2.0