Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
bit-pm
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
燕伟桐
bit-pm
Commits
44048235
Unverified
提交
44048235
authored
6月 01, 2025
作者:
Will Chen
提交者:
GitHub
6月 01, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
undo e2e (#300)
上级
5c8cd05c
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
51 行增加
和
2 行删除
+51
-2
write-index-2.md
e2e-tests/fixtures/write-index-2.md
+15
-0
test_helper.ts
e2e-tests/helpers/test_helper.ts
+9
-1
undo.spec.ts
e2e-tests/undo.spec.ts
+25
-0
ChatInput.tsx
src/components/chat/ChatInput.tsx
+1
-0
HomeChatInput.tsx
src/components/chat/HomeChatInput.tsx
+1
-1
没有找到文件。
e2e-tests/fixtures/write-index-2.md
0 → 100644
浏览文件 @
44048235
OK, I'm going to do some writing now...
<dyad-write
path=
"src/pages/Index.tsx"
description=
"write-description"
>
const Index = () => {
return (
<div>
Testing:write-index(2)!
</div>
);
};
export default Index;
</dyad-write>
And it's done!
e2e-tests/helpers/test_helper.ts
浏览文件 @
44048235
...
...
@@ -73,10 +73,18 @@ class PageObject {
await
this
.
getRetryButton
().
click
();
}
async
clickUndo
()
{
await
this
.
getUndoButton
().
click
();
}
private
getRetryButton
()
{
return
this
.
page
.
getByRole
(
"button"
,
{
name
:
"Retry"
});
}
private
getUndoButton
()
{
return
this
.
page
.
getByRole
(
"button"
,
{
name
:
"Undo"
});
}
async
sendPrompt
(
prompt
:
string
)
{
await
this
.
page
.
getByRole
(
"textbox"
,
{
name
:
"Ask Dyad to build..."
})
...
...
@@ -84,7 +92,7 @@ class PageObject {
await
this
.
page
.
getByRole
(
"textbox"
,
{
name
:
"Ask Dyad to build..."
})
.
fill
(
prompt
);
await
this
.
page
.
getByRole
(
"button"
,
{
name
:
"S
tart new chat
"
}).
click
();
await
this
.
page
.
getByRole
(
"button"
,
{
name
:
"S
end message
"
}).
click
();
await
this
.
waitForChatCompletion
();
}
...
...
e2e-tests/undo.spec.ts
0 → 100644
浏览文件 @
44048235
import
{
test
}
from
"./helpers/test_helper"
;
import
{
expect
}
from
"@playwright/test"
;
test
(
"undo"
,
async
({
po
})
=>
{
await
po
.
setUp
({
autoApprove
:
true
});
await
po
.
sendPrompt
(
"tc=write-index"
);
await
po
.
sendPrompt
(
"tc=write-index-2"
);
const
iframe
=
po
.
getPreviewIframeElement
();
await
expect
(
iframe
.
contentFrame
().
getByText
(
"Testing:write-index(2)!"
),
).
toBeVisible
({
// This can be pretty slow because it's waiting for the app to build.
timeout
:
15
_000
,
});
await
po
.
clickUndo
();
await
expect
(
iframe
.
contentFrame
().
getByText
(
"Testing:write-index!"
),
).
toBeVisible
({
// Also, could be slow.
timeout
:
15
_000
,
});
});
src/components/chat/ChatInput.tsx
浏览文件 @
44048235
...
...
@@ -333,6 +333,7 @@ export function ChatInput({ chatId }: { chatId?: number }) {
onClick=
{
handleSubmit
}
disabled=
{
!
inputValue
.
trim
()
&&
attachments
.
length
===
0
}
className=
"px-2 py-2 mt-1 mr-2 hover:bg-(--background-darkest) text-(--sidebar-accent-fg) rounded-lg disabled:opacity-50"
title=
"Send message"
>
<
SendIcon
size=
{
20
}
/>
</
button
>
...
...
src/components/chat/HomeChatInput.tsx
浏览文件 @
44048235
...
...
@@ -139,7 +139,7 @@ export function HomeChatInput({
onClick=
{
handleCustomSubmit
}
disabled=
{
!
inputValue
.
trim
()
&&
attachments
.
length
===
0
}
className=
"px-2 py-2 mt-1 mr-2 hover:bg-(--background-darkest) text-(--sidebar-accent-fg) rounded-lg disabled:opacity-50"
title=
"S
tart new chat
"
title=
"S
end message
"
>
<
SendIcon
size=
{
20
}
/>
</
button
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论