Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #367 +/- ##
========================================
+ Coverage 5.86% 6.00% +0.13%
========================================
Files 176 169 -7
Lines 14858 14272 -586
Branches 309 302 -7
========================================
- Hits 872 857 -15
+ Misses 13898 13333 -565
+ Partials 88 82 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| let description: string | React.ReactNode; | ||
| switch (true) { | ||
| case !!warning: | ||
| description = <Link onClick={clickWarning}>{warning}</Link>; | ||
| break; | ||
| case testProviderState === 'test-provider-state:running': | ||
| description = localBuildProgress | ||
| ? BUILD_STEP_CONFIG[localBuildProgress.currentStep].renderProgress(localBuildProgress) | ||
| : 'Starting...'; | ||
| break; | ||
| case !!isOutdated: | ||
| description = 'Test results outdated'; | ||
| break; | ||
| case localBuildProgress?.currentStep === 'aborted': | ||
| description = 'Aborted by user'; | ||
| break; | ||
| case localBuildProgress?.currentStep === 'complete': | ||
| description = localBuildProgress.errorCount | ||
| ? `Encountered ${pluralize('component error', localBuildProgress.errorCount, true)}` | ||
| : warningStatusCount | ||
| ? `Found ${pluralize('story', warningStatusCount, true)} with ${pluralize('change', warningStatusCount)}` | ||
| : 'No visual changes detected'; | ||
| break; | ||
| default: | ||
| description = 'Not run'; | ||
| } |
There was a problem hiding this comment.
this was essentially what the previous TestingModuleDescription component used to return. now we're setting description instead, and returning the JSX that LegacyRender would return - but simplified as it doesn't need to be generalized anymore.
| @@ -1,6 +1,3 @@ | |||
| import * as coreEvents from 'storybook/internal/core-events'; | |||
| import { experimental_getStatusStore } from 'storybook/manager-api'; | |||
There was a problem hiding this comment.
This was really bad, I don't know why I thought this was a good idea initially. Because the preset also imports from this constants file, it could result in the preset pulling in manager-api too.
ghengeveld
left a comment
There was a problem hiding this comment.
Code-wise this looks fine. I'll do a functional pass as well.
…hromaui/addon-visual-tests into jeppe/migrate-to-new-test-provider-api
|
🚀 PR was released in |
Depends on storybookjs/storybook#30943
This PR migrates to the new test provider API, and removes usage of the deprecated API.
That means:
titleanddescriptionwith a singlerenderfunction when registering the test provider in the manager. Therenderfunction is a simple combination of the existingTestingModuleDescriptioncomponent and theLegacyRendercomponent from Storybook core that was responsible for combiningtitleanddescriptionpreviously.SidebarTopandSidebarBottomcomponents, that were fallback when used in older Storybook versions where the testing module didn't exist yet.TESTING_MODULE_Xevents, but rather use thetestingProviderStorewhen necessary.Also replaced
addon-essentialswithaddon-docs, as it was now failing in the latest alphas.📦 Published PR as canary version:
4.0.0--canary.367.ede83ad.0✨ Test out this PR locally via:
npm install @chromatic-com/storybook@4.0.0--canary.367.ede83ad.0 # or yarn add @chromatic-com/storybook@4.0.0--canary.367.ede83ad.0Version
Published prerelease version:
v4.0.0-next.4Changelog
💥 Breaking Change
🚀 Enhancement
🐛 Bug Fix
nextAuthors: 3