1. 15 Nov, 2017 7 commits
    • Sean Hammond's avatar
      Move fakePersona to a describe()-level variable · a84d9bb3
      Sean Hammond authored
      In a future commit some individual unit tests are going to need to
      change fakePersona's behaviour, so they're going to need access to it.
      
      fakePersona is reset between tests in a beforeEach(), so individual test
      functions changing its behaviour will not affect other test functions.
      a84d9bb3
    • Sean Hammond's avatar
      Add descriptions to beforeEach()s · 90c22708
      Sean Hammond authored
      These get printed out if something errors in a beforeEach(), making it
      easier to find the error. They also help to make the code easier to
      read.
      90c22708
    • Sean Hammond's avatar
      Stub annotation-header.js's persona.js dependency · fc3f7e0f
      Sean Hammond authored
      I don't want the tests for annotation-header.js to be calling the real
      persona.js. This isn't good test isolation, and it makes it more
      difficult for future tests I intend to write to change persona.js's
      return values, without tightly coupling those tests to implementation
      details of persona.js.
      fc3f7e0f
    • Sean Hammond's avatar
      Only show display names if client_display_names is on · b8d90240
      Sean Hammond authored
      Only show display names on annotation cards if the client_display_names
      feature flag is on.
      
      The api_render_user_info feature flag also needs to be on in h,
      otherwise the client won't receive any display name from h.
      
      The user also has to have a display name set in h.
      
      If any of these three tests fail then fall back to showing the username.
      b8d90240
    • Sean Hammond's avatar
      Add a missing test case · aa0199d6
      Sean Hammond authored
      aa0199d6
    • Sean Hammond's avatar
      Combine two tests into a parametrize · 1ba7aa24
      Sean Hammond authored
      This doesn't change the behaviour of either of the tests in any
      significant way.
      
      Future commits are going to be adding a lot more cases to this
      parametrize-style test.
      1ba7aa24
    • Sean Hammond's avatar
      Fix a test name · e08e4206
      Sean Hammond authored
      e08e4206
  2. 14 Nov, 2017 4 commits
  3. 13 Nov, 2017 2 commits
    • Sean Hammond's avatar
      Merge pull request #573 from hypothesis/sort-oauth-tests · ed148af4
      Sean Hammond authored
      Re-arrange OAuth service tests
      ed148af4
    • Robert Knight's avatar
      Re-arrange OAuth service tests · 8666f000
      Robert Knight authored
      Move the tests for fetching and persistence of tokens from/to storage
      into the `describe('#tokenGetter', ...` block since this is the method
      called from outside the service that initiates the fetching /
      persistence.
      
      Also reword a couple of the test cases to be clearer now that the OAuth
      service now handles fetching tokens using methods other than exchanging
      grant tokens.
      8666f000
  4. 10 Nov, 2017 2 commits
    • Robert Knight's avatar
      Merge pull request #555 from hypothesis/elife-ui · a27d83b9
      Robert Knight authored
      Change UI for Elife.
      a27d83b9
    • Sheetal Umesh Kumar's avatar
      Implement new customisation options for the sidebar’s display. · 396fce0e
      Sheetal Umesh Kumar authored
      See https://github.com/hypothesis/product-backlog/issues/350
      
      Add config options for the following:
      
      disableToolbarCloseBtn: false/true
      Disables and hides the close button on the toolbar
      
      disableToolbarMinimizeBtn: true/false
      Disables and hides the minimize button on the toolbar
      
      disableToolbarHighlightsBtn: true/false
      Disables and hides the highlights button on the toolbar
      
      disableToolbarNewNoteBtn: true/false
      Disables and hides the new note button on the toolbar
      
      disableBucketBar: true/false
      Disables and hides the bucket bar
      
      enableSidebarDropShadow: true/false
      Turns on the dropshadow for the sidebar
      
      theme: 'clean'
      Turns on the 'clean' theme for the sidebar. By default the classic view(with annotation cards) is turned on, which the rest of the Hypothesis users will see.
      
      usernameUrl: 'someurl/'
      The url to direct a user to when their username in the annotation is clicked.
      396fce0e
  5. 08 Nov, 2017 15 commits
  6. 07 Nov, 2017 10 commits