Skip to content

Latest commit

 

History

History
70 lines (56 loc) · 2.26 KB

README.md

File metadata and controls

70 lines (56 loc) · 2.26 KB

City of Boston

The source code for ordering registry certificates online.

Build Status codecov Greenkeeper badge

Developers

This is a Node project using the Next.js framework for server-side rendering.

  • Development Server: npm run dev http://localhost:3000/
  • React Storybook: npm run storybook http://localhost:9001/
  • Gulp: npx gulp watch
  • Tests: npx jest or npx jest --watch
  • Lint: npm run lint (uses ESLint --fix to fix common style errors)
  • Typecheck: npx flow

Testing

You can use GraphiQL to run GraphQL queries against the backend: http://localhost:3000/graphiql

Test query for submitting an order:

(You will need to update idempotencyKey in each request.)

mutation {
  submitDeathCertificateOrder(
    contactName: "Jyn Doe"
    contactEmail: "[email protected]"
    contactPhone: "5551234567"
    shippingName: "Jyn Doe"
    shippingAddress1: "123 Fake St."
    shippingCity: "Boston"
    shippingState: "MA"
    shippingZip: "02210"
    cardToken: "tok_visa"
    cardLast4: "1234"
    cardholderName: "Jyn X. Doe"
    billingAddress1: "321 Faux Pl."
    billingAddress2: ""
    billingCity: "Boston"
    billingState: "MA"
    billingZip: "02211"
    idempotencyKey: "1234"
    items: [{
      id: "1234"
      name: "Robert Frost"
      quantity: 11
    }]
  ) {
    id
  } 
}

Stripe has a list of card numbers and tokens that cause different API responses in test.

Testing on IE11

Next.js’s hot-reloading dev mode is not supported in IE11. You will need to run npm run build to compile the JS and then run npm run dev with the USE_BUILD environment variable set.

Don’t forget to re-compile the JS when you change it.