Phoenix Documentation
Phoenix ProductionPhoenix PreviewContentful
Primary version
Primary version
  • 🔥Phoenix 🔥
  • Installation + Usage
    • Prerequisites
    • Installation
    • Usage
  • Development
    • Architecture
      • Heroku
    • Content Types
      • Action Stats Block
      • Campaign
      • Content Block
      • Cause Page
      • Company Page
      • Current Club Block
      • Current School Block
      • Embed
      • External Link
      • Landing Page
      • Link Action
      • Metadata
      • Page
      • Photo Submission Action
      • Selection Submission Action
      • Share Action
      • Signup Referrals Block
      • Social Drive Action
      • Voter Registration Action
      • Voter Registration Drive Action
      • Voter Registration Marketing Page
      • Voter Registration Referrals Block
    • Features
      • Affiliate Opt In
      • Affiliate Scholarship Block
      • Analytics Waypoint
      • Delayed Element
      • Dismissable Element
      • Stat Card
      • General Buttons
      • Groups
      • Paginated Campaign Gallery
      • Popover Dispatcher
      • Refer A Friend
      • Referrals Gallery
      • Sitewide Banner
      • Sixpack A/B Testing
        • Code Tests
        • Contentful Tests
        • Testing Tips
      • Tooltip
      • Traffic Distribution
      • Volunteer Credits
      • Voter Registration
      • Zendesk Form
    • Contentful
      • Workflow
      • Content Management API Scripts
    • Helpers
  • Phoenix API
    • v2
      • Campaigns Resource
      • Posts Resource
      • Zendesk Endpoint
  • Data + Performance
    • Monitoring
    • Analytics
    • Logging
  • Contributing Instructions
    • Edit This Documentation
    • Glossary
Powered by GitBook
On this page
  • Testing
  • PHPUnit
  • Jest
  • Cypress
  • Code Style
  • Helper Methods
  • Services
  • Review Apps
  • Dev & QA Environments
  1. Installation + Usage

Usage

PreviousInstallationNextArchitecture

Last updated 5 years ago

Information regarding daily usage and typical services that will be used during development of the Phoenix platform.

Testing

PHPUnit

To run PHP tests locally, ssh into the Homestead Vagrant box, cd into the Phoenix repository location and use , by running:

$ phpunit

It is recommended that you run PHP Unit tests within the Homestead Vagrant box.

Jest

To run JavaScript tests locally, run:

$ npm test

Cypress

To run JavaScript tests locally, run:

$ npm run cypress

New GraphQL types, fields, queries, and mutations should be reflected in the root schema.json file that is used by our Cypress test suite to mock GraphQL requests. The easiest way to update the schema is by using the schema:fetch command:

$ npm run schema:fetch

Code Style

They run in the following scenarios:

  • When using the npm start command, your files will be "watched" for changes, and when a change is detected, the JS code will be linted and only compiled if it passes.

  • You can manually lint code by running npm run lint -s. The -s option lets you suppress the verbose NPM warnings that follows when there are linting errors.

Helper Methods

Services

There are a couple of other third-party services that you will want access to for development:

Review Apps

Dev & QA Environments

Once a Pull Request is merged, a deploy to our Development and QA (staging) environment is automatically triggered on the Phoenix Pipeline in Heroku.

We use to format our code & to catch common mistakes.

Code will be automatically formatted when committing changes. You can also install an to reformat code as you write it, or manually format the project with npm run format.

Code linting also runs via , our continuous integration service, when a new pull request is made for the repository.

We use service to lint our PHP code when a new pull request is made for the respository.

for some information on developing with our suite of helper methods.

The on to access the Phoenix Pipeline, which includes Review Apps, Dev, QA and Production Phoenix deployments.

The on to access and re-trigger auto builds for pull requests in the Phoenix repository.

When a pull request is submitted to the Phoenix repository, a temporary deploy is made from the feature branch to Heroku for reviewers to experience new changes to the site in a sample environment. Read more about this in the .

The Development environment can be accessed at .

The QA environment can be accessed at .

PHPUnit
Jest
Cypress
Prettier
ESLint
editor plugin
Wercker
StyleCI
See here
Dosomething Team
Heroku
Dosomething Organization
Wercker
Heroku documentation for Review Apps
https://dev.dosomething.org
https://qa.dosomething.org