Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
1a14443e
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6006
Star
91
Fork
164
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1a14443e
编写于
4月 02, 2024
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 调整截图移除导航栏,适配跨平台对比
上级
c60213fc
变更
16
显示空白变更内容
内联
并排
Showing
16 changed file
with
26 addition
and
26 deletion
+26
-26
pages/API/get-element-by-id/get-element-by-id-multiple-root-node.test.js
...lement-by-id/get-element-by-id-multiple-root-node.test.js
+1
-1
pages/API/get-element-by-id/get-element-by-id.test.js
pages/API/get-element-by-id/get-element-by-id.test.js
+1
-1
pages/API/load-font-face/load-font-face.test.js
pages/API/load-font-face/load-font-face.test.js
+2
-2
pages/API/navigator/new-page/onLoad.test.js
pages/API/navigator/new-page/onLoad.test.js
+1
-1
pages/CSS/background/background-image.test.js
pages/CSS/background/background-image.test.js
+2
-2
pages/component/general-attribute/general-attribute.test.js
pages/component/general-attribute/general-attribute.test.js
+2
-2
pages/component/list-view/list-view-multiplex.test.js
pages/component/list-view/list-view-multiplex.test.js
+2
-2
pages/component/list-view/list-view-refresh.test.js
pages/component/list-view/list-view-refresh.test.js
+1
-1
pages/component/nested-scroll-body/nested-scroll-body.test.js
...s/component/nested-scroll-body/nested-scroll-body.test.js
+1
-1
pages/component/nested-scroll-header/nested-scroll-header.test.js
...mponent/nested-scroll-header/nested-scroll-header.test.js
+1
-1
pages/component/scroll-view/scroll-view-props.test.js
pages/component/scroll-view/scroll-view-props.test.js
+1
-1
pages/component/scroll-view/scroll-view-refresher.test.js
pages/component/scroll-view/scroll-view-refresher.test.js
+1
-1
pages/component/scroll-view/scroll-view.test.js
pages/component/scroll-view/scroll-view.test.js
+1
-1
pages/component/sticky-header/sticky-header.test.js
pages/component/sticky-header/sticky-header.test.js
+1
-1
pages/component/sticky-section/sticky-section.test.js
pages/component/sticky-section/sticky-section.test.js
+2
-2
pages/toSaveSnapshot-toSaveImageSnapshot-template.test1.js
pages/toSaveSnapshot-toSaveImageSnapshot-template.test1.js
+6
-6
未找到文件。
pages/API/get-element-by-id/get-element-by-id-multiple-root-node.test.js
浏览文件 @
1a14443e
...
...
@@ -16,7 +16,7 @@ describe("getElementByIdForMultipleRootNode", () => {
await
page
.
callMethod
(
"
changeTextColor
"
);
await
page
.
callMethod
(
"
changeViewStyle
"
);
await
page
.
waitFor
(
500
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
});
pages/API/get-element-by-id/get-element-by-id.test.js
浏览文件 @
1a14443e
...
...
@@ -15,7 +15,7 @@ describe("getElementById", () => {
await
page
.
callMethod
(
"
changeTextColor
"
);
await
page
.
callMethod
(
"
changeViewStyle
"
);
await
page
.
waitFor
(
500
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
});
pages/API/load-font-face/load-font-face.test.js
浏览文件 @
1a14443e
...
...
@@ -7,13 +7,13 @@ describe("loadFontFace", () => {
await
page
.
waitFor
(
4000
);
});
it
(
"
parent screenshot
"
,
async
()
=>
{
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
it
(
"
child screenshot
"
,
async
()
=>
{
const
page
=
await
program
.
navigateTo
(
CHILD_PAGE_PATH
);
await
page
.
waitFor
(
3000
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
});
pages/API/navigator/new-page/onLoad.test.js
浏览文件 @
1a14443e
...
...
@@ -10,7 +10,7 @@ describe("onLoad", () => {
await
page
.
waitFor
(
'
view
'
);
await
page
.
callMethod
(
"
navigateToOnLoadWithType
"
,
"
adjustData
"
);
await
page
.
waitFor
(
1000
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
it
(
"
navigateTo
"
,
async
()
=>
{
...
...
pages/CSS/background/background-image.test.js
浏览文件 @
1a14443e
...
...
@@ -8,14 +8,14 @@ describe('background-image-test', () => {
it
(
'
background-image-screenshot
'
,
async
()
=>
{
await
page
.
waitFor
(
300
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
it
(
'
background-image-select
'
,
async
()
=>
{
await
page
.
callMethod
(
'
updateBackgroundSelect
'
)
await
page
.
waitFor
(
300
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
});
pages/component/general-attribute/general-attribute.test.js
浏览文件 @
1a14443e
...
...
@@ -8,7 +8,7 @@ describe('general attribute', () => {
await
page
.
waitFor
(
'
view
'
)
})
it
(
"
class & style
"
,
async
()
=>
{
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
it
(
'
validateGeneralAttributes
'
,
async
()
=>
{
...
...
@@ -21,7 +21,7 @@ describe('general attribute', () => {
const
button
=
await
page
.
$
(
"
.btn-ref
"
);
await
button
.
tap
();
await
page
.
waitFor
(
500
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
})
pages/component/list-view/list-view-multiplex.test.js
浏览文件 @
1a14443e
...
...
@@ -20,7 +20,7 @@ describe('component-native-list-view', () => {
return
await
page
.
data
(
'
list_show
'
)
===
true
;
});
await
page
.
waitFor
(
200
)
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
...
...
@@ -31,7 +31,7 @@ describe('component-native-list-view', () => {
return
await
page
.
data
(
'
displayArrow
'
)
===
true
;
});
await
page
.
waitFor
(
600
)
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
})
pages/component/list-view/list-view-refresh.test.js
浏览文件 @
1a14443e
...
...
@@ -18,7 +18,7 @@ describe('component-native-list-view-refresh', () => {
});
//等待下拉刷新结束
await
page
.
waitFor
(
500
)
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
})
pages/component/nested-scroll-body/nested-scroll-body.test.js
浏览文件 @
1a14443e
...
...
@@ -17,7 +17,7 @@ describe('component-native-nested-scroll-body', () => {
it
(
'
check_scroll_into_view_left
'
,
async
()
=>
{
await
page
.
callMethod
(
'
testBodyScrollBy
'
,
400
)
await
page
.
waitFor
(
300
)
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
})
pages/component/nested-scroll-header/nested-scroll-header.test.js
浏览文件 @
1a14443e
...
...
@@ -15,7 +15,7 @@ describe('component-native-nested-scroll-header', () => {
it
(
'
check_nested-scroll-header
'
,
async
()
=>
{
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
})
pages/component/scroll-view/scroll-view-props.test.js
浏览文件 @
1a14443e
...
...
@@ -89,7 +89,7 @@ describe('component-native-scroll-view-props', () => {
showScrollbar
:
false
})
await
page
.
waitFor
(
300
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
...
...
pages/component/scroll-view/scroll-view-refresher.test.js
浏览文件 @
1a14443e
...
...
@@ -14,7 +14,7 @@ describe('component-native-scroll-view-refresher', () => {
showScrollbar
:
false
})
await
page
.
waitFor
(
300
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
...
...
pages/component/scroll-view/scroll-view.test.js
浏览文件 @
1a14443e
...
...
@@ -12,7 +12,7 @@ describe('component-native-scroll-view', () => {
showScrollbar
:
false
})
await
page
.
waitFor
(
300
);
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
});
});
pages/component/sticky-header/sticky-header.test.js
浏览文件 @
1a14443e
...
...
@@ -8,7 +8,7 @@ describe('component-native-sticky-header', () => {
//检测吸顶效果
it
(
'
check_sticky_header
'
,
async
()
=>
{
await
page
.
callMethod
(
'
confirm_scroll_top_input
'
,
600
)
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
})
pages/component/sticky-section/sticky-section.test.js
浏览文件 @
1a14443e
...
...
@@ -8,7 +8,7 @@ describe('component-native-sticky-section', () => {
//检测吸顶上推效果
it
(
'
check_sticky_section
'
,
async
()
=>
{
await
page
.
callMethod
(
'
listViewScrollByY
'
,
1000
)
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
...
...
@@ -30,7 +30,7 @@ describe('component-native-sticky-section', () => {
await
page
.
waitFor
(
async
()
=>
{
return
await
page
.
data
(
'
scrolling
'
)
===
false
;
});
const
image
=
await
program
.
screenshot
();
const
image
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
image
).
toSaveImageSnapshot
();
})
})
pages/toSaveSnapshot-toSaveImageSnapshot-template.test1.js
浏览文件 @
1a14443e
...
...
@@ -29,15 +29,15 @@ describe('toSaveSnapshot & toSaveImageSnapshot template', () => {
})
it
(
'
test toSaveImageSnapshot 1
'
,
async
()
=>
{
const
img1
=
await
program
.
screenshot
();
const
img1
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
img1
).
toSaveImageSnapshot
()
const
img2
=
await
program
.
screenshot
();
const
img2
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
img2
).
toSaveImageSnapshot
()
})
it
(
'
test toSaveImageSnapshot 2
'
,
async
()
=>
{
const
img1
=
await
program
.
screenshot
();
const
img1
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
img1
).
toSaveImageSnapshot
({
customSnapshotsDir
:
'
./customDir/__image_snapshots__
'
,
customSnapshotIdentifier
()
{
...
...
@@ -45,12 +45,12 @@ describe('toSaveSnapshot & toSaveImageSnapshot template', () => {
},
})
const
img2
=
await
program
.
screenshot
();
const
img2
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
img2
).
toSaveImageSnapshot
({
customSnapshotsDir
:
'
./customDir/__image_snapshots__
'
,
})
const
img3
=
await
program
.
screenshot
();
const
img3
=
await
program
.
screenshot
(
{
fullPage
:
true
}
);
expect
(
img3
).
toSaveImageSnapshot
({
customSnapshotIdentifier
()
{
return
'
test-toSaveImageSnapshot-2-3
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录