Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaa02c9f

Browse files
chore: reduce storybook flakes (#17427)
A few storybook tests have been false positives quite frequently. Toreduce this noise, I'm implementing a few hacks to avoid that. We canalways rollback these changes if we notice they were leading to a lackin the tests.
1 parent27bc60d commitaa02c9f

File tree

8 files changed

+42
-9
lines changed

8 files changed

+42
-9
lines changed

‎site/src/pages/DeploymentSettingsPage/OverviewPage/OverviewPageView.stories.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ const meta: Meta<typeof OverviewPageView> = {
3939
invalidExperiments:[],
4040
safeExperiments:[],
4141
},
42+
parameters:{
43+
chromatic:{
44+
diffThreshold:0.5,
45+
},
46+
},
4247
};
4348

4449
exportdefaultmeta;

‎site/src/pages/DeploymentSettingsPage/OverviewPage/UserEngagementChart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export const UserEngagementChart: FC<UserEngagementChartProps> = ({ data }) => {
156156
</defs>
157157

158158
<Area
159+
isAnimationActive={false}
159160
dataKey="users"
160161
type="linear"
161162
fill="url(#fillUsers)"

‎site/src/pages/OrganizationSettingsPage/CustomRolesPage/PermissionPillsList.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import { PermissionPillsList } from "./PermissionPillsList";
66
constmeta:Meta<typeofPermissionPillsList>={
77
title:"pages/OrganizationCustomRolesPage/PermissionPillsList",
88
component:PermissionPillsList,
9+
decorators:[
10+
(Story)=>(
11+
<divstyle={{width:"800px"}}>
12+
<Story/>
13+
</div>
14+
),
15+
],
916
};
1017

1118
exportdefaultmeta;

‎site/src/pages/OrganizationSettingsPage/OrganizationProvisionerJobsPage/JobRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const JobRow: FC<JobRowProps> = ({ job }) => {
121121
<dd>{job.metadata.workspace_name??"null"}</dd>
122122

123123
<dt>Creation time:</dt>
124-
<dd>{job.created_at}</dd>
124+
<dddata-chromatic="ignore">{job.created_at}</dd>
125125

126126
<dt>Queue:</dt>
127127
<dd>

‎site/src/pages/OrganizationSettingsPage/OrganizationProvisionersPage/ProvisionerRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ export const ProvisionerRow: FC<ProvisionerRowProps> = ({
111111
])}
112112
>
113113
<dt>Last seen:</dt>
114-
<dd>{provisioner.last_seen_at}</dd>
114+
<dddata-chromatic="ignore">{provisioner.last_seen_at}</dd>
115115

116116
<dt>Creation time:</dt>
117-
<dd>{provisioner.created_at}</dd>
117+
<dddata-chromatic="ignore">{provisioner.created_at}</dd>
118118

119119
<dt>Version:</dt>
120120
<dd>

‎site/src/pages/TerminalPage/TerminalPage.stories.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
MockAuthMethodsAll,
1515
MockBuildInfo,
1616
MockDefaultOrganization,
17+
MockDeploymentConfig,
1718
MockEntitlements,
1819
MockExperiments,
1920
MockUser,
@@ -78,13 +79,27 @@ const meta = {
7879
data:{editWorkspaceProxies:true},
7980
},
8081
{key:["me","appearance"],data:MockUserAppearanceSettings},
82+
{
83+
key:["deployment","config"],
84+
data:{
85+
...MockDeploymentConfig,
86+
config:{
87+
...MockDeploymentConfig.config,
88+
web_terminal_renderer:"canvas",
89+
},
90+
},
91+
},
8192
],
82-
chromatic:{delay:300},
93+
chromatic:{
94+
diffThreshold:0.3,
95+
},
8396
},
8497
decorators:[
8598
(Story)=>(
8699
<AuthProvider>
87-
<Story/>
100+
<divstyle={{width:1170,height:880}}>
101+
<Story/>
102+
</div>
88103
</AuthProvider>
89104
),
90105
],

‎site/src/pages/WorkspacePage/WorkspaceTopbar.stories.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,11 @@ export const TemplateInfoPopover: Story = {
316316
);
317317
});
318318
},
319+
parameters:{
320+
chromatic:{
321+
diffThreshold:0.3,
322+
},
323+
},
319324
};
320325

321326
exportconstTemplateInfoPopoverWithoutDisplayName:Story={

‎site/src/utils/schedule.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,26 @@ export const autostopDisplay = (
148148
if(template.autostop_requirement&&template.allow_user_autostop){
149149
title=<HelpTooltipTitle>Autostop schedule</HelpTooltipTitle>;
150150
reason=(
151-
<>
151+
<spandata-chromatic="ignore">
152152
{" "}
153153
because this workspace has enabled autostop. You can disable autostop
154154
from this workspace&apos;s{" "}
155155
<Linkcomponent={RouterLink}to="settings/schedule">
156156
schedule settings
157157
</Link>
158158
.
159-
</>
159+
</span>
160160
);
161161
}
162162
return{
163163
message:`Stop${deadline.fromNow()}`,
164164
tooltip:(
165-
<>
165+
<spandata-chromatic="ignore">
166166
{title}
167167
This workspace will be stopped on{" "}
168168
{deadline.format("MMMM D [at] h:mm A")}
169169
{reason}
170-
</>
170+
</span>
171171
),
172172
danger:isShutdownSoon(workspace),
173173
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp