diff --git a/.storybook/main.js b/.storybook/main.js index 7dd3b4789..81cda3d9a 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,18 +1,14 @@ import { dirname, join } from 'path'; -//const outlineConfig = require('../outline.config'); module.exports = { stories: [ // Intentionally ordering welcome page first. - '../packages/documentation/outline-docs/src/guides/welcome.mdx', + '../packages/documentation/outline-docs/src/guides/welcome/00-welcome.mdx', + '../packages/documentation/outline-docs/src/guides/welcome/more-information/*.mdx', + // Tooling usage guides. + '../packages/documentation/outline-docs/src/guides/development/tooling/**/*.mdx', // Component development guides. '../packages/documentation/outline-docs/src/guides/development/component-development/**/*.mdx', - // Component usage guides. - '../packages/documentation/outline-docs/src/guides/consumers/**/*.mdx', - // QA/UAT usage guides. - '../packages/documentation/outline-docs/src/guides/qa-uat/**/*.mdx', - // Tooling usage guides. - '../packages/documentation/outline-docs/src/guides/tooling/**/*.mdx', // Documentation stories. '../packages/documentation/outline-docs/src/guides/**/*.@(js|ts|mdx)', // Modern component stories. @@ -31,10 +27,10 @@ module.exports = { storyStoreV7: true, postcss: true, buildStoriesJson: true, - modernInlineRender: true, + modernInlineRender: false, }, framework: { - name: getAbsolutePath('@storybook/web-components-vite'), + name: '@storybook/web-components-vite', options: {}, }, docs: { @@ -42,7 +38,3 @@ module.exports = { defaultName: 'Documentation', // set to change the name of generated docs entries }, }; - -function getAbsolutePath(value) { - return dirname(require.resolve(join(value, 'package.json'))); -} diff --git a/.storybook/preview.js b/.storybook/preview.js index 611295dd0..5fce33be9 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -10,15 +10,13 @@ export const parameters = { options: { storySort: { order: [ - 'Getting Started', - 'Documentation', - 'Design Tokens', + 'Welcome Guide', + 'Coding Guide', 'Media', 'Navigation', 'Content', 'Templates', 'Pages', - 'Code Examples', 'Utility Components', ], }, diff --git a/packages/documentation/outline-docs/src/guides/development/component-development/main.mdx b/packages/documentation/outline-docs/src/guides/development/component-development/00-main.mdx similarity index 91% rename from packages/documentation/outline-docs/src/guides/development/component-development/main.mdx rename to packages/documentation/outline-docs/src/guides/development/component-development/00-main.mdx index 91a2c7a11..4539f99a7 100644 --- a/packages/documentation/outline-docs/src/guides/development/component-development/main.mdx +++ b/packages/documentation/outline-docs/src/guides/development/component-development/00-main.mdx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/addon-docs'; import '@phase2/outline-core-alert'; - -# Unit Testing - - - Documentation Status: (11/07/2023) -

This documentation is in need of various updates.

-
-
- -## Introduction - -Testing is handled by [Web Test Runner](https://modern-web.dev/guides/test-runner/getting-started/) and uses [Playwright](https://playwright.dev/) to test modern browsers locally. - -## Running tests - -Run tests on Chromium, Firefox, and Webkit - -```bash -yarn run test -``` - -You can also append one or more browsers to test on specifically i.e. -`BROWSERS=firefox,chromium yarn run test` - -### Interactive mode - -You can run the TypeScript compiler in one terminal and the interactive Web Test Runner in another to automatically re-run your tests and open tests in a browser for debugging. - -```bash -yarn tsc --watch - -yarn wtr --watch -``` - -### BrowserStack mode - -Optionally you can run tests using [BrowserStack](https://www.browserstack.com/) by running -`yarn run test:browserstack` -Note: You must enter your username and access key in the .env file to use BrowserStack testing - -## Developing tests - -Test files should be located in a test folder in your component directory with a `.test.ts` extension i.e. `src/components/base/outline-example/test/outline-example.test.ts` - -More info on writing tests for web components can be found at [Open-WC.org](https://open-wc.org/docs/testing/helpers/) diff --git a/packages/documentation/outline-docs/src/guides/welcome.mdx b/packages/documentation/outline-docs/src/guides/welcome/00-welcome.mdx similarity index 94% rename from packages/documentation/outline-docs/src/guides/welcome.mdx rename to packages/documentation/outline-docs/src/guides/welcome/00-welcome.mdx index fbfdba714..632cc32d7 100644 --- a/packages/documentation/outline-docs/src/guides/welcome.mdx +++ b/packages/documentation/outline-docs/src/guides/welcome/00-welcome.mdx @@ -2,7 +2,7 @@ import { Meta } from '@storybook/addon-docs'; import '@phase2/outline-core-alert';