Skip to content

appload event triggers before story renders #25

@nwhittaker

Description

@nwhittaker

Hoping to use this plugin in conjunction with the @stencil/playwright adapter for E2E testing1.

In Playwright, we use the Stencil adapter's page.goto() method to load the Story's iframe content directly and then make assertions against it. However, we run into occasional flakiness where the story has not rendered by the time the assertions run. I see the adapter adds logic to the goto() method to wait for the appload event to trigger before finishing. However, debugging this event, the story is not attached to the DOM by the time the event is triggered.

Would it be appropriate for the Stencil storybook plugin to defer the appload event until after the story is rendered and hydrated?

Footnotes

  1. https://stenciljs.com/docs/testing/playwright/e2e-testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions