fxa/packages/fxa-content-server
Reino Muhl d5e218063f
Merge pull request #16528 from mozilla/fxa-8823-l10n-scripts
feat(l10n): update l10n ftl scripts for nx apps
2024-03-11 14:38:57 -04:00
..
app task(settings, content): Create configurable rollout rates for v2 key stretching 2024-02-23 18:24:09 -08:00
grunttasks chore(css): Add grunttask to fix content-server Tailwind selectors 2024-02-22 13:55:35 -06:00
locale chore(many): Remove npm run commands 2023-05-17 11:24:09 -07:00
scripts test(functional): remove old functional intern tests and files 2023-10-10 15:54:48 -04:00
server bug(content): Fix SENTRY_TRACES_SAMPLE_RATE not being applied 2024-03-08 12:06:46 -08:00
tests Revert "test(functional): remove old functional intern tests and files" 2023-12-06 11:46:23 -05:00
.eslintignore refactor(deps): remove bower mozilla/fxa-content-server#5915) r=@vbudhram 2018-02-15 15:52:17 -05:00
.eslintrc feat(metrics): send reg_view Glean ping 2023-05-23 12:48:25 -05:00
.gitattributes
.htmllintrc
.nsprc fix(deps): Add exception for yargs-parser nsp advisory 1500 2020-05-11 11:40:27 -07:00
.prettierignore refactor(tests): Remove teamcity scripts 2023-05-03 07:43:18 -07:00
Gruntfile.js chore(format): mass reformat with prettier 2 and single config 2020-05-24 10:51:57 -07:00
README.md chore(many): Remove npm run commands 2023-05-17 11:24:09 -07:00
backstage.yaml fix(backstage): update db references, add gql API ref 2024-01-26 08:41:53 -08:00
package.json Merge pull request #16528 from mozilla/fxa-8823-l10n-scripts 2024-03-11 14:38:57 -04:00
pm2.config.js task(CI): Improve nx caching for CI pipelines 2023-08-29 11:19:54 -07:00
postcss.config.js refactor(css): Tailwindify Sync + other content-server flows w/design tweaks 2022-07-29 17:12:21 -05:00
tailwind.config.js task(content): Activate Mozilla branding 2023-10-17 14:32:59 -07:00
tsconfig.json feat: add foundational db classes 2023-07-24 14:44:12 -04:00
webpack.config.js chore(web): Revert webpack mode override 2023-10-09 15:51:45 -04:00

README.md

Firefox Accounts Content Server

Coverage Status

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


Quick Start

Clone the repository, make sure you have required prerequisites installed. Run yarn install and yarn start-remote. This will start a local fxa-content-server on http://localhost:3030 that works with remote Firefox Accounts servers.

If you want to install all Firefox Accounts servers locally follow the instructions on: fxa-local-dev to get a full development setup running. Please note that fxa-local-dev is the preferred way of contributing to Firefox Accounts.


Development Notes

Changes to stylesheets, scripts and templates

Any changes made to the css resources, scripts or the template files will automatically be reflected on page refresh.


Testing

Functional Tests

📖 A much more thorough breakdown of Content Server functional tests can be found in our Ecosystem Platform docs.

JDK or JRE is required to run functional tests.

This package uses Selenium to perform functional tests. By default npm test will run all functional tests under tests/. You can run specific tests with the following commands:

# Grep for "change password, sign in with new password"
yarn test -- --grep="change password, sign in with new password"

If you need to run tests for a particular suite, you can like so:

node tests/intern.js --suites=server --grep='check resources entrained by /signin in all locales'

Changing the Auth Server

To change the default Auth Server edit server/config/*.json on your deployed instance.

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

Note that testing with Selenium via Docker does not work at present, so all testing must be carried out via your normal operating system's npm & Java tooling.

Using xvfb

On headless systems that can't spawn Firefox for use with Selenium, xvfb-run may be used for a virtual framebuffer for Firefox to run with. After installing xvfb-run the functional tests can be run with:

xvfb-run -s "-screen 0 1920x1200x16" yarn test-functional

Unit Tests

If you'd like to run only unit tests you can do so in your browser by navigating to http://localhost:3030/tests/index.html. You can also grep for specific tests by specifying the grep URL parameter (e.g. http://localhost:3030/tests/index.html?grep=fxa-client).


Grunt Commands

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

TASK DESCRIPTION
grunt build build production resources. See task source for more documentation
grunt clean remove any built production resources.
grunt lint run ESLint, Sass-lint, amdcheck and JSONLint on client side and testing JavaScript.
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 test run local Intern tests.
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