Skip to content

Commit

Permalink
Merge pull request #1550 from ProcessMaker/feature/FOUR-13446
Browse files Browse the repository at this point in the history
FOUR-13446 Implement Pages Fixes
  • Loading branch information
ryancooley authored Feb 28, 2024
2 parents 9d5a827 + df297ef commit 8406827
Show file tree
Hide file tree
Showing 34 changed files with 19,291 additions and 4,469 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ module.exports = {
extends: [
"plugin:vue/recommended",
"airbnb-base",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
"plugin:storybook/recommended"
],

parserOptions: {
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Storybook
on:
pull_request:
types: [opened, reopened, synchronize, edited]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install

- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
path: |
~/.cache/ms-playwright
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: Build Storybook
run: npm run build-storybook --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:6006 && npm run test-storybook --coverage"
18 changes: 18 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type { import('@storybook/vue-vite').StorybookConfig } */
const config = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-docs",
"@storybook/addon-interactions"
],
framework: {
name: "@storybook/vue-vite",
options: {}
},
docs: {
autodocs: "tag"
}
};
export default config;
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api';

addons.setConfig({
// Place the controls panel at the bottom of the canvas
panelPosition: 'bottom',
});
14 changes: 14 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type { import('@storybook/vue').Preview } */
const preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
Loading

0 comments on commit 8406827

Please sign in to comment.