Backed out changeset 9b891f690b98 (bug 1367395) for eslint failure
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 30 May 2017 09:20:02 +0200
changeset 361272 7163dcdf54dc5155703efc642900a355b8e8dc89
parent 361271 9b891f690b989341cdd5116629a1ef60462c9e8a
child 361273 b0382a33f8c452a5ff6ae03ad7d8d514d270e324
push id31924
push userryanvm@gmail.com
push dateTue, 30 May 2017 20:08:50 +0000
treeherdermozilla-central@692e277e2b9f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1367395
milestone55.0a1
backs out9b891f690b989341cdd5116629a1ef60462c9e8a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 9b891f690b98 (bug 1367395) for eslint failure
devtools/client/webconsole/new-console-output/test/components/filter-bar.test.js
--- a/devtools/client/webconsole/new-console-output/test/components/filter-bar.test.js
+++ b/devtools/client/webconsole/new-console-output/test/components/filter-bar.test.js
@@ -1,20 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 const expect = require("expect");
 const sinon = require("sinon");
-const { render, mount, shallow } = require("enzyme");
+const { render, mount } = require("enzyme");
 
 const { createFactory, DOM } = require("devtools/client/shared/vendor/react");
 const Provider = createFactory(require("react-redux").Provider);
 
-const FilterButton = require("devtools/client/webconsole/new-console-output/components/filter-button");
+const FilterButton = createFactory(require("devtools/client/webconsole/new-console-output/components/filter-button"));
 const FilterBar = createFactory(require("devtools/client/webconsole/new-console-output/components/filter-bar"));
 const { getAllUi } = require("devtools/client/webconsole/new-console-output/selectors/ui");
 const {
   MESSAGES_CLEAR,
   MESSAGE_LEVEL
 } = require("devtools/client/webconsole/new-console-output/constants");
 
 const { setupStore } = require("devtools/client/webconsole/new-console-output/test/helpers");
@@ -52,19 +52,16 @@ describe("FilterBar component:", () => {
 
     expect(getAllUi(store.getState()).filterBarVisible).toBe(false);
 
     const wrapper = mount(Provider({store}, FilterBar({ serviceContainer })));
     wrapper.find(".devtools-filter-icon").simulate("click");
 
     expect(getAllUi(store.getState()).filterBarVisible).toBe(true);
 
-    const secondaryBar = wrapper.find(".webconsole-filterbar-secondary");
-    expect(secondaryBar.length).toBe(1);
-
     // Buttons are displayed
     const filterBtn = props => FilterButton(
       Object.assign({}, {
         active: true,
         dispatch: store.dispatch
       }, props)
     );
 
@@ -77,19 +74,17 @@ describe("FilterBar component:", () => {
       DOM.span({
         className: "devtools-separator",
       }),
       filterBtn({ label: "CSS", filterKey: "css" }),
       filterBtn({ label: "XHR", filterKey: "netxhr", active: false }),
       filterBtn({ label: "Requests", filterKey: "net", active: false }),
     ];
 
-    secondaryBar.children().forEach((child, index) => {
-      expect(child.html()).toEqual(shallow(buttons[index]).html());
-    })
+    expect(wrapper.containsAllMatchingElements(buttons)).toBe(true);
   });
 
   it("fires MESSAGES_CLEAR action when clear button is clicked", () => {
     const store = setupStore([]);
     store.dispatch = sinon.spy();
 
     const wrapper = mount(Provider({store}, FilterBar({ serviceContainer })));
     wrapper.find(".devtools-clear-icon").simulate("click");