Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Rename "render" hooks to "visit" hooks #394

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Nov 17, 2023

This PR introduces a change in the test-runner where the hooks previously known as preRender and postRender now become preVisit and postVisit.

This is mostly to address concerns regarding confusion from users, who think that the test-runner is related to the rendering of stories. By renaming to "visit", we make it more explicit that the test-runner visits the story, and watches what it does, rather than do many things that will alter the rendering of a story.

There are no breaking changes, it's backwards compatible and the "render" hooks are deprecated and will alert the user to switch to the "visit" hooks.

Additionally, all of the documentation was changed to use Typescript.

📦 Published PR as canary version: 0.15.2--canary.394.e6df920.0

✨ Test out this PR locally via:

npm install @storybook/test-runner@0.15.2--canary.394.e6df920.0
# or 
yarn add @storybook/test-runner@0.15.2--canary.394.e6df920.0

Version

Published prerelease version: v0.15.2-next.1

Changelog

🐛 Bug Fix

  • Refactor: Rename "render" hooks to "visit" hooks #394 (@yannbf)
  • Docs: Update tags documentation #393 (@yannbf)

Authors: 1

@yannbf yannbf self-assigned this Nov 17, 2023
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d2665d1) 80.64% compared to head (e6df920) 80.64%.
Report is 2 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #394   +/-   ##
=======================================
  Coverage   80.64%   80.64%           
=======================================
  Files          12       12           
  Lines         217      217           
  Branches       56       56           
=======================================
  Hits          175      175           
  Misses         42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

playwright/jest-setup.js Outdated Show resolved Hide resolved
@yannbf yannbf added the patch Increment the patch version when merged label Nov 17, 2023
@yannbf yannbf merged commit b6dc95f into next Nov 17, 2023
15 checks passed
@yannbf yannbf mentioned this pull request Nov 21, 2023
Copy link

🚀 PR was released in v0.15.2 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants