Skip to content

Commit

Permalink
Merge branch 'unified-ui-testing' into ui-testing-progress
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Oct 10, 2024
2 parents c4d3ed0 + d8f4a43 commit e224aa9
Show file tree
Hide file tree
Showing 238 changed files with 1,439 additions and 704 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 8.4.0-alpha.6

- Addon-docs, blocks: Prebundle dependencies - [#29301](https://github.com/storybookjs/storybook/pull/29301), thanks @JReinhold!
- React: Prebundle all of `renderers/react`'s dependencies - [#29298](https://github.com/storybookjs/storybook/pull/29298), thanks @ndelangen!
- Vite: Cleanup and prebundle dependencies - [#29302](https://github.com/storybookjs/storybook/pull/29302), thanks @JReinhold!

## 8.4.0-alpha.5

- Core: Migrate from `express` to `polka` - [#29230](https://github.com/storybookjs/storybook/pull/29230), thanks @43081j!
- Core: Remove dependence on `file-system-cache` - [#29256](https://github.com/storybookjs/storybook/pull/29256), thanks @ndelangen!

## 8.4.0-alpha.4

- Blocks: Prebundle `es-toolkit` - [#29259](https://github.com/storybookjs/storybook/pull/29259), thanks @JReinhold!
Expand Down
4 changes: 4 additions & 0 deletions code/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ const config: StorybookConfig = {
directory: '../addons/interactions/template/stories',
titlePrefix: 'addons/interactions/tests',
},
{
directory: '../addons/test/src/components',
titlePrefix: 'addons/test',
},
{
directory: '../addons/test/template/stories',
titlePrefix: 'addons/test',
Expand Down
4 changes: 4 additions & 0 deletions code/.storybook/storybook.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { beforeAll, vi, expect as vitestExpect } from 'vitest';
import { setProjectAnnotations } from '@storybook/react';
import { userEvent as storybookEvent, expect as storybookExpect } from '@storybook/test';

// eslint-disable-next-line import/namespace
import * as testAnnotations from '@storybook/experimental-addon-test/preview';

import * as coreAnnotations from '../addons/toolbars/template/stories/preview';
import * as componentAnnotations from '../core/template/stories/preview';
// register global components used in many stories
Expand All @@ -17,6 +20,7 @@ const annotations = setProjectAnnotations([
// @ts-expect-error check type errors later
componentAnnotations,
coreAnnotations,
testAnnotations,
{
// experiment with injecting Vitest's interactivity API over our userEvent while tests run in browser mode
// https://vitest.dev/guide/browser/interactivity-api.html
Expand Down
2 changes: 2 additions & 0 deletions code/__mocks__/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const realpathSync = vi.fn();
export const readdir = vi.fn();
export const readdirSync = vi.fn();
export const readlinkSync = vi.fn();
export const mkdirSync = vi.fn();

export default {
__setMockFiles,
Expand All @@ -29,4 +30,5 @@ export default {
readdir,
readdirSync,
readlinkSync,
mkdirSync,
};
2 changes: 1 addition & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/docs/angular/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable no-underscore-dangle */
import { global } from '@storybook/global';

export const setCompodocJson = (compodocJson) => {
// @ts-expect-error (Converted from ts-ignore)
global.__STORYBOOK_COMPODOC_JSON__ = compodocJson;
globalThis.__STORYBOOK_COMPODOC_JSON__ = compodocJson;
};
3 changes: 1 addition & 2 deletions code/addons/docs/ember/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable no-underscore-dangle */
import { global } from '@storybook/global';

export const setJSONDoc = (jsondoc) => {
global.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
globalThis.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
};
9 changes: 4 additions & 5 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
Expand Down Expand Up @@ -100,20 +100,19 @@
"@mdx-js/react": "^3.0.0",
"@storybook/blocks": "workspace:*",
"@storybook/csf-plugin": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/react-dom-shim": "workspace:*",
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"rehype-external-links": "^3.0.0",
"rehype-slug": "^6.0.0",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@mdx-js/mdx": "^3.0.0",
"@rollup/pluginutils": "^5.0.2",
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype-external-links": "^3.0.0",
"rehype-slug": "^6.0.0",
"typescript": "^5.3.2",
"vite": "^4.0.4"
},
Expand Down
4 changes: 1 addition & 3 deletions code/addons/docs/src/preview.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { PreparedStory } from 'storybook/internal/types';

import { global } from '@storybook/global';

const excludeTags = Object.entries(global.TAGS_OPTIONS ?? {}).reduce(
const excludeTags = Object.entries(globalThis.TAGS_OPTIONS ?? {}).reduce(
(acc, entry) => {
const [tag, option] = entry;
if ((option as any).excludeFromDocsStories) {
Expand Down
2 changes: 0 additions & 2 deletions code/addons/docs/template/stories/docs2/button.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
tags: ['autodocs'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
title: 'Multiple CSF Files Same Title',
component: globalThis.Components.Html,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
title: 'Multiple CSF Files Same Title',
component: globalThis.Components.Html,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { global as globalThis } from '@storybook/global';
import { expect, within } from '@storybook/test';

export default {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { global as globalThis } from '@storybook/global';
import { fn } from '@storybook/test';

export default {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
subcomponents: {
Expand Down
2 changes: 0 additions & 2 deletions code/addons/docs/template/stories/docspage/error.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
tags: ['autodocs', '!test', '!vitest'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
tags: ['autodocs'],
Expand Down
2 changes: 0 additions & 2 deletions code/addons/docs/template/stories/docspage/iframe.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
tags: ['autodocs'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Pre,
tags: ['autodocs'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

// FIXME: do this using basic React functions for multi-framework
// once sandbox linking is working
//
Expand Down
2 changes: 0 additions & 2 deletions code/addons/docs/template/stories/docspage/source.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { StoryContext } from 'storybook/internal/types';

import { global as globalThis } from '@storybook/global';

import { dedent } from 'ts-dedent';

export default {
Expand Down
3 changes: 0 additions & 3 deletions code/addons/docs/template/stories/toc/basic.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { global as globalThis } from '@storybook/global';
import { fn } from '@storybook/test';

export default {
component: globalThis.Components.Button,
tags: ['autodocs'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
tags: ['autodocs'],
Expand Down
2 changes: 0 additions & 2 deletions code/addons/docs/template/stories/toc/custom-title.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
tags: ['autodocs'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { global as globalThis } from '@storybook/global';

export default {
component: globalThis.Components.Button,
tags: ['autodocs'],
Expand Down
2 changes: 1 addition & 1 deletion code/addons/essentials/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/gfm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-mdx-gfm",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "GitHub Flavored Markdown in Storybook",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/highlight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-highlight",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Highlight DOM nodes within your stories",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-interactions",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Automate, test and debug user interactions",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/measure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-measure",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Inspect layouts by visualizing the box model",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-onboarding",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Storybook Addon Onboarding - Introduces a new onboarding experience",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/outline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-outline",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Outline all elements with CSS to help with layout placement and alignment",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storysource/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "View a story’s source code to see how it works and paste into your app",
"keywords": [
"addon",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/experimental-addon-test",
"version": "8.4.0-alpha.4",
"version": "8.4.0-alpha.6",
"description": "Integrate Vitest with Storybook",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -80,6 +80,7 @@
"@storybook/icons": "^1.2.12",
"@storybook/instrumenter": "workspace:*",
"@storybook/test": "workspace:*",
"@storybook/theming": "workspace:*",
"polished": "^4.2.2",
"ts-dedent": "^2.2.0"
},
Expand Down
Loading

0 comments on commit e224aa9

Please sign in to comment.