test-runner icon indicating copy to clipboard operation
test-runner copied to clipboard

[Bug] Web Components not recognized as a story in test-runner

Open bhoungPP opened this issue 2 years ago • 1 comments
trafficstars

Describe the bug

A clear and concise description of what the bug is.

I have a web component story that's being created similar to how it's written in the storybook docs:

// demo-button.stories.js

import { html } from 'lit-html';

import './demo-button';

export default {
  title: 'Button',
};

export const Primary = () => html`<demo-button primary></demo-button>`;

Primary.storyName = 'I am the primary';

When running test-runner, I'm getting error Could not find instance of demo-button in the document

Steps to reproduce the behavior

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen. The runner should recognize web components as stories.

Screenshots and/or logs

If applicable, add screenshots and/or logs to help explain your problem.

Environment

  • OS: MacOS 12.6.3
  • Node.js version: v14.15.5
  • NPM version: 8.19.1

Additional context

Add any other context about the problem here.

bhoungPP avatar Mar 01 '23 22:03 bhoungPP

Hey there! Thanks for opening this issue.

Could you please create or share a minimal reproduction to take a look at? Thanks!

yannbf avatar Apr 21 '23 19:04 yannbf