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

fix: use matching state in status list#18349

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
code-asher merged 1 commit intomainfromasher/fix-status-icon
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletionssite/src/pages/WorkspacePage/AppStatuses.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react";
import { userEvent, within } from "@storybook/test";
import type { WorkspaceAppStatus } from "api/typesGenerated";
import {
MockWorkspace,
Expand DownExpand Up@@ -82,6 +83,37 @@ export const SingleStatus: Story = {
},
};

export const MultipleStatuses: Story = {
args: {
agent: mockAgent([
{
...MockWorkspaceAppStatus,
id: "status-1",
icon: "",
message: "Initial setup complete.",
created_at: createTimestamp(5, 10), // 15:05:10 (after referenceDate)
uri: "",
state: "complete" as const,
},
{
...MockWorkspaceAppStatus,
id: "status-2",
icon: "",
message: "Working...",
created_at: createTimestamp(5, 0), // 15:05:00 (after referenceDate)
uri: "",
state: "working" as const,
},
]),
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const submitButton = canvas.getByRole("button");
await userEvent.click(submitButton);
await canvas.findByText(/working/i);
},
};

function mockAgent(statuses: WorkspaceAppStatus[]) {
return {
...MockWorkspaceAgent,
Expand Down
2 changes: 1 addition & 1 deletionsite/src/pages/WorkspacePage/AppStatuses.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -156,7 +156,7 @@ export const AppStatuses: FC<AppStatusesProps> = ({
<div className="flex items-center justify-between w-full text-content-secondary">
<span className="text-xs flex items-center gap-2">
<AppStatusStateIcon
state={latestStatus.state}
state={status.state}
latest={false}
className="size-icon-xs w-[18px]"
/>
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp