提交 f18aa7ab 编写于 作者: dcloud_wdl's avatar dcloud_wdl

[转正] git merge origin/alpha

## 1.0.25
* update 4.56.2025031210
## 1.0.48
* update 4.57.2025032014-alpha
......@@ -2,8 +2,8 @@
"name" : "Hello uni-app x",
"appid" : "__UNI__HelloUniAppX",
"description" : "",
"versionName" : "1.8.5",
"versionCode" : 10805,
"versionName" : "1.8.6",
"versionCode" : 10806,
"uni-app-x" : {},
"vueVersion" : "3",
/* 微信小程序平台配置 */
......
{
"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"
......
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
......
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);
});
});
......@@ -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>
......@@ -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',
......
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.
先完成此消息的编辑!
想要评论请 注册