Closed Bug 1307899 Opened 8 years ago Closed 6 years ago

Convert component tests to Enzyme

Categories

(DevTools :: Console, enhancement, P1)

enhancement

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: linclark, Assigned: nchevobbe)

Details

(Whiteboard: [newconsole-mvp])

Attachments

(1 file)

Originally posted by:linclark

see https://github.com/devtools-html/gecko-dev/issues/180

In #178 I got Enzyme working. If there are no objections to the way it is working, then we should move all component tests to use it.
Priority: -- → P2
Whiteboard: new-console
Flags: qe-verify-
Priority: P2 → P3
Whiteboard: new-console → [reserve-new-console]
Whiteboard: [reserve-new-console] → [reserve-console-html]
Priority: P3 → P4
Flags: qe-verify-
Priority: P4 → P2
Whiteboard: [reserve-console-html] → [newconsole-mvp]
No longer blocks: enable-new-console
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P2 → P1
Comment on attachment 8949429 [details]
Bug 1307899 - Remove renderComponent and switch consumers to using Enzyme instead; .

https://reviewboard.mozilla.org/r/218742/#review226034

Looks good except of the "EvaluationResult" test.

I am seeing the following error when running it:

  1) EvaluationResult component: displays a [Learn more] link:
     TypeError: Cannot read property '_renderedComponent' of undefined
      at WrapperComponent.getWrappedComponent (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\enzyme\build\ReactWrapperComponent.js:94:54)
      at new ReactWrapper (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\enzyme\build\ReactWrapper.js:100:34)
      at mount (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\enzyme\build\mount.js:19:10)
      at Context.<anonymous> (C:/src/mozilla.org/mozilla-central/devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js:73:21)
      at callFn (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runnable.js:326:21)
      at Test.Runnable.run (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runnable.js:319:7)
      at Runner.runTest (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runner.js:422:10)
      at C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runner.js:528:12
      at next (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runner.js:342:14)
      at C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runner.js:352:7
      at next (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runner.js:284:14)
      at Immediate.<anonymous> (C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\mocha\lib\runner.js:320:5)


Looks like this one depends on bug 1436690, correct?
If yes, let's wait till this is fixed and in Nightly.

Honza
Attachment #8949429 - Flags: review?(odvarko)
this needs to be rebased on top of Bug 1438476
Comment on attachment 8949429 [details]
Bug 1307899 - Remove renderComponent and switch consumers to using Enzyme instead; .

https://reviewboard.mozilla.org/r/218742/#review226912

Looks fine to me
Attachment #8949429 - Flags: review?(bgrinstead) → review+
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bbbd357dcb92
Remove renderComponent and switch consumers to using Enzyme instead; r=bgrins.
https://hg.mozilla.org/mozilla-central/rev/bbbd357dcb92
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: