storybookjs / test-runner

🚕 Turn stories into executable tests
https://storybook.js.org/docs/writing-tests/interaction-testing
MIT License
220 stars 66 forks source link

[Bug]: Storybook 8.1.4 updated stories index to v5, which is unsupported #472

Closed vxsx closed 1 month ago

vxsx commented 1 month ago

Describe the bug

This change https://github.com/storybookjs/storybook/pull/27358 updated the index version, which is not supported by test-runner yet: https://github.com/storybookjs/test-runner/blob/next/src/playwright/transformPlaywrightJson.ts#L127

To Reproduce

Run any playwright test

System

Storybook Environment Info:

  System:
    OS: macOS 14.3.1
    CPU: (12) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.13.1 - ~/.nvm/versions/node/v20.13.1/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.13.1/bin/yarn
    npm: 10.8.0 - ~/.nvm/versions/node/v20.13.1/bin/npm <----- active
    pnpm: 9.1.2 - ~/.nvm/versions/node/v20.13.1/bin/pnpm
  Browsers:
    Chrome: 125.0.6422.78
    Safari: 17.3.1
  npmPackages:
    @storybook/addon-a11y: ^8.1.3 => 8.1.3
    @storybook/addon-essentials: ^8.1.3 => 8.1.3
    @storybook/react: ^8.1.3 => 8.1.3
    @storybook/react-vite: ^8.1.3 => 8.1.3
    @storybook/test: ^8.1.3 => 8.1.3
    @storybook/test-runner: ^0.18.1 => 0.18.1
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    storybook: ^8.1.4 => 8.1.4
    storybook-dark-mode: ^4.0.1 => 4.0.1

but I believe largely irrelevant

Additional context

test-storybook --url=http://storybook-static:3003/ --no-cache --verbose
[test-storybook] Detected a remote Storybook URL, running in index json mode. To disable this, run the command again with --no-index-json
[test-storybook] Unsupported version 5 
Error: Unsupported version 5
    at transformPlaywrightJson (/app/node_modules/@storybook/test-runner/dist/test-storybook.js:17728:11)
    at getIndexTempDir (/app/node_modules/@storybook/test-runner/dist/test-storybook.js:24708:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (/app/node_modules/@storybook/test-runner/dist/test-storybook.js:24816:19)