Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3 v5 #6245

Merged
merged 13 commits into from
Apr 29, 2019
Merged

d3 v5 #6245

merged 13 commits into from
Apr 29, 2019

Commits on Apr 24, 2019

  1. Update to d3 ~5.9.2

    bhousel committed Apr 24, 2019
    Configuration menu
    Copy the full SHA
    f72fd96 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b6cd135 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    48b1ddc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e6bc9d9 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2019

  1. Configuration menu
    Copy the full SHA
    6f31062 View commit details
    Browse the repository at this point in the history
  2. Make sure to return a new Response each time, not the same one

    You can only consume a response once - thereafter the response
    body becomes "locked" and will throw an error if you try.
    https://stackoverflow.com/questions/53511974/javascript-fetch-failed-to-execute-json-on-response-body-stream-is-locked
    bhousel committed Apr 25, 2019
    Configuration menu
    Copy the full SHA
    3e363fe View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2019

  1. Configuration menu
    Copy the full SHA
    b99be67 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2019

  1. Workround for status errors thrown by d3-xml

    Because the done callback is expecting something that has a `status` property,
    (like an XHR would), we need to extract the status out of the error message.
    d3-xml includes status in the error message, but we can't access the response itself.
    bhousel committed Apr 27, 2019
    Configuration menu
    Copy the full SHA
    b48a7d1 View commit details
    Browse the repository at this point in the history
  2. Wrap the fake-fetch methods with sinon.fakeServer-like interface

    This mimics `respondWith` and `respond` to keep the tests mostly
    similar between `FakeFetch` and `sinon.fakeServer`
    
    Major difference is that all the fakeServer tests which were sync
    are now async and this is probably unavoidable.
    bhousel committed Apr 27, 2019
    Configuration menu
    Copy the full SHA
    552ea46 View commit details
    Browse the repository at this point in the history
  3. Convert fakeServer tests to use fakeFetch

    - Many text expects are now wrapped in setTimeout, as the fetch
      promises settle async now.
    - This makes the tests somewhat brittle, and we should maybe consider
      reworking some of them. For example it is very hard to perform
      a test like `expect(spy).to.have.not.been.called` in an async way.
      (We could instead inspect the fakeServer requests() to know this.)
    - Also includes some trickery for osm.js, which uses d3-xml (fetch)
      now for unauthenticated calls and osmauth (xhr) for authenticated calls
    bhousel committed Apr 27, 2019
    Configuration menu
    Copy the full SHA
    d0452e6 View commit details
    Browse the repository at this point in the history
  4. Bump timeouts on streetlevel loadimage-type tests

    This isn't perfect but might avoid spurious test failures.
    bhousel committed Apr 27, 2019
    Configuration menu
    Copy the full SHA
    452eb8b View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2019

  1. Keep track of whether requests have been processed

    This lets us call `respond` multiple times, which is useful for the
    tests which fetch data in pages.
    bhousel committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    af31b84 View commit details
    Browse the repository at this point in the history
  2. Switch mapillary and openstreetcam tests to work async

    - can't reliably use sinon.spy to tell whether a thing has been called,
      so we listen for events instead and check server.requests()
    - make sure to request the next page before dispatching `loadedImages` so
      we can `server.respond()` to the request in the event handler if we want to
    - also moves `localeDateString` in the openstreetcam service from parsing
      code to display code, because it's very slow (we can just do this for the
      images we look at, instead of all images we fetch)
    bhousel committed Apr 29, 2019
    Configuration menu
    Copy the full SHA
    e981cd5 View commit details
    Browse the repository at this point in the history