diff --git a/package.js b/package.js index 6bb4193..29eeaa6 100644 --- a/package.js +++ b/package.js @@ -256,7 +256,7 @@ const specs = { // Testing with Jest 'jest': '16.1.0-alpha.691b0e22', - 'jest-html': '^1.1.0', + 'jest-html': '^1.2.0', 'react-test-renderer': '15.3.2', 'babel-jest': '16.0.0', diff --git a/package.json b/package.json index 32bcad0..eca6950 100755 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "ignore-styles": "4.0.0", "isomorphic-fetch": "2.2.1", "jest": "16.1.0-alpha.691b0e22", - "jest-html": "^1.1.0", + "jest-html": "^1.2.0", "json-loader": "0.5.4", "mocha": "2.4.5", "moment": "2.14.1", diff --git a/testJest/chromeExtension/components/__snapshots__/005-app.test.js.snap b/testJest/chromeExtension/components/__snapshots__/005-app.test.js.snap index 1baef0d..c86d549 100644 --- a/testJest/chromeExtension/components/__snapshots__/005-app.test.js.snap +++ b/testJest/chromeExtension/components/__snapshots__/005-app.test.js.snap @@ -96,35 +96,33 @@ exports[`App renders correctly when connected 1`] = ` ------------HTML PREVIEW--------------- +
-
-
-
-
-
-
- Toolbar -
+ class="giu-floats" + style="height:0;left:0;position:absolute;top:0;width:0;" + > +
+
+
+
+
+ Toolbar
-
-
-
- Story -
+
+
+
+
+ Story
+
`; exports[`App renders correctly when disconnected 1`] = ` @@ -189,31 +187,36 @@ exports[`App renders correctly when disconnected 1`] = `
------------HTML PREVIEW--------------- +
-
-
-
+ class="giu-floats" + style="height:0;left:0;position:absolute;top:0;width:0;" + > +
+
+
+
+
+ + + Connecting to Storyboard...
-
-
- - - Connecting to Storyboard... -
- -
- Navigate to your Storyboard-equipped app (and log in if required) -
+ +
+ Navigate to your Storyboard-equipped app (and log in if required)
+
`; diff --git a/testJest/chromeExtension/components/__snapshots__/010-login.test.js.snap b/testJest/chromeExtension/components/__snapshots__/010-login.test.js.snap index 6dbb59b..03a2ccb 100644 --- a/testJest/chromeExtension/components/__snapshots__/010-login.test.js.snap +++ b/testJest/chromeExtension/components/__snapshots__/010-login.test.js.snap @@ -22,16 +22,16 @@ exports[`Login renders correctly when LOGGED_IN 1`] = ` title="Log out" />
------------HTML PREVIEW--------------- -
- Logged in as Guille - - - -
+
+ Logged in as Guille + + + +
`; exports[`Login renders correctly when LOGGED_OUT 1`] = ` @@ -127,38 +127,41 @@ exports[`Login renders correctly when LOGGED_OUT 1`] = `
------------HTML PREVIEW--------------- -
-
-
-
- - Server logs: - - - - - -
+
+
+
+ + Server logs: + + + + + +
+
`; exports[`Login renders correctly when LOGGING_IN 1`] = ` @@ -253,38 +256,41 @@ exports[`Login renders correctly when LOGGING_IN 1`] = `
------------HTML PREVIEW--------------- -
-
-
-
- - Server logs: - - - - - - -
+
+
+
+ + Server logs: + + + + + + +
+
`; exports[`Login renders correctly when login needs are still unknown 1`] = ` @@ -307,13 +313,13 @@ exports[`Login renders correctly when login needs are still unknown 1`] = ` } />
------------HTML PREVIEW--------------- -
- - -
+
+ + +
`; exports[`Login renders correctly when no login is required 1`] = ` @@ -330,10 +336,9 @@ exports[`Login renders correctly when no login is required 1`] = ` ------------HTML PREVIEW--------------- -
- - No login required to see server logs - -
+
+ + No login required to see server logs + +
`; diff --git a/testJest/chromeExtension/components/__snapshots__/015-toolbar.test.js.snap b/testJest/chromeExtension/components/__snapshots__/015-toolbar.test.js.snap index a3019d8..8fc6c50 100644 --- a/testJest/chromeExtension/components/__snapshots__/015-toolbar.test.js.snap +++ b/testJest/chromeExtension/components/__snapshots__/015-toolbar.test.js.snap @@ -138,59 +138,57 @@ exports[`Toolbar renders correctly when connected 1`] = ` } /> ------------HTML PREVIEW--------------- -
-
-
- - - - - - - - - - - - -
-
-
-
-
- Login -
-
+
+
+
+ + + + + + + + + + + +
-
+
+
+
+ Login +
+
+
`; exports[`Toolbar renders correctly when disconnected 1`] = ` @@ -333,59 +331,57 @@ exports[`Toolbar renders correctly when disconnected 1`] = ` } />
------------HTML PREVIEW--------------- -
-
-
- - - - - - - - - - - - -
-
-
-
-
- Login -
-
+
+
+
+ + + + + + + + + + + +
-
+
+
+
+ Login +
+
+
`; exports[`Toolbar shows settings when the corresponding icon is clicked 1`] = ` @@ -554,64 +550,60 @@ exports[`Toolbar shows settings when the corresponding icon is clicked 1`] = ` } />
------------HTML PREVIEW--------------- -
-
-
- Settings -
+
+
+
+ Settings
-
-
- - - - - - - - - - - - -
-
-
-
-
- Login -
-
+
+
+
+ + + + + + + + + + + +
-
+
+
+
+ Login +
+
+
`; diff --git a/testJest/chromeExtension/components/__snapshots__/016-settings.test.js.snap b/testJest/chromeExtension/components/__snapshots__/016-settings.test.js.snap index 7dfe6e9..a2b8a48 100644 --- a/testJest/chromeExtension/components/__snapshots__/016-settings.test.js.snap +++ b/testJest/chromeExtension/components/__snapshots__/016-settings.test.js.snap @@ -805,288 +805,291 @@ exports[`Settings renders correctly 1`] = `
------------HTML PREVIEW--------------- -
+
+
+
+
+ class="giu-backdrop" + style="background-color:white;height:100vh;left:0;opacity:0.7;position:fixed;top:0;width:100vw;" + >
-
-
-
-
+
+
+
+
+ class="allowUserSelect" + style="border:1px solid red;border-radius:2px;color:red;margin-bottom:10px;padding:15px;" + > + Changes to these settings can't be saved (beyond your current session) due to your current Chrome configuration. Please visit + + chrome://settings/content + + and uncheck the option "Block third-party cookies and site data". Then close the Chrome DevTools and open them again.
-
+ -
- Changes to these settings can\'t be saved (beyond your current session) due to your current Chrome configuration. Please visit - - chrome://settings/content - - and uncheck the option \"Block third-party cookies and site data\". Then close the Chrome DevTools and open them again. -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
-
- Log filters, e.g. - - foo, ba*:INFO, -test, *:WARN - - - - (more examples here) - - : -
-
    -
  • - - - -
  • -
  • - - - -
  • -
-
+ id="giu-checkbox_0" + type="checkbox" + > + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+
+
+ Log filters, e.g. + + foo, ba*:INFO, -test, *:WARN + + + + (more examples here) + + : +
+
    +
  • - + class="giu-text-input" + id="serverFilter" + style="background-color:transparent;border:1px solid #999999;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;width:300px;" + type="text" + value="*:INFO" + > +
  • +
  • - - - -
-
- Colors: client stories: - - - + class="giu-text-input" + id="localClientFilter" + style="background-color:transparent;border:1px solid #999999;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;width:300px;" + type="text" + value="*:DEBUG" + > + + +
+ + + + + + + + + + +
+
+ Colors: client stories: + + + +
+ x
- x -
-
-
-
+ class="giu-transparency-tiles" + style="border-radius:2px;bottom:4px;left:4px;position:absolute;right:4px;top:4px;" + >
- - - server stories: - - - +
+
+
+ + server stories: + + + +
+ x
- x -
-
-
-
+ class="giu-transparency-tiles" + style="border-radius:2px;bottom:4px;left:4px;position:absolute;right:4px;top:4px;" + >
- - - background: - - - +
+
+
+ + background: + + + +
+ x
- x -
-
-
-
+ class="giu-transparency-tiles" + style="border-radius:2px;bottom:4px;left:4px;position:absolute;right:4px;top:4px;" + >
- -
- (Use very light or very dark colors for best results, or choose a - - - preset - - ) -
-
-
- - Cancel - - - Reset defaults - -
+
+ +
+ (Use very light or very dark colors for best results, or choose a + - Save + style="-webkit-user-select:none;border:1px solid #999999;border-radius:5px;cursor:pointer;display:inline-block;padding:1px 5px;user-select:none;" + > + preset + )
-
+
+ + Cancel + + + Reset defaults + +
+ + Save +
+
+
`; diff --git a/testJest/chromeExtension/components/__snapshots__/020-story.test.js.snap b/testJest/chromeExtension/components/__snapshots__/020-story.test.js.snap index 37b03c7..54d6f6b 100644 --- a/testJest/chromeExtension/components/__snapshots__/020-story.test.js.snap +++ b/testJest/chromeExtension/components/__snapshots__/020-story.test.js.snap @@ -90,46 +90,46 @@ exports[`Story 01 renders correctly an empty main story 1`] = `
------------HTML PREVIEW--------------- -
+
+
-
- - CLIENT - - - [ - 0 - ] - + class="rootStoryTitle" + style="cursor:pointer;margin-bottom:5px;text-align:center;" + > + + CLIENT + + + [ + 0 + ] -
+
+
+
-
- - SERVER - - - [ - 0 - ] - + class="rootStoryTitle" + style="cursor:pointer;margin-bottom:5px;text-align:center;" + > + + SERVER + + + [ + 0 + ] -
+
+
`; exports[`Story 02 renders correctly server and client records (root level) 1`] = ` @@ -350,94 +350,52 @@ exports[`Story 02 renders correctly server and client records (root level) 1`] =
------------HTML PREVIEW--------------- -
+
+
-
- - CLIENT - - - [ - 0 - ] - - -
-
- - 1970-01-01 01:00:00.000 - - - - - - INFO - -
-
- - - - msg 1 - -
-
- - 1970-01-01 01:00:00.000 - - - - - - INFO - -
-
- - - - msg 2 + class="rootStoryTitle" + style="cursor:pointer;margin-bottom:5px;text-align:center;" + > + + CLIENT + + + [ + 0 + ] -
+
-
- - SERVER - - - [ - 0 - ] - + class="log allowUserSelect fadeIn" + style="background-color:aliceblue;color:black;font-family:Menlo, Consolas, monospace;overflow-x:hidden;text-overflow:ellipsis;white-space:pre;" + >1970-01-01 01:00:00.000 INFO
msg 1
+
1970-01-01 01:00:00.000 INFO
msg 2
+
+
+
+ + SERVER + + + [ + 0 + ] -
+
+
`; diff --git a/testJest/chromeExtension/components/__snapshots__/030-coloredText.test.js.snap b/testJest/chromeExtension/components/__snapshots__/030-coloredText.test.js.snap index 835642c..00073f7 100644 --- a/testJest/chromeExtension/components/__snapshots__/030-coloredText.test.js.snap +++ b/testJest/chromeExtension/components/__snapshots__/030-coloredText.test.js.snap @@ -29,24 +29,20 @@ exports[`ColoredText renders correctly with styled text 1`] = ` ------------HTML PREVIEW--------------- - - - That\'s - - - red - - - and that\'s - - - very important - + + + That's + + red + + + and that's + + + very important + + `; exports[`ColoredText renders correctly with unstyled text 1`] = ` @@ -56,10 +52,9 @@ exports[`ColoredText renders correctly with unstyled text 1`] = ` Hello ------------HTML PREVIEW--------------- - - Hello - + + Hello + `; exports[`ColoredText renders nested styles correctly 1`] = ` @@ -89,20 +84,17 @@ exports[`ColoredText renders nested styles correctly 1`] = ` ------------HTML PREVIEW--------------- - - - That\'s - - - very - - - important - + + + That's + + + very + + important + + `; exports[`ColoredText respects the onClick prop 1`] = ` @@ -112,10 +104,9 @@ exports[`ColoredText respects the onClick prop 1`] = ` Hello ------------HTML PREVIEW--------------- - - Hello - + + Hello + `; exports[`ColoredText respects the style prop 1`] = ` @@ -129,8 +120,7 @@ exports[`ColoredText respects the style prop 1`] = ` Hello ------------HTML PREVIEW--------------- - - Hello - + + Hello + `; diff --git a/yarn.lock b/yarn.lock index c97b044..4442870 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3352,9 +3352,9 @@ jest-haste-map@^16.1.0-alpha.691b0e22: multimatch "^2.1.0" worker-farm "^1.3.1" -jest-html@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jest-html/-/jest-html-1.1.0.tgz#c750681226f23679b8519104cf075b8e3aac159b" +jest-html@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/jest-html/-/jest-html-1.2.0.tgz#b41a060bcd8c0f0b115d55d6fc1ae0545cf36e36" dependencies: babel-polyfill "6.16.0" body-parser "^1.15.2"