Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
bit-pm
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
燕伟桐
bit-pm
Commits
ada1542e
Unverified
提交
ada1542e
authored
6月 02, 2025
作者:
Will Chen
提交者:
GitHub
6月 02, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
create next.js e2e test (#305)
上级
25195d09
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
60 行增加
和
1 行删除
+60
-1
edit-made-with-dyad.md
e2e-tests/fixtures/edit-made-with-dyad.md
+16
-0
test_helper.ts
e2e-tests/helpers/test_helper.ts
+12
-0
template-create-nextjs.spec.ts_create-next-js-app-1.aria.yml
...plate-create-nextjs.spec.ts_create-next-js-app-1.aria.yml
+11
-0
template-create-nextjs.spec.ts
e2e-tests/template-create-nextjs.spec.ts
+20
-0
playwright.config.ts
playwright.config.ts
+1
-1
没有找到文件。
e2e-tests/fixtures/edit-made-with-dyad.md
0 → 100644
浏览文件 @
ada1542e
<dyad-write
path=
"src/components/made-with-dyad.tsx"
description=
"write-description"
>
export const MadeWithDyad = () => {
return (
<div
className=
"p-4 text-center"
>
<a
href="https://www.dyad.sh/"
target="_blank"
rel="noopener noreferrer"
className="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
>
Made with Dyad (EDITED)
</a>
</div>
);
};
</dyad-write>
e2e-tests/helpers/test_helper.ts
浏览文件 @
ada1542e
...
...
@@ -50,6 +50,10 @@ class PageObject {
await
this
.
page
.
getByTestId
(
"reject-proposal-button"
).
click
();
}
async
clickRestart
()
{
await
this
.
page
.
getByRole
(
"button"
,
{
name
:
"Restart"
}).
click
();
}
getPreviewIframeElement
()
{
return
this
.
page
.
getByTestId
(
"preview-iframe-element"
);
}
...
...
@@ -196,6 +200,14 @@ class PageObject {
await
this
.
page
.
getByRole
(
"link"
,
{
name
:
"Apps"
}).
click
();
}
async
goToHubTab
()
{
await
this
.
page
.
getByRole
(
"link"
,
{
name
:
"Hub"
}).
click
();
}
async
selectTemplate
(
templateName
:
string
)
{
await
this
.
page
.
getByRole
(
"img"
,
{
name
:
templateName
}).
click
();
}
////////////////////////////////
// Toast assertions
////////////////////////////////
...
...
e2e-tests/snapshots/template-create-nextjs.spec.ts_create-next-js-app-1.aria.yml
0 → 100644
浏览文件 @
ada1542e
-
main
:
-
heading "Blank page" [level=1]
-
link "Made with Dyad (EDITED)"
:
-
/url
:
https://www.dyad.sh/
-
status
:
-
img
-
text
:
Static route
-
button "Hide static indicator"
:
-
img
-
alert
\ No newline at end of file
e2e-tests/template-create-nextjs.spec.ts
0 → 100644
浏览文件 @
ada1542e
import
{
test
}
from
"./helpers/test_helper"
;
import
{
expect
}
from
"@playwright/test"
;
test
(
"create next.js app"
,
async
({
po
})
=>
{
await
po
.
setUp
();
// Select Next.js template
await
po
.
goToHubTab
();
await
po
.
selectTemplate
(
"Next.js Template"
);
await
po
.
goToAppsTab
();
// Create an app
await
po
.
sendPrompt
(
"tc=edit-made-with-dyad"
);
await
po
.
approveProposal
();
await
po
.
clickRestart
();
// This can be pretty slow because it's waiting for the app to build.
await
expect
(
po
.
getPreviewIframeElement
()).
toBeVisible
({
timeout
:
25
_000
});
await
po
.
snapshotPreview
();
});
playwright.config.ts
浏览文件 @
ada1542e
...
...
@@ -5,7 +5,7 @@ const config: PlaywrightTestConfig = {
workers
:
1
,
retries
:
process
.
env
.
CI
?
1
:
0
,
// maxFailures: 1,
timeout
:
process
.
env
.
CI
?
60
_000
:
15
_000
,
timeout
:
process
.
env
.
CI
?
60
_000
:
30
_000
,
// Use a custom snapshot path template because Playwright's default
// is platform-specific which isn't necessary for Dyad e2e tests
// which should be platform agnostic (we don't do screenshots; only textual diffs).
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论