Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
14993a69
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6132
Star
98
Fork
169
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
14993a69
编写于
3月 29, 2024
作者:
W
wangjinxin613
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: ios 截图不截图状态栏部分
上级
a5b06f8a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
40 addition
and
40 deletion
+40
-40
pages/API/action-sheet/action-sheet.test.js
pages/API/action-sheet/action-sheet.test.js
+14
-14
pages/API/modal/modal.test.js
pages/API/modal/modal.test.js
+19
-19
pages/API/toast/toast.test.js
pages/API/toast/toast.test.js
+7
-7
未找到文件。
pages/API/action-sheet/action-sheet.test.js
浏览文件 @
14993a69
...
...
@@ -3,7 +3,7 @@
describe
(
'
API-loading
'
,
()
=>
{
let
page
;
const
isA
ndroid
=
process
.
env
.
UNI_OS_NAME
===
"
android
"
;
const
isA
pp
=
process
.
env
.
UNI_OS_NAME
===
"
android
"
||
process
.
env
.
UNI_OS_NAME
===
"
ios
"
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/API/action-sheet/action-sheet
'
)
...
...
@@ -12,7 +12,7 @@ describe('API-loading', () => {
it
(
"
onload-action-sheet-test
"
,
async
()
=>
{
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
await
page
.
waitFor
(
500
);
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
...
...
@@ -57,7 +57,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -99,7 +99,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -140,7 +140,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -181,7 +181,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -222,7 +222,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -266,7 +266,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -307,7 +307,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -348,7 +348,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -389,7 +389,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -431,7 +431,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -472,7 +472,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
@@ -513,7 +513,7 @@ describe('API-loading', () => {
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
image
=
await
program
.
screenshot
({
deviceShot
:
true
,
area
:
{
...
...
pages/API/modal/modal.test.js
浏览文件 @
14993a69
...
...
@@ -3,7 +3,7 @@
describe
(
'
API-loading
'
,
()
=>
{
let
page
;
const
isA
ndroid
=
process
.
env
.
UNI_OS_NAME
===
"
android
"
;
const
isA
pp
=
process
.
env
.
UNI_OS_NAME
===
"
android
"
||
process
.
env
.
UNI_OS_NAME
===
"
ios
"
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/API/modal/modal
'
)
...
...
@@ -13,7 +13,7 @@ describe('API-loading', () => {
it
(
"
onload-modal-test
"
,
async
()
=>
{
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
await
page
.
waitFor
(
500
);
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
...
...
@@ -54,7 +54,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -95,7 +95,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -136,7 +136,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -177,7 +177,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -218,7 +218,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -258,7 +258,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -298,7 +298,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -338,7 +338,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -378,7 +378,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -419,7 +419,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -460,7 +460,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -501,7 +501,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -542,7 +542,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -583,7 +583,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -625,7 +625,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -665,7 +665,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -706,7 +706,7 @@ describe('API-loading', () => {
await
btnModalButton
.
tap
()
await
page
.
waitFor
(
500
);
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
pages/API/toast/toast.test.js
浏览文件 @
14993a69
...
...
@@ -3,7 +3,7 @@
describe
(
'
API-toast
'
,
()
=>
{
let
page
;
const
isA
ndroid
=
process
.
env
.
UNI_OS_NAME
===
"
android
"
;
const
isA
pp
=
process
.
env
.
UNI_OS_NAME
===
"
android
"
||
process
.
env
.
UNI_OS_NAME
===
"
ios
"
;
beforeAll
(
async
()
=>
{
...
...
@@ -16,7 +16,7 @@ describe('API-toast', () => {
it
(
"
onload-toast-test
"
,
async
()
=>
{
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
await
page
.
waitFor
(
500
);
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
...
...
@@ -47,7 +47,7 @@ describe('API-toast', () => {
const
btnToastDefaultButton
=
await
page
.
$
(
'
#btn-toast-default
'
)
await
btnToastDefaultButton
.
tap
()
await
page
.
waitFor
(
200
)
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
...
...
@@ -78,7 +78,7 @@ describe('API-toast', () => {
const
btnToastDurationButton
=
await
page
.
$
(
'
#btn-toast-duration
'
)
await
btnToastDurationButton
.
tap
()
await
page
.
waitFor
(
2000
)
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -105,7 +105,7 @@ describe('API-toast', () => {
const
btnToastErrorIconButton
=
await
page
.
$
(
'
#btn-toast-errorIcon
'
)
await
btnToastErrorIconButton
.
tap
()
await
page
.
waitFor
(
200
)
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -138,7 +138,7 @@ describe('API-toast', () => {
await
btnToastHideButton
.
tap
()
await
page
.
waitFor
(
1000
)
if
(
isA
ndroid
)
{
if
(
isA
pp
)
{
const
res
=
await
page
.
callMethod
(
'
jest_getWindowInfo
'
)
const
windowHeight
=
res
.
windowHeight
*
res
.
pixelRatio
;
const
windowWidth
=
res
.
windowWidth
*
res
.
pixelRatio
;
...
...
@@ -166,7 +166,7 @@ describe('API-toast', () => {
// const btnToastButton = await page.$('#btn-toast-postion-bottom')
// await btnToastButton.tap()
// await page.waitFor(200)
// if (isA
ndroid
) {
// if (isA
pp
) {
// const windowHeight = uni.getWindowInfo().windowHeight;
// const windowWidth = uni.getWindowInfo().windowWidth;
// const image = await program.screenshot({
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录