Skip to content

Commit

Permalink
docs: fixed storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusNotheis committed Apr 25, 2019
1 parent 7aa10e9 commit d1fd769
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 161 deletions.
61 changes: 0 additions & 61 deletions .babelrc

This file was deleted.

58 changes: 58 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false
}
],
'@babel/preset-react'
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-json-strings',
[
'@babel/plugin-proposal-decorators',
{
legacy: true
}
],
'@babel/plugin-proposal-function-sent',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-numeric-separator',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-logical-assignment-operators',
'@babel/plugin-proposal-do-expressions',
'@babel/plugin-proposal-function-bind'
],
env: {
test: {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-json-strings',
[
'@babel/plugin-proposal-decorators',
{
legacy: true
}
],
'@babel/plugin-proposal-function-sent',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-numeric-separator',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-logical-assignment-operators',
'@babel/plugin-proposal-do-expressions',
'@babel/plugin-proposal-function-bind',
'@babel/plugin-transform-modules-commonjs',
'dynamic-import-node'
]
}
}
};
6 changes: 2 additions & 4 deletions config/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ module.exports = {
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/**/?(*.)(spec|test).{js,jsx,ts,tsx}'],
moduleNameMapper: {
'\\.(css)$': 'identity-obj-proxy',
'^@fiori-for-react/styles$': '<rootDir>/packages/styles/src/index.ts',
'^@fiori-for-react/utils$': '<rootDir>/packages/utils/src/index.ts',
'^@shared/(.*)$': '<rootDir>/shared/$1'
'^@shared/(.*)$': '<rootDir>/shared/$1',
'^@ui5/webcomponents/dist(.*)$': '<rootDir>/shared/tests/mock/ReactComponent.js'
},
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
globals: {
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test:karma": "cd ./packages/fiori3 && node scripts/test/karma.js --coverage && cd ../../",
"test:jest": "jest --config=config/jest.config.js --env=jsdom",
"test:jest:coverage": "jest --config=config/jest.config.js --env=jsdom --coverage && node scripts/test/renameJestFile.js",
"test:combineCoverage": "nyc report --reporter=html --reporter=clover --temp-dir coverage/partial",
"test:combineCoverage": "nyc report --reporter=html --reporter=clover --reporter=text-lcov --temp-dir coverage/partial | coveralls",
"clean": "lerna clean --yes && node scripts/clean.js",
"postversion": "node ./scripts/postversion/index.js",
"prettier:all": "prettier --write --config ./prettier.config.js \"packages/**/*.{ts,tsx}\""
Expand Down Expand Up @@ -66,6 +66,7 @@
"chai-karma-snapshot": "^0.8.0",
"chalk": "^2.4.2",
"cli-table": "^0.3.1",
"coveralls": "^3.0.3",
"cross-env": "^5.2.0",
"dedent": "^0.7.0",
"dotenv": "^7.0.0",
Expand Down Expand Up @@ -111,7 +112,7 @@
"mkdirp": "^0.5.1",
"ncp": "^2.0.0",
"npm-run-all": "^4.1.5",
"nyc": "^14.0.0",
"nyc": "^13.3.0",
"open": "^6.1.0",
"ora": "^3.4.0",
"puppeteer": "^1.14.0",
Expand All @@ -137,6 +138,7 @@
"targz": "^1.0.1",
"tmp": "^0.0.33",
"ts-jest": "^24.0.2",
"ts-loader": "^5.4.3",
"ts-node": "6.2.0",
"tslint": "^5.15.0",
"tslint-config-prettier": "^1.18.0",
Expand Down
9 changes: 0 additions & 9 deletions packages/fiori3/config/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,3 @@ services:
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
# firefox:
# image: selenium/node-firefox:3.141.59-gold
# volumes:
# - /dev/shm:/dev/shm
# depends_on:
# - selenium-hub
# environment:
# - HUB_HOST=selenium-hub
# - HUB_PORT=4444
13 changes: 12 additions & 1 deletion packages/fiori3/src/components/Text/Text.karma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ import { matchSnapshot } from 'chai-karma-snapshot';
use(matchSnapshot);

describe('Text', () => {
let appRoot: HTMLElement;

before(() => {
appRoot = document.createElement('div');
document.body.appendChild(appRoot);
});

after(() => {
document.body.removeChild(appRoot);
});

it('Render Basic Text', () => {
const wrapper = mountThemedComponent(<Text>FioriText</Text>);
expect(wrapper.debug()).to.matchSnapshot();
Expand All @@ -29,7 +40,7 @@ describe('Text', () => {
});

it('custom width', () => {
const wrapper = mountThemedComponent(<Text width="300px">Test</Text>);
const wrapper = mountThemedComponent(<Text width="300px">Test</Text>, {}, { attachTo: appRoot });
// console.log(window.getComputedStyle(wrapper.getDOMNode()));

// document.find('body').append(wrapper.getDOMNode());
Expand Down
16 changes: 8 additions & 8 deletions scripts/rollup/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,29 @@
"filename": "charts.development.js",
"bundleType": "NODE_ES_DEV",
"packageName": "charts",
"size": 88927,
"gzip": 15659
"size": 103736,
"gzip": 19071
},
{
"filename": "charts.production.min.js",
"bundleType": "NODE_ES_PROD",
"packageName": "charts",
"size": 88927,
"gzip": 15659
"size": 103736,
"gzip": 19071
},
{
"filename": "charts.development.js",
"bundleType": "NODE_DEV",
"packageName": "charts",
"size": 89353,
"gzip": 15708
"size": 104162,
"gzip": 19089
},
{
"filename": "charts.production.min.js",
"bundleType": "NODE_PROD",
"packageName": "charts",
"size": 38450,
"gzip": 9811
"size": 43597,
"gzip": 11147
},
{
"filename": "custom-components.development.js",
Expand Down
3 changes: 3 additions & 0 deletions shared/tests/mock/ReactComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const React = require('react');

module.exports = () => React.createElement('div');
Loading

0 comments on commit d1fd769

Please sign in to comment.