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

Brainstem Expectations/Caches are not cancellable #90

Open
juanca opened this issue Aug 29, 2016 · 4 comments
Open

Brainstem Expectations/Caches are not cancellable #90

juanca opened this issue Aug 29, 2016 · 4 comments
Labels

Comments

@juanca
Copy link
Contributor

juanca commented Aug 29, 2016

Seems like an expectation only returns a promise. It would be nice to automatically inject an abort method (just like an XHR).

@juanca
Copy link
Contributor Author

juanca commented Nov 23, 2016

This seems to be reoccurring when doing integration tests.

I'll probably do this sometime soon (Friday project?)

/cc @naganowl @racerpeter

@juanca
Copy link
Contributor Author

juanca commented Dec 1, 2016

Example stack trace:

TypeError: xhrs[trackKey].abort is not a function
    at Object.fetch (webpack:///~/brainstem-redux/bin/index.js:1460:0 <- frontend/react-specs.js:113356:82)
    at Object.fetchStories (webpack:///frontend/features/time-entry-widget/action-creators/stories-autocompleter.js:31:29 <- frontend/react-specs.js:115096:47)
    at Object.fetchStories (webpack:///frontend/features/time-entry-widget/containers/stories-autocompleter.jsx:14:28 <- frontend/react-specs.js:115040:48)
    at StoriesAutocompleter.onInputFocus (webpack:///frontend/components/autocompleters/stories-autocompleter/stories-autocompleter.jsx:91:15 <- frontend/react-specs.js:105491:19)
    at Object.invokeGuardedCallback [as invokeGuardedCallbackWithCatch] (webpack:///~/react-dom/lib/ReactErrorUtils.js:26:0 <- frontend/react-specs.js:63489:6)
    at executeDispatch (webpack:///~/react-dom/lib/EventPluginUtils.js:83:0 <- frontend/react-specs.js:63315:22)
    at Object.executeDispatchesInOrder (webpack:///~/react-dom/lib/EventPluginUtils.js:108:0 <- frontend/react-specs.js:63340:6)
    at executeDispatchesAndRelease (webpack:///~/react-dom/lib/EventPluginHub.js:43:0 <- frontend/react-specs.js:62759:23)
    at executeDispatchesAndReleaseSimulated (webpack:///~/react-dom/lib/EventPluginHub.js:51:0 <- frontend/react-specs.js:62767:11)
    at forEachAccumulated (webpack:///~/react-dom/lib/forEachAccumulated.js:26:0 <- frontend/react-specs.js:63634:9)
     Expected "<input type="text" value="" autocomplete="off" role="combobox" aria-autocomplete="list" aria-owns="react-autowhatever-1" aria-expanded="false" aria-haspopup="false" class="stories-autocompleter__input___SyXQQ" id="stories-autocompleter-input-iw5nif7q" placeholder="Select or search for a task">" to have value of "🤘 Punch Me in the Skull 🤘"
    at Object.<anonymous> (webpack:///frontend/features/time-entry-widget/index-spec.jsx:334:58 <- frontend/react-specs.js:122749:60)

@juanca
Copy link
Contributor Author

juanca commented Dec 9, 2016

Fixed @ #91

@juanca juanca closed this as completed Dec 9, 2016
@juanca juanca reopened this Feb 8, 2018
@juanca
Copy link
Contributor Author

juanca commented Feb 8, 2018

Looks like cached objects are missing an abort method as well. Reopening since both of these solutions should use each other.

@juanca juanca changed the title Brainstem Expectations are not cancellable Brainstem Expectations/Caches are not cancellable Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant