Bug 1364386 - Update tests; r=nchevobbe draft
authorJan Odvarko <odvarko@gmail.com>
Wed, 17 May 2017 14:52:11 +0200
changeset 579562 0e37fe3fec035115a6a97835258bbeac69e6af07
parent 579561 cb97fcdf715441e9d674e66f75518f6b7ef55ee1
child 629044 a16c990ff0753eede5e187496ba72dade9810f57
push id59293
push userjodvarko@mozilla.com
push dateWed, 17 May 2017 12:52:55 +0000
reviewersnchevobbe
bugs1364386
milestone55.0a1
Bug 1364386 - Update tests; r=nchevobbe MozReview-Commit-ID: 3iD70SdPECo
devtools/client/webconsole/new-console-output/test/store/search.test.js
--- a/devtools/client/webconsole/new-console-output/test/store/search.test.js
+++ b/devtools/client/webconsole/new-console-output/test/store/search.test.js
@@ -61,16 +61,28 @@ describe("Searching in grips", () => {
 
   describe("Search in logs with net messages", () => {
     it("matches on network messages", () => {
       store.dispatch(actions.filterToggle("net"));
       store.dispatch(actions.filterTextSet("get"));
       expect(getAllMessages(store.getState()).size).toEqual(1);
     });
   });
+
+  describe("Search in frame", () => {
+    it("matches on file name", () => {
+      store.dispatch(actions.filterTextSet("test-console-api.html:1:27"));
+      expect(getAllMessages(store.getState()).size).toEqual(7);
+    });
+
+    it("do not match on full url", () => {
+      store.dispatch(actions.filterTextSet("http://example.com/browser/devtools"));
+      expect(getAllMessages(store.getState()).size).toEqual(0);
+    });
+  });
 });
 
 function prepareBaseStore() {
   const store = setupStore([
     "console.log('foobar', 'test')",
     "console.warn('danger, will robinson!')",
     "console.table(['red', 'green', 'blue']);",
     "console.count('bar')",