diff --git a/.travis.yml b/.travis.yml index 0524cb03..512b4689 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,13 +3,3 @@ node_js: - '8' script: - npm run test-ci -# addons: -# chrome: stable -# before_install: -# - # start your web application and listen on `127.0.0.1` -# - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & -# script: -# - npm run test-ci - # - eslint-gh-status-reporter - # - stylelint-gh-status-reporter - # - lighthouse-gh-status-reporter --chrome-port=9222 --chrome-hostname=localhost diff --git a/bundle/package.json b/bundle/package.json index 72628ce9..1ed9c543 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -5,6 +5,10 @@ "license": "MPL-2.0", "scripts": { "start": "NODE_ENV=development PORT=3069 REACT_APP_GQL_PORT=3069 REACT_APP_GQL_PROTOCOL=http node -r ./_env.js index.js", + "lint-ci": "echo 0", + "lint": "echo 0", + "test-ci": "echo 0", + "test": "echo 0", "prepublish": "echo 0" }, "dependencies": { diff --git a/package.json b/package.json index 62eda211..2b1e790d 100644 --- a/package.json +++ b/package.json @@ -12,12 +12,12 @@ "lint-docs": "./scripts/quality-docs", "lint-ci:root": "eslint . --ext .js --ext .md", "lint:root": "eslint . --fix --ext .js --ext .md", - "lint-ci:packages": "lerna run lint-ci --stream", - "lint:packages": "lerna run lint --stream", + "lint-ci:packages": "lerna run lint-ci --parallel --stream", + "lint:packages": "lerna run lint --parallel --stream", "lint-ci": "redrun -s lint-ci:*", "lint": "redrun -s lint:*", "test-ci": "CI=1 lerna run test-ci --stream", - "test": "lerna run test", + "test": "lerna run test --parallel --stream", "clean": "lerna clean --yes", "dev": "lerna run dev --parallel --stream", "commitmsg": "commitlint -e", diff --git a/packages/icons/src/__tests__/__snapshots__/icons.spec.js.snap b/packages/icons/src/__tests__/__snapshots__/icons.spec.js.snap index d873c545..c97f64cc 100644 --- a/packages/icons/src/__tests__/__snapshots__/icons.spec.js.snap +++ b/packages/icons/src/__tests__/__snapshots__/icons.spec.js.snap @@ -468,160 +468,6 @@ Array [ ] `; -exports[`renders without throwing 1`] = ` -Array [ - - - -, - - - -, - - - -, - - - -, - - - -, - - - -, - - - -, -] -`; - exports[`renders without throwing 1`] = ` Array [ without throwing 1`] = ` -Array [ - - - - - -, - - - - - -, - - - - - -, - - - - - -, - - - - - -, - - - - - -, - - - - - -, -] -`; - exports[`renders without throwing 1`] = ` Array [ without throwing 1`] = ` -Array [ - - -, - - -, - - -, - - -, - - -, - - -, - - -, -] -`; - exports[`renders without throwing 1`] = ` Array [ without throwing', () => { ).toMatchSnapshot(); }); -it('renders without throwing', () => { - expect( - renderer - .create( - - - - - - - - - - ) - .toJSON() - ).toMatchSnapshot(); -}); - it('renders without throwing', () => { expect( renderer @@ -382,24 +361,6 @@ it('renders without throwing', () => { ).toMatchSnapshot(); }); -it('renders without throwing', () => { - expect( - renderer - .create( - - - - - - - - - - ) - .toJSON() - ).toMatchSnapshot(); -}); - it('renders without throwing', () => { expect( renderer @@ -418,24 +379,6 @@ it('renders without throwing', () => { ).toMatchSnapshot(); }); -it('renders without throwing', () => { - expect( - renderer - .create( - - - - - - - - - - ) - .toJSON() - ).toMatchSnapshot(); -}); - it('renders without throwing', () => { expect( renderer diff --git a/packages/icons/src/checkcircle.js b/packages/icons/src/checkcircle.js deleted file mode 100644 index 45ba4980..00000000 --- a/packages/icons/src/checkcircle.js +++ /dev/null @@ -1,114 +0,0 @@ -import React from 'react'; -import remcalc from 'remcalc'; - -import Rotate from './rotate'; - -export const Tick = props => ( - - - -); - -export const Completed = ({ colors = {}, ...props }) => ( - - - - -); - -export const PartCompleted = ({ colors = {}, ...props }) => ( - - - - - -); - -export const Incomplete = ({ colors = {}, ...props }) => ( - - - - -); - -export default ({ - fill, - checked, - border, - direction = 'down', - style = {}, - ...rest -}) => ( - - {({ style: rotateStyle }) => { - if (fill && checked) { - return ; - } - - if (checked && border) { - return ; - } - - if (checked) { - return ; - } - - return ; - }} - -); diff --git a/packages/icons/src/health.js b/packages/icons/src/health.js deleted file mode 100644 index c82ed4d8..00000000 --- a/packages/icons/src/health.js +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react'; - -import Rotate from './rotate'; - -export default ({ - healthy = true, - direction = 'down', - colors = {}, - style = {}, - ...rest -}) => ( - - {({ style: rotateStyle }) => ( - - - - - - - )} - -); diff --git a/packages/icons/src/import.js b/packages/icons/src/import.js deleted file mode 100644 index d6318092..00000000 --- a/packages/icons/src/import.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; - -import Rotate from './rotate'; -import calcFill from './fill'; - -export default ({ - fill = null, - light = false, - disabled = false, - direction = 'down', - colors = {}, - style = {}, - ...rest -}) => ( - - {({ style: rotateStyle }) => ( - - - - )} - -); diff --git a/packages/icons/src/index.js b/packages/icons/src/index.js index b75ef7a5..8e6616c2 100644 --- a/packages/icons/src/index.js +++ b/packages/icons/src/index.js @@ -2,7 +2,6 @@ export { default as Actions } from './actions'; export { default as Affinity } from './affinity'; export { default as Arrow } from './arrow'; export { default as Bin } from './bin'; -export { default as Checkcircle } from './checkcircle'; export { default as Clipboard } from './clipboard'; export { default as Close } from './close'; export { default as Cns } from './cns'; @@ -17,9 +16,7 @@ export { default as Fabric } from './fabric'; // export { default as Filter } from './filter'; export { default as Firewall } from './firewall'; export { default as General } from './general'; -export { default as Health } from './health'; export { default as Id } from './id'; -export { default as Import } from './import'; export { default as InstanceCount } from './instance-count'; export { default as InstanceType } from './instance-type'; export { default as Instances } from './instances'; diff --git a/packages/my-joy-beta/package.json b/packages/my-joy-beta/package.json index e2deecfe..c0a3a8af 100644 --- a/packages/my-joy-beta/package.json +++ b/packages/my-joy-beta/package.json @@ -11,8 +11,8 @@ "build": "NODE_ENV=production joyent-react-scripts build", "lint-ci": "eslint . --ext .js --ext .md", "lint": "eslint . --fix --ext .js --ext .md", + "test-ci": "NODE_ENV=test joyent-react-scripts test --env=jsdom --testPathIgnorePatterns='.ui.js'", "test": "NODE_ENV=test joyent-react-scripts test --env=jsdom", - "test-ci": "npm run test", "prepublish": "echo 0" }, "dependencies": { @@ -62,8 +62,10 @@ "babel-preset-joyent-portal": "^6.0.1", "eslint": "^4.13.1", "eslint-config-joyent-portal": "^3.2.0", + "jest-image-snapshot": "^2.3.0", "jest-styled-components": "^4.9.0", "joyent-react-scripts": "^7.2.0", + "react-screenshot-renderer": "^1.1.0", "react-test-renderer": "^16.2.0", "redrun": "^5.10.0" } diff --git a/packages/my-joy-beta/src/app.js b/packages/my-joy-beta/src/app.js index 6f6cbad4..ae7ea607 100644 --- a/packages/my-joy-beta/src/app.js +++ b/packages/my-joy-beta/src/app.js @@ -51,7 +51,8 @@ const fullTheme = { 7: remcalc(42), 8: remcalc(48), 9: remcalc(54), - 10: remcalc(60) + 10: remcalc(60), + '14px': remcalc(14) } }; diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-add-service-form-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-add-service-form-1-snap.png new file mode 100644 index 00000000..9e6a1026 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-add-service-form-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-add-service-form-pristine-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-add-service-form-pristine-1-snap.png new file mode 100644 index 00000000..4e656555 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-add-service-form-pristine-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-header-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-header-1-snap.png new file mode 100644 index 00000000..a39d7bbd Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-header-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostname-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostname-1-snap.png new file mode 100644 index 00000000..9ddc014b Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostname-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostname-values-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostname-values-1-snap.png new file mode 100644 index 00000000..9317a5fe Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostname-values-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostnames-header-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostnames-header-1-snap.png new file mode 100644 index 00000000..c81dbd02 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/cns-ui-js-hostnames-header-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-default-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-default-rules-1-snap.png new file mode 100644 index 00000000..a03d6339 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-default-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-default-rules-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-default-rules-rules-1-snap.png new file mode 100644 index 00000000..db45019c Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-default-rules-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-1-snap.png new file mode 100644 index 00000000..68f3e021 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-default-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-default-rules-1-snap.png new file mode 100644 index 00000000..bdafcd40 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-default-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-enabled-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-enabled-1-snap.png new file mode 100644 index 00000000..6005babe Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-enabled-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-tag-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-tag-rules-1-snap.png new file mode 100644 index 00000000..5ca6d397 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-firewall-tag-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-rules-1-snap.png new file mode 100644 index 00000000..9ddc014b Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-rules-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-rules-rules-1-snap.png new file mode 100644 index 00000000..6c6c224d Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-rules-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-tag-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-tag-rules-1-snap.png new file mode 100644 index 00000000..6517c7b6 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-tag-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-tag-rules-rules-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-tag-rules-rules-1-snap.png new file mode 100644 index 00000000..20326968 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-tag-rules-rules-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-firewall-form-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-firewall-form-1-snap.png new file mode 100644 index 00000000..aeff0a01 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-firewall-form-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-firewall-form-submitting-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-firewall-form-submitting-1-snap.png new file mode 100644 index 00000000..598dd1c5 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-firewall-form-submitting-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-inactive-form-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-inactive-form-1-snap.png new file mode 100644 index 00000000..83272e73 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/firewall-ui-js-toggle-inactive-form-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-1-snap.png new file mode 100644 index 00000000..9560dbb5 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-expanded-false-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-expanded-false-1-snap.png new file mode 100644 index 00000000..13d3e680 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-expanded-false-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-input-input-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-input-input-1-snap.png new file mode 100644 index 00000000..9560dbb5 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-input-input-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-input-textarea-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-input-textarea-1-snap.png new file mode 100644 index 00000000..88304376 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-input-textarea-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-add-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-add-1-snap.png new file mode 100644 index 00000000..9560dbb5 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-add-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-edit-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-edit-1-snap.png new file mode 100644 index 00000000..4db25ef6 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-edit-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-removing-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-removing-1-snap.png new file mode 100644 index 00000000..a6e14148 --- /dev/null +++ b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-removing-1-snap.png @@ -0,0 +1 @@ +[object Object] \ No newline at end of file diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png new file mode 100644 index 00000000..a6e14148 --- /dev/null +++ b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png @@ -0,0 +1 @@ +[object Object] \ No newline at end of file diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-type-tag-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-type-tag-1-snap.png new file mode 100644 index 00000000..95cc2ab0 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-type-tag-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-1-snap.png new file mode 100644 index 00000000..8ef05ccb Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-2-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-2-snap.png new file mode 100644 index 00000000..31d6dba7 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-2-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-1-snap.png new file mode 100644 index 00000000..c3b00564 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-2-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-2-snap.png new file mode 100644 index 00000000..35fb6a27 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-2-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-3-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-3-snap.png new file mode 100644 index 00000000..c3b00564 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-3-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-4-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-4-snap.png new file mode 100644 index 00000000..35fb6a27 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-4-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-5-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-5-snap.png new file mode 100644 index 00000000..35fb6a27 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-5-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-1-snap.png new file mode 100644 index 00000000..6d8284e2 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-2-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-2-snap.png new file mode 100644 index 00000000..c09f8ddc Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-2-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-3-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-3-snap.png new file mode 100644 index 00000000..c09f8ddc Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-fabric-3-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-1-snap.png new file mode 100644 index 00000000..aa525a37 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-2-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-2-snap.png new file mode 100644 index 00000000..c09f8ddc Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-2-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-1-snap.png new file mode 100644 index 00000000..5d367bb9 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-2-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-2-snap.png new file mode 100644 index 00000000..888e9730 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-2-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-3-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-3-snap.png new file mode 100644 index 00000000..888e9730 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-public-3-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-add-form-without-throwing-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-add-form-without-throwing-1-snap.png new file mode 100644 index 00000000..95cc2ab0 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-add-form-without-throwing-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-edit-form-without-throwing-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-edit-form-without-throwing-1-snap.png new file mode 100644 index 00000000..ef95fed4 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-edit-form-without-throwing-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-tag-name-value-without-throwing-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-tag-name-value-without-throwing-1-snap.png new file mode 100644 index 00000000..7e3ea9d4 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-tag-name-value-without-throwing-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-tag-without-throwing-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-tag-without-throwing-1-snap.png new file mode 100644 index 00000000..be9b6a7d Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/tags-ui-js-renders-tag-without-throwing-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap b/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap index 0cfeb43f..1ea533ca 100644 --- a/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap +++ b/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap @@ -695,7 +695,7 @@ exports[`renders without throwing 1`] = ` background-color: rgb(250,250,250); color: rgb(216,216,216); cursor: not-allowed; - font-family: "Roboto Mono"; + font-family: "Roboto Mono",monospace; width: 100%; font-size: 0.9375rem; line-height: normal !important; diff --git a/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap b/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap index 6ac70953..266746a0 100644 --- a/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap +++ b/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap @@ -512,7 +512,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c6 { @@ -1730,7 +1729,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c6 { @@ -2684,7 +2682,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c6 { @@ -2971,7 +2968,7 @@ exports[`renders without throwing 1`] = ` background-color: rgb(255,255,255); border: 0.0625rem solid rgb(216,216,216); color: rgba(73,73,73,1); - font-family: "Roboto Mono"; + font-family: "Roboto Mono",monospace; width: 100%; text-overflow: ellipsis; resize: vertical; @@ -3769,7 +3766,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c6 { @@ -4757,7 +4753,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c0 { @@ -5831,7 +5826,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c6 { @@ -6925,7 +6919,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c6 { @@ -7955,7 +7948,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c6 { diff --git a/packages/my-joy-beta/src/components/__tests__/__snapshots__/network.spec.js.snap b/packages/my-joy-beta/src/components/__tests__/__snapshots__/network.spec.js.snap index ac73ae43..61155af3 100644 --- a/packages/my-joy-beta/src/components/__tests__/__snapshots__/network.spec.js.snap +++ b/packages/my-joy-beta/src/components/__tests__/__snapshots__/network.spec.js.snap @@ -4167,62 +4167,6 @@ exports[`renders without throwing 1`] = ` -
-
-
-
-
-

