diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/package.json b/package.json index 121c1fd8..76741a91 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,9 @@ "dev": "fusion dev", "build": "fusion build", "start": "fusion start", - "build-test": "fusion build --test", "download-selenium": "node download-selenium.js", - "test-chrome": "docker-compose run browser-test-chrome", - "test-firefox": "docker-compose run browser-test-firefox", + "test-chrome": "docker-compose down && docker-compose run browser-test-chrome", + "test-firefox": "docker-compose down && docker-compose run browser-test-firefox", "test-remote": "./test-remotely.sh", "cover": "fusion test --cover", "source-map-explorer": "fusion source-map-explorer", @@ -27,7 +26,7 @@ "fusion-plugin-browser-performance-emitter": "^0.1.10", "fusion-plugin-csrf-protection-react": "^0.2.0", "fusion-plugin-error-handling": "0.1.12", - "fusion-plugin-font-loader-react": "0.2.0", + "fusion-plugin-font-loader-react": "0.2.1", "fusion-plugin-i18n-react": "^0.1.9", "fusion-plugin-jwt": "^0.1.8", "fusion-plugin-node-performance-emitter": "^0.1.9", @@ -59,7 +58,7 @@ "eslint-plugin-react": "^7.4.0", "flow-bin": "^0.59.0", "nightmare": "^2.10.0", - "nightwatch": "^0.9.16", + "nightwatch": "^0.9.19", "node-fetch": "^1.7.3", "prettier": "1.8.2", "react-addons-test-utils": "^15.6.2", diff --git a/src/components/custom-fonts.js b/src/components/custom-fonts.js index 56f28dac..0ab2c94d 100644 --- a/src/components/custom-fonts.js +++ b/src/components/custom-fonts.js @@ -3,17 +3,17 @@ import {styled} from 'fusion-plugin-styletron-react'; import {withFontLoading as FontHOC} from 'fusion-plugin-font-loader-react'; // FIXME: as of React 16,
props are written to html (e.g. fontstyles) -const FancyLink1 = FontHOC('Lato-Bold')( +const FancyLink1 = FontHOC('lato-bold')( styled('a', props => ({ ':hover': {fontSize: `${props.answer}px`}, ...props.fontStyles, })) ); -const FancyLink2 = FontHOC('Lato-Italic')( +const FancyLink2 = FontHOC('lato-italic')( styled('div', props => ({...props.fontStyles})) ); -const FontedContainer = FontHOC('Lato-Regular')( +const FontedContainer = FontHOC('lato-regular')( styled('div', props => ({ background: 'lightgreen', border: '5px solid pink', @@ -32,7 +32,7 @@ export default class CustomFonts extends Component { Here is Bold - Here is thin + Here is thin ); } diff --git a/src/components/polyfill-tests.js b/src/components/polyfill-tests.js index 22750295..19433693 100644 --- a/src/components/polyfill-tests.js +++ b/src/components/polyfill-tests.js @@ -13,6 +13,9 @@ export default class PolyfillsTest extends React.Component { arrayInclude: null, arrayFind: null, promise: null, + weakMap: null, + map: null, + set: null, }; } @@ -48,10 +51,24 @@ export default class PolyfillsTest extends React.Component { // Map let map = typeof Map === 'function' && new Map(); const key = {}; + const value = {}; if (map) { - map.set(key, 'value'); + map.set(key, value); } - map = map && map.get(key) === 'value'; + map = map && map.get(key) === value; + + // Weak Map + let weakMap = typeof WeakMap === 'function' && new WeakMap(); + const weakKey = {}; + const weakValue = {}; + if (weakMap) { + weakMap.set(weakKey, weakValue); + } + weakMap = weakMap && weakMap.get(weakKey) === weakValue; + + // Set + let set = typeof Set === 'function' && new Set([1, 2, 3, 1, 2]); + set = set && set.size === 3; // Promise if (typeof Promise === 'function') { @@ -64,7 +81,15 @@ export default class PolyfillsTest extends React.Component { this.setState({promise: false}); } - this.setState({symbol, objectAssign, arrayInclude, arrayFind, map}); + this.setState({ + symbol, + objectAssign, + arrayInclude, + arrayFind, + map, + weakMap, + set, + }); } render() { @@ -87,6 +112,12 @@ export default class PolyfillsTest extends React.Component { {this.state.map !== null ? (
{`map: ${this.state.map}`}
) : null} + {this.state.weakMap !== null ? ( +
{`weakMap: ${this.state.weakMap}`}
+ ) : null} + {this.state.set !== null ? ( +
{`set: ${this.state.set}`}
+ ) : null} {this.state.promise !== null ? (
{`promise: ${this.state.promise}`}
) : null} diff --git a/src/components/root.js b/src/components/root.js index 48bc9808..67f1ad1e 100644 --- a/src/components/root.js +++ b/src/components/root.js @@ -56,7 +56,7 @@ const Root = (
  • Image
  • -
  • +
  • Split
  • @@ -65,10 +65,10 @@ const Root = (
  • CSS styled (Styletron)
  • -
  • +
  • Custom Fonts
  • -
  • +
  • Translations
  • diff --git a/src/components/split-example.js b/src/components/split-example.js index fc1b2fa3..a7cc8f4f 100644 --- a/src/components/split-example.js +++ b/src/components/split-example.js @@ -1,5 +1,5 @@ import React from 'react'; export default function bundleSplitComponent() { - return
    This should be async loaded
    ; + return
    This should be async loaded
    ; } diff --git a/src/components/translations.js b/src/components/translations.js index 88ca534a..10b7f946 100644 --- a/src/components/translations.js +++ b/src/components/translations.js @@ -7,7 +7,9 @@ export default withTranslations(['raw', 'interpolated'])(({translate}) => {

    Translations example