提交 fc6f8b8e 编写于 作者: A Anne_LXM

Merge branch 'dev' of https://gitcode.net/dcloud/hello-uni-app-x into dev

......@@ -12,7 +12,7 @@
style="width: 50px; height: 50px; background-color: red"
></view>
<view class="common" style="position: relative">
<text>relative</text>
<text class="text">relative</text>
</view>
<view
style="width: 50px; height: 50px; background-color: blue"
......@@ -47,7 +47,7 @@
style="width: 50px; height: 50px; background-color: red"
></view>
<view class="common" style="position: absolute">
<text>absolute</text>
<text class="text">absolute</text>
</view>
<view
style="width: 50px; height: 50px; background-color: blue"
......@@ -82,7 +82,7 @@
style="width: 50px; height: 50px; background-color: red"
></view>
<view class="common fixed" style="position: fixed">
<text>fixed</text>
<text class="text">fixed</text>
</view>
<view
style="width: 50px; height: 50px; background-color: blue"
......@@ -131,4 +131,8 @@
/* #endif */
}
.text {
white-space: nowrap;
width: 100%;
}
</style>
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('component-native-scroll-view', () => {
describe('component-native-scroll-view-props', () => {
let page;
beforeAll(async () => {
......@@ -82,4 +82,15 @@ describe('component-native-scroll-view', () => {
expect(scrollLeft-930).toBeGreaterThanOrEqual(0)
})
//截图对比
it('scroll-view-props-screenshot', async () => {
//禁止滚动条
await page.setData({
showScrollbar: false
})
await page.waitFor(300);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
})
});
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('test title', () => {
describe('component-native-scroll-view-refresher', () => {
if (process.env.uniTestPlatformInfo.startsWith('android')) {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/component/scroll-view/scroll-view-refresher');
await page.waitFor(300);
});
it('scroll-view-refresher-screenshot', async () => {
//禁止滚动条
await page.setData({
showScrollbar: false
})
await page.waitFor(300);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
})
it('check_refresher', async () => {
await page.setData({
......
......@@ -3,7 +3,7 @@
<page-head title="scroll-view 下拉刷新"></page-head>
<scroll-view class="scroll" refresher-enabled=true :refresher-triggered="refresherTriggered"
@refresherrefresh="onRefresherrefresh" @refresherabort="onRefresherabort" @refresherrestore="onRefresherrestore"
@refresherpulling="onRefresherpulling" @scrolltolower="onScrolltolower">
@refresherpulling="onRefresherpulling" @scrolltolower="onScrolltolower" :show-scrollbar="showScrollbar">
<view v-for="key in scrollData" :key="key">
<view class="scroll-item">
<text class="scroll-item-title">{{key}}</text>
......@@ -18,7 +18,8 @@
return {
scrollData: [] as Array<string>,
refresherTriggered: false,
refresherrefresh: false
refresherrefresh: false,
showScrollbar: true
};
},
onLoad() {
......
describe('component-native-scroll-view', () => {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/component/scroll-view/scroll-view');
await page.waitFor(300);
});
it('scroll-view-screenshot', async () => {
//禁止滚动条
await page.setData({
showScrollbar: false
})
await page.waitFor(300);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
});
});
......@@ -11,7 +11,7 @@
</view>
<view>
<scroll-view :scroll-top="scrollTop" direction="vertical" class="scroll-Y" scroll-with-animation="true"
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll">
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" :show-scrollbar="showScrollbar">
<view class="scroll-view-item uni-bg-red"><text class="text">A</text></view>
<view class="scroll-view-item uni-bg-green"><text class="text">B</text></view>
<view class="scroll-view-item uni-bg-blue"><text class="text">C</text></view>
......@@ -26,7 +26,7 @@
<text class="uni-subtitle-text">横向滚动</text>
</view>
<view>
<scroll-view class="scroll-view_H" direction="horizontal" @scroll="scroll" :scroll-left="120">
<scroll-view class="scroll-view_H" direction="horizontal" @scroll="scroll" :scroll-left="120" :show-scrollbar="showScrollbar">
<view class="scroll-view-item_H uni-bg-red"><text class="text">A</text></view>
<view class="scroll-view-item_H uni-bg-green"><text class="text">B</text></view>
<view class="scroll-view-item_H uni-bg-blue"><text class="text">C</text></view>
......@@ -70,6 +70,7 @@
return {
scrollTop: 0,
oldScrollTop: 0,
showScrollbar: true
}
},
methods: {
......
......@@ -22,10 +22,7 @@ const pages = [
'/pages/component/rich-text/rich-text-tags',
'/pages/component/rich-text/rich-text',
'/pages/component/scroll-view/scroll-view-custom-refresher-props',
'/pages/component/scroll-view/scroll-view-props',
'/pages/component/scroll-view/scroll-view-refresher-props',
'/pages/component/scroll-view/scroll-view-refresher',
'/pages/component/scroll-view/scroll-view',
'/pages/component/slider/slider',
'/pages/component/slider-100/slider-100',
'/pages/component/swiper/swiper',
......
......@@ -246,7 +246,7 @@
.debug-info {
position: fixed;
top: 15px;
width: 375px;
width: 100%;
background-color: rgba(255, 255, 255, 0.3);
}
......
......@@ -67,8 +67,6 @@ const pages = [
"pages/API/get-system-info/get-system-info",
"pages/API/get-device-info/get-device-info",
"pages/API/get-app-base-info/get-app-base-info",
"pages/API/get-system-setting/get-system-setting",
"pages/API/get-app-authorize-setting/get-app-authorize-setting",
"pages/API/preview-image/preview-image",
"pages/API/save-image-to-photos-album/save-image-to-photos-album",
"pages/API/choose-image/choose-image",
......@@ -195,7 +193,9 @@ const pages = [
// "pages/API/install-apk/install-apk",
// "pages/template/scroll-sticky/scroll-sticky",
// "pages/API/exit/exit",
// "pages/API/element-takesnapshot/element-takesnapshot",
// "pages/API/element-takesnapshot/element-takesnapshot",
// "pages/API/get-system-setting/get-system-setting",
// "pages/API/get-app-authorize-setting/get-app-authorize-setting",
// 仅 web
// pages/template/browser-canvas/browser-canvas
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册