Closed
Bug 1550791
Opened 5 years ago
Closed 5 years ago
WebConsole mocha tests are failing with `TypeError: dispatch is not a function`
Categories
(DevTools :: Console, defect, P1)
DevTools
Console
Tracking
(firefox68 fixed)
RESOLVED
FIXED
Firefox 68
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jdescottes, Assigned: nchevobbe)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Regression from Bug 1230194, precisely part 3 https://hg.mozilla.org/mozilla-central/rev/26b7736f1f87
I will disable the necessary tests in order to be able to move back the devtools node test suite as tier 1 in Bug 1535484
Reporter | ||
Comment 1•5 years ago
|
||
Hi Nicolas, I am skipping the following mocha test:
it("displays a [Learn more] link", () => {
const store = setupStore();
const message = stubPreparedMessages.get("asdf()");
serviceContainer.openLink = sinon.spy();
const wrapper = mount(
Provider({ store }, EvaluationResult({ message, serviceContainer }))
);
const url =
"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined";
const learnMore = wrapper.find(".learn-more-link");
expect(learnMore.length).toBe(1);
expect(learnMore.prop("title")).toBe(url);
learnMore.simulate("click");
const call = serviceContainer.openLink.getCall(0);
expect(call.args[0]).toEqual(message.exceptionDocURL);
});
The failure log is
1) EvaluationResult component:
displays a [Learn more] link:
TypeError: dispatch is not a function
at Message.toggleMessage (/Users/jdescottes/Development/hg/fx-team/devtools/client/webconsole/components/Message.js:117:7)
at Object.invokeGuardedCallback (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:77:10)
at Object.invokeGuardedCallback (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:107:27)
at Object.invokeGuardedCallbackAndCatchFirstError (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:121:43)
at executeDispatch (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:399:19)
at executeDispatchesInOrder (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:415:7)
at executeDispatchesAndRelease (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:516:5)
at executeDispatchesAndReleaseSimulated (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:524:10)
at forEachAccumulated (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:497:8)
at Object.runEventsInBatch (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:656:5)
at /Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom-test-utils-dev.js:1184:22
at Object.batchedUpdates$1 [as unstable_batchedUpdates] (/Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom.js:13458:12)
at /Users/jdescottes/Development/hg/fx-team/devtools/client/shared/vendor/react-dom-test-utils-dev.js:1180:14
at Object.simulateEvent (node_modules/enzyme-adapter-react-16/build/ReactSixteenAdapter.js:492:15)
at ReactWrapper.<anonymous> (node_modules/enzyme/build/ReactWrapper.js:953:29)
at ReactWrapper.single (node_modules/enzyme/build/ReactWrapper.js:1720:25)
at ReactWrapper.simulate (node_modules/enzyme/build/ReactWrapper.js:952:21)
at Context.it (components/evaluation-result.test.js:116:15)
Flags: needinfo?(nchevobbe)
Assignee | ||
Comment 2•5 years ago
|
||
Thanks Julian, I'm going to fix this
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Flags: needinfo?(nchevobbe)
Assignee | ||
Comment 3•5 years ago
|
||
The test was disabled in Bug 1535484 because it was failing.
To fix the test, we need to pass a dispatch prop to the
EvaluationResult component.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Priority: -- → P1
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/83c6540f1fc1
Re-enable commented mocha test. r=jdescottes.
Comment 6•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Updated•3 years ago
|
Has Regression Range: --- → yes
Updated•3 years ago
|
Keywords: regression
You need to log in
before you can comment on or make changes to this bug.
Description
•