Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: test that angular example works #2557

Merged
merged 3 commits into from
Dec 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ jobs:
command: |
cd examples/vue-kitchen-sink
yarn build-storybook
- run:
name: "Build angular-cli"
command: |
cd examples/angular-cli
yarn build-storybook

- run:
name: "Run react kitchen-sink"
Expand All @@ -81,6 +86,12 @@ jobs:
cd examples/vue-kitchen-sink
yarn storybook
background: true
- run:
name: "Run angular-cli"
command: |
cd examples/angular-cli
yarn storybook
background: true
- run:
name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
command: sh ./scripts/workaround-puppeteer-issue-290.sh
Expand Down
5 changes: 5 additions & 0 deletions examples/angular-cli/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import { configure } from '@storybook/angular';

function loadStories() {
// put welcome screen at the top of the list so it's the first one displayed
require('../src/stories');

// automatically import all story ts files that end with *.stories.ts
const req = require.context('../src/stories', true, /\.stories\.ts$/)
req.keys().forEach((filename) => req(filename))
}

configure(loadStories, module);
2 changes: 1 addition & 1 deletion examples/angular-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"storybook": "start-storybook -p 9009 -s src/assets",
"storybook": "start-storybook -p 9008 -s src/assets",
"build-storybook": "build-storybook -s src"
},
"private": true,
Expand Down
2 changes: 0 additions & 2 deletions examples/angular-cli/src/stories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import { ServiceComponent } from './moduleMetadata/service.component'
import { NameComponent } from './name.component';
import { CustomPipePipe } from './custom.pipe';

import './customControlValueAccessor/custom-cva-component.stories';

storiesOf('Welcome', module)
.add('to Storybook', () => ({
component: Welcome,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions integration/examples.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const examples = [
name: 'vue-kitchen-sink',
port: 9009,
},
{
name: 'angular-cli',
port: 9008,
},
];

examples.forEach(({ name, port }) => {
Expand Down