Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
2bb3d33e
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6005
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看板
提交
2bb3d33e
编写于
3月 14, 2024
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: android 端测试例规避 app-webview 模式
上级
022544f6
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
68 addition
and
68 deletion
+68
-68
pages/API/download-file/download-file.test.js
pages/API/download-file/download-file.test.js
+2
-2
pages/API/navigator/new-page/onLoad.test.js
pages/API/navigator/new-page/onLoad.test.js
+3
-3
pages/API/request/request.test.js
pages/API/request/request.test.js
+5
-5
pages/API/upload-file/upload-file.test.js
pages/API/upload-file/upload-file.test.js
+9
-9
pages/CSS/overflow/overflow.test.js
pages/CSS/overflow/overflow.test.js
+7
-7
pages/component/general-event/general-event.test.js
pages/component/general-event/general-event.test.js
+3
-3
pages/component/image/image.test.js
pages/component/image/image.test.js
+1
-1
pages/component/scroll-view/scroll-view-refresher.test.js
pages/component/scroll-view/scroll-view-refresher.test.js
+11
-11
pages/component/sticky-section/sticky-section.test.js
pages/component/sticky-section/sticky-section.test.js
+2
-2
pages/component/web-view-local/web-view-local.test.js
pages/component/web-view-local/web-view-local.test.js
+1
-1
pages/component/web-view/web-view.test.js
pages/component/web-view/web-view.test.js
+1
-1
pages/pages.test.js
pages/pages.test.js
+16
-16
pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js
...reenshot-comparison/webview-screenshot-comparison.test.js
+4
-4
pages/webview-screenshot/webview-screenshot.test.js
pages/webview-screenshot/webview-screenshot.test.js
+3
-3
未找到文件。
pages/API/download-file/download-file.test.js
浏览文件 @
2bb3d33e
...
...
@@ -23,7 +23,7 @@ describe('ExtApi-DownloadFile', () => {
});
let
shouldTestCookie
=
false
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
parseInt
(
version
.
split
(
"
"
)[
1
])
shouldTestCookie
=
version
>
9
...
...
pages/API/navigator/new-page/onLoad.test.js
浏览文件 @
2bb3d33e
...
...
@@ -22,7 +22,7 @@ describe("onLoad", () => {
expect
(
page
.
path
).
toBe
(
TARGET_PAGE_PATH
.
substring
(
1
));
});
it
(
"
navigateBack
"
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
page
=
await
program
.
reLaunch
(
INTERMEDIATE_PAGE_PATH
);
await
page
.
waitFor
(
'
view
'
);
await
page
.
callMethod
(
"
navigateToOnLoadWithType
"
,
"
navigateBack
"
);
...
...
pages/API/request/request.test.js
浏览文件 @
2bb3d33e
...
...
@@ -86,7 +86,7 @@ describe('ExtApi-Request', () => {
});
let
shouldTestCookie
=
false
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
parseInt
(
version
.
split
(
"
"
)[
1
])
shouldTestCookie
=
version
>
9
...
...
pages/API/upload-file/upload-file.test.js
浏览文件 @
2bb3d33e
...
...
@@ -37,7 +37,7 @@ describe('ExtApi-UploadFile', () => {
});
let
shouldTestCookie
=
false
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
parseInt
(
version
.
split
(
"
"
)[
1
])
shouldTestCookie
=
version
>
9
...
...
pages/CSS/overflow/overflow.test.js
浏览文件 @
2bb3d33e
...
...
@@ -8,7 +8,7 @@ describe('component-native-overflow', () => {
//检测overflow设置hidden,visible
it
(
'
check_view_overflow
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
parseInt
(
version
.
split
(
"
"
)[
1
])
//安卓7模拟器不截图 导致闪退
...
...
pages/component/general-event/general-event.test.js
浏览文件 @
2bb3d33e
...
...
@@ -10,7 +10,7 @@ describe('event trigger sequence', () => {
})
it
(
'
touch
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
await
el
.
touchstart
({
touches
:
[{
identifier
:
1
,
...
...
@@ -56,7 +56,7 @@ describe('event trigger sequence', () => {
})
it
(
'
longPress
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
await
el
.
longpress
()
const
data
=
await
page
.
data
()
expect
(
data
.
onLongPressTime
).
toBeGreaterThan
(
0
)
...
...
pages/component/image/image.test.js
浏览文件 @
2bb3d33e
...
...
@@ -30,7 +30,7 @@ describe('component-native-image', () => {
expect
(
await
page
.
data
(
'
loadError
'
)).
toBe
(
true
)
})
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
it
(
'
check-cookie
'
,
async
()
=>
{
await
page
.
setData
({
autoTest
:
true
,
...
...
pages/component/scroll-view/scroll-view-refresher.test.js
浏览文件 @
2bb3d33e
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe
(
'
component-native-scroll-view-refresher
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
page
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/component/scroll-view/scroll-view-refresher
'
);
...
...
pages/component/sticky-section/sticky-section.test.js
浏览文件 @
2bb3d33e
...
...
@@ -19,7 +19,7 @@ describe('component-native-sticky-section', () => {
await
page
.
setData
({
scrolling
:
'
true
'
})
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
//跳转到id为C的StickyHeader位置
await
page
.
callMethod
(
'
gotoStickyHeader
'
,
'
C
'
)
}
...
...
pages/component/web-view-local/web-view-local.test.js
浏览文件 @
2bb3d33e
...
...
@@ -12,7 +12,7 @@ describe('component-native-web-view', () => {
});
it
(
'
screenshot
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
await
page
.
waitFor
(
async
()
=>
{
return
await
page
.
data
(
'
loadFinish
'
)
===
true
;
});
...
...
pages/component/web-view/web-view.test.js
浏览文件 @
2bb3d33e
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe
(
'
component-native-web-view
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
page
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/component/web-view/web-view
'
);
...
...
pages/pages.test.js
浏览文件 @
2bb3d33e
...
...
@@ -121,7 +121,7 @@ const pages = [
// '/pages/API/element-draw/element-draw',
]
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
)
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
// 规避 web 端不支持页面
pages
.
push
(
"
/pages/component/list-view/list-view
"
,
...
...
pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js
浏览文件 @
2bb3d33e
...
...
@@ -237,7 +237,7 @@ const PAGE_PATH =
describe
(
"
shot-compare
"
,
()
=>
{
let
shouldCompareScreenShot
=
false
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
parseInt
(
version
.
split
(
"
"
)[
1
])
shouldCompareScreenShot
=
version
>
9
...
...
pages/webview-screenshot/webview-screenshot.test.js
浏览文件 @
2bb3d33e
...
...
@@ -236,7 +236,7 @@ const PAGE_PATH =
describe
(
"
shot-compare
"
,
()
=>
{
let
shouldCompareScreenShot
=
false
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)
&&
!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
)
{
let
version
=
process
.
env
.
uniTestPlatformInfo
version
=
parseInt
(
version
.
split
(
"
"
)[
1
])
shouldCompareScreenShot
=
version
>
9
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录