- Instances on network -

-
-
-
- - - -
-
-
-
@@ -5045,136 +4989,6 @@ exports[`renders without throwing 1`] = ` margin-bottom: 0.4375rem; } -.c30 { - box-sizing: content-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 0 auto; - -ms-flex: 1 0 auto; - flex: 1 0 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - border-width: 0.0625rem; - border-style: solid; - -webkit-transition: all 300ms ease; - transition: all 300ms ease; - color: rgba(73,73,73,1); - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); - cursor: pointer; - min-height: auto; - height: 2.875rem; - -webkit-flex: 0 0 2.875rem; - -ms-flex: 0 0 2.875rem; - flex: 0 0 2.875rem; -} - -.c31 { - box-sizing: content-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 0 auto; - -ms-flex: 1 0 auto; - flex: 1 0 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - border-width: 0.0625rem; - border-style: solid; - -webkit-transition: all 300ms ease; - transition: all 300ms ease; - color: rgba(73,73,73,1); - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); - cursor: pointer; - min-height: auto; - height: 2.875rem; - -webkit-flex: 0 0 2.875rem; - -ms-flex: 0 0 2.875rem; - flex: 0 0 2.875rem; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - z-index: 1; - line-height: 1.5rem; - height: auto; - max-width: 100%; - margin: -0.0625rem -0.0625rem 0 -0.0625rem; - margin: -0.0625rem; - box-shadow: none; -} - -.c31 button { - margin-bottom: 0; - margin-top: 0; -} - -.c32 { - box-sizing: content-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 0 auto; - -ms-flex: 1 0 auto; - flex: 1 0 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - border-width: 0.0625rem; - border-style: solid; - -webkit-transition: all 300ms ease; - transition: all 300ms ease; - color: rgba(73,73,73,1); - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); - cursor: pointer; - min-height: auto; - height: 2.875rem; - -webkit-flex: 0 0 2.875rem; - -ms-flex: 0 0 2.875rem; - flex: 0 0 2.875rem; - box-sizing: border-box; - min-height: 2.9375rem; - max-width: 100%; - width: auto; - height: auto; - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: stretch; - -webkit-box-align: stretch; - -ms-flex-align: stretch; - align-items: stretch; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - overflow: hidden; - background-color: transparent; - border-width: 0; - box-shadow: none; - color: inherit; -} - .c24 { box-sizing: content-box; display: -webkit-box; @@ -5285,7 +5099,7 @@ exports[`renders without throwing 1`] = ` border: 0.0625rem solid rgb(216,216,216); color: rgba(73,73,73,1); width: 22.1875rem; - font-family: "Roboto Mono"; + font-family: "Roboto Mono",monospace; max-width: 22.1875rem; font-size: 0.9375rem; line-height: normal !important; @@ -5827,62 +5641,6 @@ exports[`renders without throwing 1`] = ` -
-
-
-
-
-

- Instances on network -

-
-
-
- - - -
-
-
-
diff --git a/packages/my-joy-beta/src/components/__tests__/__snapshots__/tags.spec.js.snap b/packages/my-joy-beta/src/components/__tests__/__snapshots__/tags.spec.js.snap index 2afb8cff..aabd56e9 100644 --- a/packages/my-joy-beta/src/components/__tests__/__snapshots__/tags.spec.js.snap +++ b/packages/my-joy-beta/src/components/__tests__/__snapshots__/tags.spec.js.snap @@ -377,7 +377,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c16 { @@ -1399,7 +1398,6 @@ exports[`renders without throwing 1`] = ` float: right; font-size: 0.8125rem; float: none; - margin-left: 1.75rem; } .c16 { diff --git a/packages/my-joy-beta/src/components/__tests__/cns.ui.js b/packages/my-joy-beta/src/components/__tests__/cns.ui.js new file mode 100644 index 00000000..244fb037 --- /dev/null +++ b/packages/my-joy-beta/src/components/__tests__/cns.ui.js @@ -0,0 +1,71 @@ +import React from 'react'; +import { toMatchImageSnapshot } from 'jest-image-snapshot'; +import renderer from 'react-test-renderer'; +import screenshot from 'react-screenshot-renderer'; + +import { Header, HostnamesHeader, AddServiceForm, Hostname } from '../cns'; +import Theme from '@mocks/theme'; + +expect.extend({ + toMatchImageSnapshot +}); + +it('
', async () => { + expect( + await screenshot( + +
+ + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); diff --git a/packages/my-joy-beta/src/components/__tests__/firewall.spec.js b/packages/my-joy-beta/src/components/__tests__/firewall.spec.js index 1b808291..f341816b 100644 --- a/packages/my-joy-beta/src/components/__tests__/firewall.spec.js +++ b/packages/my-joy-beta/src/components/__tests__/firewall.spec.js @@ -2,7 +2,14 @@ import React, { Fragment } from 'react'; import renderer from 'react-test-renderer'; import 'jest-styled-components'; -import Firewall, { Rules, TagRules, DefaultRules, ToggleFirewallForm, ToggleInactiveForm } from '../firewall'; +import Firewall, { + Rules, + TagRules, + DefaultRules, + ToggleFirewallForm, + ToggleInactiveForm +} from '../firewall'; + import Theme from '@mocks/theme'; const rules = [ diff --git a/packages/my-joy-beta/src/components/__tests__/firewall.ui.js b/packages/my-joy-beta/src/components/__tests__/firewall.ui.js new file mode 100644 index 00000000..f6ad3daa --- /dev/null +++ b/packages/my-joy-beta/src/components/__tests__/firewall.ui.js @@ -0,0 +1,257 @@ +import React, { Fragment } from 'react'; +import { toMatchImageSnapshot } from 'jest-image-snapshot'; +import renderer from 'react-test-renderer'; +import screenshot from 'react-screenshot-renderer'; + +import Firewall, { + Rules, + TagRules, + DefaultRules, + ToggleFirewallForm, + ToggleInactiveForm +} from '../firewall'; + +import Theme from '@mocks/theme'; + +expect.extend({ + toMatchImageSnapshot +}); + +const rules = [ + { + id: '3473327e-6d0c-4747-97c5-ced1260a7e42', + enabled: true, + rule_str: 'FROM any TO all vms ALLOW icmp TYPE 8 CODE 0', + rule_obj: { + from: [['wildcard', 'any']], + to: [['wildcard', 'vmall']], + action: 'allow', + protocol: { + name: 'icmp', + targets: ['8:0'] + }, + isWildcard: true, + tags: [] + }, + global: true, + description: null + }, + { + id: '24d55d2f-12ba-4935-9de9-ac305b8a40a5', + enabled: true, + rule_str: 'FROM any TO all vms ALLOW icmp6 TYPE all', + rule_obj: { + from: [['wildcard', 'any']], + to: [['wildcard', 'vmall']], + action: 'allow', + protocol: { + name: 'icmp6', + targets: ['all'] + }, + isWildcard: true, + tags: [] + }, + global: true, + description: 'allow all ICMPv6 types' + }, + { + id: '4bd8b2e2-981b-474b-9b8b-0b53fecb4b71', + enabled: false, + rule_str: 'FROM all vms TO all vms ALLOW tcp PORT all', + rule_obj: { + from: [['wildcard', 'vmall']], + to: [['wildcard', 'vmall']], + action: 'allow', + protocol: { + name: 'tcp', + targets: ['all'] + }, + isWildcard: true, + tags: [] + }, + global: null, + description: null + }, + { + id: 'af549024-b3b1-43bf-8a66-49c2b2dc5640', + enabled: false, + rule_str: 'FROM all vms TO all vms ALLOW tcp PORT all', + rule_obj: { + from: [['wildcard', 'vmall']], + to: [['wildcard', 'vmall']], + action: 'allow', + protocol: { + name: 'tcp', + targets: ['all'] + }, + isWildcard: true, + tags: [] + }, + global: null, + description: null + }, + { + id: '9e5a152a-582b-4525-909e-f9c55deb7f03', + enabled: false, + rule_str: 'FROM any TO tag "wat" ALLOW tcp PORT all', + rule_obj: { + from: [['wildcard', 'any']], + to: [['tag', 'wat']], + action: 'allow', + protocol: { + name: 'tcp', + targets: ['all'] + }, + isWildcard: false, + tags: ['wat'] + }, + global: null, + description: null + } +]; + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + !rule_obj.tags.length)} + enabled + /> + !rule_obj.tags.length)} + /> + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + rule_obj.tags.length)} + enabled + /> + rule_obj.tags.length)} + /> + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); diff --git a/packages/my-joy-beta/src/components/__tests__/key-value.ui.js b/packages/my-joy-beta/src/components/__tests__/key-value.ui.js new file mode 100644 index 00000000..6873b14e --- /dev/null +++ b/packages/my-joy-beta/src/components/__tests__/key-value.ui.js @@ -0,0 +1,101 @@ +import React from 'react'; +import { toMatchImageSnapshot } from 'jest-image-snapshot'; +import renderer from 'react-test-renderer'; +import screenshot from 'react-screenshot-renderer'; + +import { KeyValue } from '../key-value'; +import Theme from '@mocks/theme'; + +expect.extend({ + toMatchImageSnapshot +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + renderer.create( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + expect( + renderer.create( + + + + ) + ).toMatchImageSnapshot(); +}); diff --git a/packages/my-joy-beta/src/components/__tests__/network.spec.js b/packages/my-joy-beta/src/components/__tests__/network.spec.js index 8671635e..b4735003 100644 --- a/packages/my-joy-beta/src/components/__tests__/network.spec.js +++ b/packages/my-joy-beta/src/components/__tests__/network.spec.js @@ -1,5 +1,3 @@ -/* eslint-disable camelcase */ - import React from 'react'; import renderer from 'react-test-renderer'; import 'jest-styled-components'; diff --git a/packages/my-joy-beta/src/components/__tests__/network.ui.js b/packages/my-joy-beta/src/components/__tests__/network.ui.js new file mode 100644 index 00000000..a2a5c2b1 --- /dev/null +++ b/packages/my-joy-beta/src/components/__tests__/network.ui.js @@ -0,0 +1,180 @@ +import React from 'react'; +import { toMatchImageSnapshot } from 'jest-image-snapshot'; +import renderer from 'react-test-renderer'; +import screenshot from 'react-screenshot-renderer'; + +import { Collapsed, Expanded } from '../network'; +import Theme from '@mocks/theme'; + +expect.extend({ + toMatchImageSnapshot +}); + +it('', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + const network = { + id: '1', + name: 'name', + description: 'description', + fabric: false, + subnet: '255.255.255.0', + provision_start_ip: '192.168.1.2', + provision_end_ip: '192.168.1.253', + selected: false, + infoExpanded: false + }; + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + const network = { + id: '1', + name: 'name', + description: 'description', + fabric: false, + subnet: '255.255.255.0', + provision_start_ip: '192.168.1.2', + provision_end_ip: '192.168.1.253', + selected: false, + infoExpanded: false + }; + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + const network = { + id: '1', + name: 'name', + description: 'description', + fabric: false, + subnet: '255.255.255.0', + provision_start_ip: '192.168.1.2', + provision_end_ip: '192.168.1.253', + selected: false, + infoExpanded: false, + public: true + }; + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + const network = { + id: '1', + name: 'name', + description: 'description', + fabric: true, + subnet: '255.255.255.0', + provision_start_ip: '192.168.1.2', + provision_end_ip: '192.168.1.253', + selected: false, + infoExpanded: false + }; + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('', async () => { + const network = { + id: '1', + name: 'name', + description: 'description', + fabric: true, + subnet: '255.255.255.0', + provision_start_ip: '192.168.1.2', + provision_end_ip: '192.168.1.253', + selected: false, + infoExpanded: true + }; + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); + + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); diff --git a/packages/my-joy-beta/src/components/__tests__/tags.ui.js b/packages/my-joy-beta/src/components/__tests__/tags.ui.js new file mode 100644 index 00000000..34e55b23 --- /dev/null +++ b/packages/my-joy-beta/src/components/__tests__/tags.ui.js @@ -0,0 +1,51 @@ +import React from 'react'; +import { toMatchImageSnapshot } from 'jest-image-snapshot'; +import renderer from 'react-test-renderer'; +import screenshot from 'react-screenshot-renderer'; + +import Tag, { AddForm, EditForm } from '../tags'; +import Theme from '@mocks/theme'; + +expect.extend({ + toMatchImageSnapshot +}); + +it('renders without throwing', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('renders without throwing', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('renders without throwing', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); + +it('renders without throwing', async () => { + expect( + await screenshot( + + + + ) + ).toMatchImageSnapshot(); +}); diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-header-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-header-1-snap.png new file mode 100644 index 00000000..4606332a Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-header-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-header-tag-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-header-tag-1-snap.png new file mode 100644 index 00000000..4606332a Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-header-tag-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-rule-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-rule-1-snap.png new file mode 100644 index 00000000..ebc2531b Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-rule-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-rule-2-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-rule-2-snap.png new file mode 100644 index 00000000..ebc2531b Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/affinity-ui-js-rule-2-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-1-snap.png new file mode 100644 index 00000000..2f94bc41 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-expanded-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-expanded-1-snap.png new file mode 100644 index 00000000..2f94bc41 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-expanded-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-images-name-stuff-image-name-stuff-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-images-name-stuff-image-name-stuff-1-snap.png new file mode 100644 index 00000000..4c4abca4 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-images-name-stuff-image-name-stuff-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-images-test-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-images-test-1-snap.png new file mode 100644 index 00000000..2f94bc41 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-images-test-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-is-vm-selected-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-is-vm-selected-1-snap.png new file mode 100644 index 00000000..2f94bc41 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-is-vm-selected-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-loading-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-loading-1-snap.png new file mode 100644 index 00000000..2f94bc41 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-pristine-false-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-pristine-false-1-snap.png new file mode 100644 index 00000000..2f94bc41 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/images-ui-js-images-pristine-false-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-1-snap.png new file mode 100644 index 00000000..33a2db59 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-expanded-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-expanded-1-snap.png new file mode 100644 index 00000000..33a2db59 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-expanded-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-name-test-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-name-test-1-snap.png new file mode 100644 index 00000000..33a2db59 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-name-test-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-pristine-false-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-pristine-false-1-snap.png new file mode 100644 index 00000000..33a2db59 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/name-ui-js-name-pristine-false-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-filters-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-filters-1-snap.png new file mode 100644 index 00000000..7ca51a2d Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-filters-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-overview-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-overview-1-snap.png new file mode 100644 index 00000000..bb2981b6 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-overview-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-overview-has-vms-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-overview-has-vms-1-snap.png new file mode 100644 index 00000000..98517416 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-overview-has-vms-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-package-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-package-1-snap.png new file mode 100644 index 00000000..5892c9d6 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-package-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-expanded-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-expanded-1-snap.png new file mode 100644 index 00000000..8e276cd8 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-expanded-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-is-vm-selected-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-is-vm-selected-1-snap.png new file mode 100644 index 00000000..8e276cd8 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-is-vm-selected-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-loading-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-loading-1-snap.png new file mode 100644 index 00000000..8e276cd8 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-packages-name-stuff-image-name-stuff-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-packages-name-stuff-image-name-stuff-1-snap.png new file mode 100644 index 00000000..dfe61f34 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-packages-name-stuff-image-name-stuff-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-pristine-false-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-pristine-false-1-snap.png new file mode 100644 index 00000000..8e276cd8 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/package-ui-js-packages-pristine-false-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-1-snap.png new file mode 100644 index 00000000..46e2dc9c Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-icon-name-icon-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-icon-name-icon-1-snap.png new file mode 100644 index 00000000..aba645d8 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-icon-name-icon-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-icon-test-label-instance-name-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-icon-test-label-instance-name-1-snap.png new file mode 100644 index 00000000..aba645d8 Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-icon-test-label-instance-name-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-label-test-1-snap.png b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-label-test-1-snap.png new file mode 100644 index 00000000..46e2dc9c Binary files /dev/null and b/packages/my-joy-beta/src/components/create-instance/__tests__/__image_snapshots__/title-ui-js-title-label-test-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap index 2ac126e8..dad59c3a 100644 --- a/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap +++ b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap @@ -44,7 +44,7 @@ exports[`renders without throwing 1`] = ` margin-bottom: 2rem; } -.c8 { +.c12 { margin-right: 0.25rem; } @@ -76,6 +76,51 @@ exports[`renders without throwing 1`] = ` } .c5 { + width: 4.125rem; + position: relative; + padding: 0.75rem; + padding-right: 1.5625rem; + width: auto; + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + color: rgb(216,216,216); + margin: 0 0.375rem; +} + +.c7 { + width: 5.625rem; + position: relative; + padding: 0.75rem; + padding-right: 1.5625rem; + width: auto; + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + color: rgb(216,216,216); + margin: 0 0.375rem; +} + +.c10 { + width: 7.5rem; position: relative; padding: 0.75rem; padding-right: 1.5625rem; @@ -120,7 +165,7 @@ exports[`renders without throwing 1`] = ` -webkit-padding-after: 0; } -.c9 { +.c13 { box-sizing: border-box; width: 18.75rem; height: 3rem; @@ -156,41 +201,41 @@ exports[`renders without throwing 1`] = ` outline: 0; } -.c9::-webkit-input-placeholder { +.c13::-webkit-input-placeholder { color: rgba(73,73,73,0.5); } -.c9::-moz-placeholder { +.c13::-moz-placeholder { color: rgba(73,73,73,0.5); } -.c9:-ms-input-placeholder { +.c13:-ms-input-placeholder { color: rgba(73,73,73,0.5); } -.c9:invalid { +.c13:invalid { box-shadow: none; } -.c9:disabled { +.c13:disabled { background-color: rgb(250,250,250); color: rgb(216,216,216); cursor: not-allowed; } -.c9:disabled::-webkit-input-placeholder { +.c13:disabled::-webkit-input-placeholder { color: rgba(73,73,73,0.5); } -.c9:disabled::-moz-placeholder { +.c13:disabled::-moz-placeholder { color: rgba(73,73,73,0.5); } -.c9:disabled:-ms-input-placeholder { +.c13:disabled:-ms-input-placeholder { color: rgba(73,73,73,0.5); } -.c9:focus { +.c13:focus { border-color: rgb(59,70,204); outline: 0; } @@ -227,7 +272,7 @@ exports[`renders without throwing 1`] = ` right: 0.375rem; } -.c7 { +.c9 { position: relative; display: -webkit-inline-box; display: -webkit-inline-flex; @@ -242,7 +287,7 @@ exports[`renders without throwing 1`] = ` margin-left: 0; } -.c7:after { +.c9:after { content: ''; width: 0.625rem; height: 0.625rem; @@ -256,7 +301,7 @@ exports[`renders without throwing 1`] = ` right: 0.75rem; } -.c7:after { +.c9:after { right: 0.375rem; } @@ -285,6 +330,8 @@ exports[`renders without throwing 1`] = ` appearance: none; min-height: 0; max-width: 22.1875rem; + width: 4.125rem; + max-width: 4.125rem; text-overflow: ellipsis; font-size: 0.9375rem; line-height: normal !important; @@ -335,6 +382,160 @@ exports[`renders without throwing 1`] = ` outline: 0; } +.c8 { + box-sizing: border-box; + width: 18.75rem; + height: 3rem; + min-height: 3rem; + margin-bottom: 0.5rem; + margin-top: 0.5rem; + padding: 0.8125rem 1.125rem; + border-radius: 0.25rem; + background-color: rgb(255,255,255); + border: 0.0625rem solid rgb(216,216,216); + color: rgba(73,73,73,1); + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + max-width: 22.1875rem; + width: 5.625rem; + max-width: 5.625rem; + text-overflow: ellipsis; + font-size: 0.9375rem; + line-height: normal !important; + font-style: normal; + font-stretch: normal; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + outline: 0; +} + +.c8::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:invalid { + box-shadow: none; +} + +.c8:disabled { + background-color: rgb(250,250,250); + color: rgb(216,216,216); + cursor: not-allowed; +} + +.c8:disabled::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:disabled::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:disabled:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:focus { + border-color: rgb(59,70,204); + outline: 0; +} + +.c11 { + box-sizing: border-box; + width: 18.75rem; + height: 3rem; + min-height: 3rem; + margin-bottom: 0.5rem; + margin-top: 0.5rem; + padding: 0.8125rem 1.125rem; + border-radius: 0.25rem; + background-color: rgb(255,255,255); + border: 0.0625rem solid rgb(216,216,216); + color: rgba(73,73,73,1); + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + max-width: 22.1875rem; + width: 7.5rem; + max-width: 7.5rem; + text-overflow: ellipsis; + font-size: 0.9375rem; + line-height: normal !important; + font-style: normal; + font-stretch: normal; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + outline: 0; +} + +.c11::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:invalid { + box-shadow: none; +} + +.c11:disabled { + background-color: rgb(250,250,250); + color: rgb(216,216,216); + cursor: not-allowed; +} + +.c11:disabled::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:disabled::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:disabled:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:focus { + border-color: rgb(59,70,204); + outline: 0; +} +
@@ -356,12 +557,14 @@ exports[`renders without throwing 1`] = `