Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
f18aa7ab
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6373
Star
108
Fork
184
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
24
列表
看板
标记
里程碑
合并请求
2
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
24
Issue
24
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f18aa7ab
编写于
3月 23, 2025
作者:
dcloud_wdl
浏览文件
操作
浏览文件
下载
差异文件
[转正] git merge origin/alpha
上级
ee171656
81fdc763
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
162 addition
and
12 deletion
+162
-12
changelog.md
changelog.md
+2
-2
manifest.json
manifest.json
+2
-2
package.json
package.json
+4
-4
pages/API/create-inner-audio-context/create-inner-audio-context.test.js
...te-inner-audio-context/create-inner-audio-context.test.js
+9
-2
pages/component/rich-text/rich-text-tags.test.js
pages/component/rich-text/rich-text-tags.test.js
+77
-0
pages/component/text/text-props.uvue
pages/component/text/text-props.uvue
+30
-1
pages/pages.test.js
pages/pages.test.js
+0
-1
pages/template/long-waterflow-nested/long-waterflow-nested.test.js
...plate/long-waterflow-nested/long-waterflow-nested.test.js
+38
-0
未找到文件。
changelog.md
浏览文件 @
f18aa7ab
## 1.0.
25
*
update 4.5
6.2025031210
## 1.0.
48
*
update 4.5
7.2025032014-alpha
manifest.json
浏览文件 @
f18aa7ab
...
...
@@ -2,8 +2,8 @@
"name"
:
"Hello uni-app x"
,
"appid"
:
"__UNI__HelloUniAppX"
,
"description"
:
""
,
"versionName"
:
"1.8.
5
"
,
"versionCode"
:
1080
5
,
"versionName"
:
"1.8.
6
"
,
"versionCode"
:
1080
6
,
"uni-app-x"
:
{},
"vueVersion"
:
"3"
,
/*
微信小程序平台配置
*/
...
...
package.json
浏览文件 @
f18aa7ab
{
"id"
:
"hello-uniapp-x"
,
"name"
:
"hello-uniapp-x"
,
"displayName"
:
"hello-uniapp-x"
,
"version"
:
"1.0.
25
"
,
"id"
:
"hello-uniapp-x
-alpha
"
,
"name"
:
"hello-uniapp-x
-alpha
"
,
"displayName"
:
"hello-uniapp-x
-alpha
"
,
"version"
:
"1.0.
48
"
,
"description"
:
"演示 uni-app x 框架的组件、接口、模板"
,
"scripts"
:
{
"check-commit"
:
"node ./git-hooks/check-commit.cjs"
...
...
pages/API/create-inner-audio-context/create-inner-audio-context.test.js
浏览文件 @
f18aa7ab
const
platformInfo
=
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
()
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isIos
=
platformInfo
.
startsWith
(
'
ios
'
)
const
isHarmony
=
platformInfo
.
startsWith
(
'
harmony
'
)
const
isSafari
=
platformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
inner-audio
'
,
()
=>
{
if
(
!
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
)))
{
it
(
'
app
'
,
()
=>
{
// TODO: safari 运行正常,测试时报错导致后续超时,暂时屏蔽
if
(
isMP
||
isIos
||
isSafari
)
{
it
(
'
not support
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
...
...
pages/component/rich-text/rich-text-tags.test.js
0 → 100644
浏览文件 @
f18aa7ab
const
platformInfo
=
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
()
const
isAndroid
=
platformInfo
.
startsWith
(
'
android
'
)
const
isIos
=
platformInfo
.
startsWith
(
'
ios
'
)
const
isApp
=
isAndroid
||
isIos
const
isWeb
=
platformInfo
.
startsWith
(
'
web
'
)
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isAppWebview
=
!!
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
let
pageIndex
=
0
const
pages
=
[
'
/pages/component/rich-text/rich-text-tags
'
]
let
page
;
let
windowInfo
async
function
getWindowInfo
()
{
const
windowInfoPage
=
await
program
.
reLaunch
(
'
/pages/API/get-window-info/get-window-info
'
)
await
windowInfoPage
.
waitFor
(
600
);
return
await
windowInfoPage
.
callMethod
(
'
jest_getWindowInfo
'
)
}
describe
(
"
page screenshot test
"
,
()
=>
{
if
(
platformInfo
.
indexOf
(
'
safari
'
)
!==
-
1
)
{
it
(
'
暂时规避 safari 截图测试
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
beforeAll
(
async
()
=>
{
console
.
log
(
"
page screenshot test start
"
);
});
beforeEach
(
async
()
=>
{
const
currentPagePath
=
pages
[
pageIndex
]
page
=
await
program
.
reLaunch
(
currentPagePath
);
});
afterEach
(()
=>
{
pageIndex
++
;
});
afterAll
(()
=>
{
console
.
log
(
"
page screenshot test finish
"
);
});
test
.
each
(
pages
)(
"
%s
"
,
async
()
=>
{
const
currentPagePath
=
pages
[
pageIndex
]
console
.
log
(
"
Taking screenshot:
"
,
pageIndex
,
currentPagePath
);
let
fullPage
=
true
;
const
screenshotParams
=
{
fullPage
}
if
(
!
fullPage
&&
!
isAppWebview
)
{
if
(
!
windowInfo
)
{
windowInfo
=
await
getWindowInfo
()
page
=
await
program
.
reLaunch
(
currentPagePath
);
}
let
offsetY
=
'
0
'
if
(
isAndroid
)
{
offsetY
=
`
${
windowInfo
.
statusBarHeight
+
44
}
`
}
if
(
isIos
)
{
offsetY
=
`
${
windowInfo
.
safeAreaInsets
.
top
+
44
}
`
}
screenshotParams
.
offsetY
=
offsetY
}
await
page
.
waitFor
(
2000
);
const
image
=
await
program
.
screenshot
(
screenshotParams
);
expect
(
image
).
toSaveImageSnapshot
({
customSnapshotIdentifier
()
{
return
`__pages_test__/
${
currentPagePath
.
replace
(
/
\/
/g
,
"
-
"
).
substring
(
1
)}
`
}
})
await
page
.
waitFor
(
800
);
});
});
pages/component/text/text-props.uvue
浏览文件 @
f18aa7ab
...
...
@@ -99,7 +99,17 @@
<text class="text-padding-border" style="width: 200px;">hello uni-app x</text>
<text class="text-padding-border" style="height: 100px;">hello uni-app x</text>
<text class="text-padding-border" style="width: 200px;height: 100px;">hello uni-app x</text>
</view>
</view>
<!-- #ifdef APP -->
<view class="uni-title">
<text class="uni-subtitle-text">点击事件测试</text>
</view>
<view class="text-box" style="flex-direction: row;">
<text class="text-icon" style="background-color: aqua;" @tap="iconTap">{{String.fromCharCode(parseInt('E650',16))}}</text>
<text class="text-icon" style="background-color: yellow;" @tap="iconTap2">{{String.fromCharCode(parseInt('EA08',16))}}</text>
</view>
<!-- #endif -->
<view v-if="autoTest">
<view class="uni-row">
...
...
@@ -167,6 +177,20 @@
content: 'App三级节点不继承二级的颜色',
showCancel: false
});
},
iconTap() {
uni.showModal({
title: '点击了',
content: '字体图标1',
showCancel: false
});
},
iconTap2() {
uni.showModal({
title: '点击了',
content: '字体图标2',
showCancel: false
});
},
// 自动化测试
setNestedText() {
...
...
@@ -215,5 +239,10 @@
padding: 20px;
border: 5px solid red;
text-align: center;
}
.text-icon {
font-family: uni-icon;
font-size: 100px;
}
</style>
pages/pages.test.js
浏览文件 @
f18aa7ab
...
...
@@ -41,7 +41,6 @@ const pages = [
// 单独测试例截图
// '/pages/component/text/text-props',
'
/pages/component/rich-text/rich-text
'
,
'
/pages/component/rich-text/rich-text-tags
'
,
'
/pages/component/rich-text/rich-text-complex
'
,
'
/pages/component/progress/progress
'
,
'
/pages/component/form/form
'
,
...
...
pages/template/long-waterflow-nested/long-waterflow-nested.test.js
0 → 100644
浏览文件 @
f18aa7ab
describe
(
'
long-waterflow-nested
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
mp
'
)
)
{
it
(
'
dummyTest
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
if
(
process
.
env
.
UNI_TEST_DEVICES_DIRECTION
==
'
landscape
'
)
{
it
(
'
跳过横屏模式
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
beforeAll
(
async
()
=>
{
//打开list-view测试页
page
=
await
program
.
reLaunch
(
'
/pages/template/long-waterflow-nested/long-waterflow-nested
'
)
await
page
.
waitFor
(
600
)
})
it
(
'
check_refresherabort
'
,
async
()
=>
{
//部分安卓设备需要延迟一段时间swipe才生效 此处暂时延迟1秒
await
page
.
waitFor
(
1000
);
// 仅App端支持手势下拉刷新
await
program
.
swipe
({
startPoint
:
{
x
:
100
,
y
:
300
},
endPoint
:
{
x
:
100
,
y
:
600
},
duration
:
100
})
await
page
.
waitFor
(
1500
)
});
})
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录