Skip to content

Instantly share code, notes, and snippets.

@sebworks
Last active July 25, 2016 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebworks/edb4c89c4e8c244812f2dac3d6f77a89 to your computer and use it in GitHub Desktop.
Save sebworks/edb4c89c4e8c244812f2dac3d6f77a89 to your computer and use it in GitHub Desktop.
Notes on Testing

Notes on Testing

Our testing philosopy and policy is explained in the following documents:

https://github.com/cfpb/cfgov-refresh/blob/master/TEST.md

https://github.com/cfpb/front-end/blob/master/testing.md


I would only add that our Acceptance tests should focus on testing functionality and dom structure. Testing content becomes tricky because it's constantly changing via the CMS or some other channel. This is demonstrated in the following example:

Bad

it( 'should properly load in a browser', function() {
  expect( page.pageTitle() ).toBe( 'The Bureau' );
} );

Good

it( 'should properly load in a browser', function() {
  expect( page.pageTitle().isPresent() ).toBe( true );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment