diff --git a/App.uvue b/App.uvue
index f1aa02c9c53bb99869e5ec15c6dae670e0715d63..5fe1721404f70b02f6b293e636537653d91dac62 100644
--- a/App.uvue
+++ b/App.uvue
@@ -63,5 +63,8 @@
diff --git a/components/input-data/input-data.vue b/components/input-data/input-data.vue
index d650aa6e270c4ad73b4f4dac5f4441450fae4cf1..74b8baa6cbbf12724e1880f5c53217f560bb6a28 100644
--- a/components/input-data/input-data.vue
+++ b/components/input-data/input-data.vue
@@ -81,7 +81,7 @@
{{title}}
-
+
@@ -90,20 +90,15 @@
+
diff --git a/pages/API/get-app-base-info/get-app-base-info.test.js b/pages/API/get-app-base-info/get-app-base-info.test.js
index 4c61b7bfafed7d025d8eae7c882c4c567bb34d49..0ff7c3c585ff3778b09f02d6c897b63214dd60c9 100644
--- a/pages/API/get-app-base-info/get-app-base-info.test.js
+++ b/pages/API/get-app-base-info/get-app-base-info.test.js
@@ -6,11 +6,14 @@ describe('ExtApi-GetAppBaseInfo', () => {
let res;
const stringProperties = [
'appId', 'appName', 'appVersion', 'appVersionCode', 'appLanguage',
- 'language', 'version', 'uniCompileVersion', 'uniPlatform', 'uniRuntimeVersion',
+ 'language', 'uniCompileVersion', 'uniPlatform', 'uniRuntimeVersion',
]
const numberProperties = [
'uniCompileVersionCode', 'uniRuntimeVersionCode'
- ]
+ ]
+ if (process.env.uniTestPlatformInfo.indexOf('web') === -1) {
+ stringProperties.push('version')
+ }
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(600);
diff --git a/pages/API/get-app/get-app.uvue b/pages/API/get-app/get-app.uvue
index aaf5fa1a0c171c6aac82ea71ca282a6b9e12e2c9..c2ba5462533d30631e96499d7b57e706209fa7d0 100644
--- a/pages/API/get-app/get-app.uvue
+++ b/pages/API/get-app/get-app.uvue
@@ -1,52 +1,52 @@
-
-
-
-
-
-
-
- 点击按钮调用 App.uvue methods
- increasetLifeCycleNum 方法
-
- lifeCycleNum: {{ lifeCycleNum }}
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue b/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue
index bbce9555e98c17beb16923fddca8e4fcb501a4fc..f1e84cc80a2c165413308d8a9d93132ac95832a6 100644
--- a/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue
+++ b/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue
@@ -23,7 +23,7 @@
}
},
methods: {
- getElementByNotExistId() : Element | null {
+ getElementByNotExistId() : UniElement | null {
return uni.getElementById('not-exist-id')
},
changePageHeadBackgroundColor() {
@@ -37,11 +37,11 @@
changeViewStyle() {
const view = uni.getElementById('view')
if (view !== null) {
- view.style['width'] = '90%'
- view.style['height'] = '50px'
+ view.style['width'] = '90%'
+ view.style['height'] = '50px'
view.style['backgroundColor'] = '#007AFF'
}
}
}
}
-
+
diff --git a/pages/API/get-element-by-id/get-element-by-id.uvue b/pages/API/get-element-by-id/get-element-by-id.uvue
index 24559446a92436dd78e90a99b28129f60c6b8adc..201178acb191157fbacb6f88ad8cd3f8540d3f84 100644
--- a/pages/API/get-element-by-id/get-element-by-id.uvue
+++ b/pages/API/get-element-by-id/get-element-by-id.uvue
@@ -30,7 +30,7 @@
}
},
methods: {
- getElementByNotExistId() : Element | null {
+ getElementByNotExistId() : UniElement | null {
return uni.getElementById('not-exist-id')
},
changePageHeadBackgroundColor() {
@@ -38,14 +38,14 @@
pageHead.style['backgroundColor'] = 'red'
},
changeTextColor() {
- const text = uni.getElementById('text')!
- text.style['color'] = 'red'
- },
+ const text = uni.getElementById('text')!
+ text.style['color'] = 'red'
+ },
changeViewStyle() {
const view = uni.getElementById('view')
if (view !== null) {
- view.style['width'] = '90%'
- view.style['height'] = '50px'
+ view.style['width'] = '90%'
+ view.style['height'] = '50px'
view.style['backgroundColor'] = '#007AFF'
}
},
@@ -54,4 +54,4 @@
}
}
}
-
+
diff --git a/pages/API/get-system-info/get-system-info.test.js b/pages/API/get-system-info/get-system-info.test.js
index 5a614780afe15fe8a0b92e7dddf241f0b42d883d..c59da34263bf4c22ac736fc588ee782d35b05eec 100644
--- a/pages/API/get-system-info/get-system-info.test.js
+++ b/pages/API/get-system-info/get-system-info.test.js
@@ -7,7 +7,7 @@ describe('ExtApi-GetSystemInfo', () => {
const stringProperties = [
'appId', 'appLanguage', 'appName', 'appVersion', 'appVersionCode',
'brand', 'deviceId', 'deviceBrand', 'deviceModel', 'deviceType', 'language',
- 'model', 'version', 'osName', 'osVersion', 'osLanguage', 'platform', 'system', 'ua', 'uniCompileVersion',
+ 'model', 'osName', 'osVersion', 'osLanguage', 'platform', 'system', 'ua', 'uniCompileVersion',
'uniPlatform', 'uniRuntimeVersion', 'romName', 'romVersion',
]
const numberProperties = [
@@ -15,7 +15,12 @@ describe('ExtApi-GetSystemInfo', () => {
'windowWidth',
'windowHeight', 'windowTop', 'windowBottom', 'screenTop',
'uniCompileVersionCode', 'uniRuntimeVersionCode'
- ]
+ ]
+
+
+ if (process.env.uniTestPlatformInfo.indexOf('web') === -1) {
+ stringProperties.push('version')
+ }
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
diff --git a/pages/API/navigator/new-page/onLoad.uvue b/pages/API/navigator/new-page/onLoad.uvue
index a13dfa2ec60901c03f2a8d00593c9e910d804538..04e5b90eddcf09a6460255b3ed4a3db877f32a34 100644
--- a/pages/API/navigator/new-page/onLoad.uvue
+++ b/pages/API/navigator/new-page/onLoad.uvue
@@ -55,11 +55,13 @@ export default {
},
// #ifdef WEB
onUnload() {
- // web 端页面销毁前,关闭 modal 和 actionsheet
+ // web 端页面销毁前,关闭 modal 和 actionsheet
+ // @ts-ignore
const modalBtn = document.querySelector('.uni-modal__btn')
if (modalBtn) {
modalBtn.click()
- }
+ }
+ // @ts-ignore
const actionSheetBtn = document.querySelector('.uni-actionsheet__action .uni-actionsheet__cell')
if (actionSheetBtn) {
actionSheetBtn.click()
diff --git a/pages/API/request/request.test.js b/pages/API/request/request.test.js
index e4157b0aff1df2ec17ae2142ceb4e9d5e77731c9..d4fbf9393b99effb2f4a21082783d14efae5091c 100644
--- a/pages/API/request/request.test.js
+++ b/pages/API/request/request.test.js
@@ -69,10 +69,12 @@ describe('ExtApi-Request', () => {
});
it('Check PATCH', async () => {
await request(page, 'PATCH');
- });
- it('Check OPTIONS', async () => {
- await request(page, 'OPTIONS');
- });
+ });
+ if (process.env.uniTestPlatformInfo.indexOf('web') === -1) {
+ it('Check OPTIONS', async () => {
+ await request(page, 'OPTIONS');
+ });
+ }
it('Check HEAD', async () => {
await request(page, 'HEAD');
});
diff --git a/pages/CSS/display/flex.uvue b/pages/CSS/display/flex.uvue
index 33e4055d4231d85db85a9804064c39bca7a49355..182561dc7c134040a76dcb791df0cae9ac995506 100644
--- a/pages/CSS/display/flex.uvue
+++ b/pages/CSS/display/flex.uvue
@@ -1,7 +1,5 @@
-
-
下面有一个灰色区域,display默认值为flex
当前display值:{{display}}
@@ -10,9 +8,7 @@
展示display区域
-
-
+ .uni-input-placeholder-class-ts {
+ background-color: orange;
+ }
+
diff --git a/pages/component/list-view/list-view.uvue b/pages/component/list-view/list-view.uvue
index 51bcb9fe508412c4d324b031b409731c4a895312..e43c308e80284af6756e89339189d1ac5db51566 100644
--- a/pages/component/list-view/list-view.uvue
+++ b/pages/component/list-view/list-view.uvue
@@ -92,7 +92,7 @@
item_change_size_enum(index : number) { this.scrollIntoView = "item---"+index },
//自动化测试例专用
check_scroll_height(): Boolean {
- var listElement = this.$refs["listview"] as Element
+ var listElement = this.$refs["listview"] as UniElement
console.log("check_scroll_height--"+listElement.scrollHeight)
if(listElement.scrollHeight > 2000) {
return true
@@ -101,7 +101,7 @@
},
//自动化测试例专用
check_scroll_width(): Boolean {
- var listElement = this.$refs["listview"] as Element
+ var listElement = this.$refs["listview"] as UniElement
console.log("check_scroll_width"+listElement.scrollWidth)
if(listElement.scrollWidth > 2000) {
return true
diff --git a/pages/component/mixin-datacom/mixin-datacom.test.js b/pages/component/mixin-datacom/mixin-datacom.test.js
index f70ed01b5482ab260b538b0cce86eddf52bb7b9b..95a8804ada679250806617dfb9791491b2a6dd74 100644
--- a/pages/component/mixin-datacom/mixin-datacom.test.js
+++ b/pages/component/mixin-datacom/mixin-datacom.test.js
@@ -1,6 +1,12 @@
const PAGE_PATH = '/pages/component/mixin-datacom/mixin-datacom'
describe('mixin-datacom', () => {
+ if (process.env.uniTestPlatformInfo.startsWith('web')) {
+ it('dummyTest', async () => {
+ expect(1).toBe(1)
+ })
+ return
+ }
let page
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
diff --git a/pages/component/picker-view/picker-view.test.js b/pages/component/picker-view/picker-view.test.js
index 430805e3d8f54d1cb24a60ec2c8e8b38767ac440..6bf1e763573ebdbb5ff4b2f64a32738a0686074a 100644
--- a/pages/component/picker-view/picker-view.test.js
+++ b/pages/component/picker-view/picker-view.test.js
@@ -16,14 +16,14 @@ describe('PickerView.uvue', () => {
const el = await page.$('.picker-view')
await page.callMethod('setValue')
await page.waitFor(1000)
- expect(await el.property('value')).toEqual([0, 0, 0])
+ expect(await el.attribute('value')).toEqual([0, 0, 0])
if (process.env.UNI_PLATFORM === 'app-android') {
expect(await getData('result')).toEqual([0, 0, 0])
}
await page.callMethod('setValue1')
await page.waitFor(1000)
- expect(await el.property('value')).toEqual([10, 10, 10])
+ expect(await el.attribute('value')).toEqual([10, 10, 10])
if (process.env.UNI_PLATFORM === 'app-android') {
expect(await getData('result')).toEqual([10, 10, 10])
}
@@ -39,22 +39,22 @@ describe('PickerView.uvue', () => {
const el = await page.$('.picker-view')
await page.setData({
indicatorStyle: 'height: 100px;',
- })
+ })
await page.waitFor(500)
- expect(await el.property('indicatorStyle')).toBe('height: 100px;')
+ expect(await el.attribute('indicatorStyle')).toBe('height: 100px;')
})
it('mask-top-style', async () => {
const el = await page.$('.picker-view')
await page.setData({
maskTopStyle: 'background: #ffffff;',
})
- expect(await el.property('mask-top-style')).toBe('background: #ffffff;')
+ expect(await el.attribute('mask-top-style')).toBe('background: #ffffff;')
})
it('mask-bottom-style', async () => {
const el = await page.$('.picker-view')
await page.setData({
maskBottomStyle: 'background: #ffffff;',
})
- expect(await el.property('mask-bottom-style')).toBe('background: #ffffff;')
+ expect(await el.attribute('mask-bottom-style')).toBe('background: #ffffff;')
})
})
diff --git a/pages/component/progress/progress.test.js b/pages/component/progress/progress.test.js
index a572aeaeb22e2458f1bc8f3bf2f437b81c6304fc..2ce2fe5ae35aa67a73b4983b40a5d5b9d3621141 100644
--- a/pages/component/progress/progress.test.js
+++ b/pages/component/progress/progress.test.js
@@ -16,22 +16,22 @@ describe('Progress.uvue', () => {
await page.callMethod('setProgress')
await page.waitFor(1000);
const p = await page.$('.p')
- expect(await p.property('percent')).toEqual(20)
+ expect(await p.attribute('percent')).toEqual(20)
const p1 = await page.$('.p1')
- expect(await p1.property('percent')).toEqual(40)
+ expect(await p1.attribute('percent')).toEqual(40)
const p2 = await page.$('.p2')
- expect(await p2.property('percent')).toEqual(60)
+ expect(await p2.attribute('percent')).toEqual(60)
const p3 = await page.$('.p3')
- expect(await p3.property('percent')).toEqual(80)
+ expect(await p3.attribute('percent')).toEqual(80)
if (process.env.UNI_PLATFORM === 'app-android') {
expect(await getData('curPercent')).toEqual(20)
}
await page.callMethod('clearProgress')
await page.waitFor(1000)
- expect(await p.property('percent')).toEqual(0)
- expect(await p1.property('percent')).toEqual(0)
- expect(await p2.property('percent')).toEqual(0)
- expect(await p3.property('percent')).toEqual(0)
+ expect(await p.attribute('percent')).toEqual(0)
+ expect(await p1.attribute('percent')).toEqual(0)
+ expect(await p2.attribute('percent')).toEqual(0)
+ expect(await p3.attribute('percent')).toEqual(0)
if (process.env.UNI_PLATFORM === 'app-android') {
expect(await getData('curPercent')).toEqual(0)
}
@@ -42,42 +42,42 @@ describe('Progress.uvue', () => {
})
it('show-info', async () => {
const el = await page.$('.p')
- expect(await el.property('show-info')).toEqual(true)
+ expect(await el.attribute('show-info')).toEqual(true)
await page.setData({
showInfo: false
})
- expect(await el.property('show-info')).toEqual(false)
+ expect(await el.attribute('show-info')).toEqual(false)
})
it('border-radius', async () => {
const el = await page.$('.p')
- expect(await el.property('border-radius')).toEqual(0)
+ expect(await el.attribute('border-radius')).toEqual(0)
await page.setData({
borderRadius: 5
})
- expect(await el.property('border-radius')).toEqual(5)
+ expect(await el.attribute('border-radius')).toEqual(5)
})
it('font-size', async () => {
const el = await page.$('.p')
- expect(await el.property('font-size')).toEqual(16)
+ expect(await el.attribute('font-size')).toEqual(16)
await page.setData({
fontSize: 18
})
- expect(await el.property('font-size')).toEqual(18)
+ expect(await el.attribute('font-size')).toEqual(18)
})
it('stroke-width', async () => {
const el = await page.$('.p')
- expect(await el.property('stroke-width')).toEqual(3)
+ expect(await el.attribute('stroke-width')).toEqual(3)
await page.setData({
strokeWidth: 6
})
- expect(await el.property('stroke-width')).toEqual(6)
+ expect(await el.attribute('stroke-width')).toEqual(6)
})
it('backgroundColor', async () => {
const el = await page.$('.p')
- expect(await el.property('background-color')).toEqual('#EBEBEB')
+ expect(await el.attribute('background-color')).toEqual('#EBEBEB')
await page.setData({
backgroundColor: "#007aff"
})
- expect(await el.property('background-color')).toEqual('#007aff')
+ expect(await el.attribute('background-color')).toEqual('#007aff')
})
})
\ No newline at end of file
diff --git a/pages/component/radio/radio.test.js b/pages/component/radio/radio.test.js
index aa14de52f63fd704be9942d93654b9e76be07d15..e0fe44013ac7e2953970a5b34e2937f49c349779 100644
--- a/pages/component/radio/radio.test.js
+++ b/pages/component/radio/radio.test.js
@@ -40,26 +40,26 @@ describe('Radio.uvue', () => {
})
it('checked', async () => {
const radio = await page.$('.r')
- expect(await radio.property('checked')).toBe(true)
+ expect(await radio.attribute('checked')).toBe(true)
await page.setData({
checked: false,
})
- expect(await radio.property('checked')).toBe(false)
+ expect(await radio.attribute('checked')).toBe(false)
})
it('color', async () => {
const radio = await page.$('.r')
- expect(await radio.property('color')).toBe('#007aff')
+ expect(await radio.attribute('color')).toBe('#007aff')
await page.setData({
color: '#63acfc',
})
- expect(await radio.property('color')).toBe('#63acfc')
+ expect(await radio.attribute('color')).toBe('#63acfc')
})
it('disabled', async () => {
const radio = await page.$('.r2')
- expect(await radio.property('disabled')).toBe(true)
+ expect(await radio.attribute('disabled')).toBe(true)
await page.setData({
disabled: false,
})
- expect(await radio.property('disabled')).toBe(false)
+ expect(await radio.attribute('disabled')).toBe(false)
})
})
diff --git a/pages/component/scroll-view/scroll-view-props.uvue b/pages/component/scroll-view/scroll-view-props.uvue
index 556b4bd6a4fe25b497caabcbe187fbae4f74391f..a5b52114c421104373adcfe134e73f31d961aa8a 100644
--- a/pages/component/scroll-view/scroll-view-props.uvue
+++ b/pages/component/scroll-view/scroll-view-props.uvue
@@ -5,7 +5,7 @@
@@ -15,9 +15,9 @@
+ @scrolltolower="scrolltolower" @scroll="scroll" @scrollend="scrollend" ref="scrollViewY" id="scrollViewY" style="width: 100%;height: 100%;">
{{item.label}}
@@ -40,10 +40,10 @@
是否横向滚动
-
-
- 是否竖向滚动
-
+
+
+ 是否竖向滚动
+
@@ -91,7 +91,7 @@
data() {
return {
items: [] as Item[],
- scrollX: false,
+ scrollX: false,
scrollY: true,
rebound: false,
scrollTop: 0,
@@ -122,20 +122,20 @@
this.scrollTop = e.detail.value;
},
changeDirectionX() {
- this.scrollX = !this.scrollX;
- if(this.scrollX) {
- this.scrollY = false
+ this.scrollX = !this.scrollX;
+ if(this.scrollX) {
+ this.scrollY = false
+ }
+ this.scrollTop = 0;
+ this.scrollLeft = 0;
+ },
+ changeDirectionY() {
+ this.scrollY = !this.scrollY;
+ if(this.scrollY) {
+ this.scrollX = false
}
this.scrollTop = 0;
this.scrollLeft = 0;
- },
- changeDirectionY() {
- this.scrollY = !this.scrollY;
- if(this.scrollY) {
- this.scrollX = false
- }
- this.scrollTop = 0;
- this.scrollLeft = 0;
},
handleScrollIntoView() {
if (this.scrollX) {
@@ -176,33 +176,33 @@
},
scrollend() {
console.log("滚动停止");
- },
- onTouchMove() {
- console.log("TouchMove");
- },
- //自动化测试专用
- checkScrollHeight(): Boolean {
- var element = this.$refs["scrollViewY"]
- if(element != null) {
- var scrollHeight = (element as Element).scrollHeight
- console.log("checkScrollHeight"+scrollHeight)
- if(scrollHeight > 1900) {
- return true
- }
- }
- return false
- },
- //自动化测试专用
- checkScrollWidth(): Boolean {
- var element = this.$refs["scrollViewX"]
- if(element != null) {
- var scrollWidth = (element as Element).scrollWidth
- console.log("checkScrollWidth---"+scrollWidth)
- if(scrollWidth > 1900) {
- return true
- }
- }
- return false
+ },
+ onTouchMove() {
+ console.log("TouchMove");
+ },
+ //自动化测试专用
+ checkScrollHeight(): Boolean {
+ var element = this.$refs["scrollViewY"]
+ if(element != null) {
+ var scrollHeight = (element as UniElement).scrollHeight
+ console.log("checkScrollHeight"+scrollHeight)
+ if(scrollHeight > 1900) {
+ return true
+ }
+ }
+ return false
+ },
+ //自动化测试专用
+ checkScrollWidth(): Boolean {
+ var element = this.$refs["scrollViewX"]
+ if(element != null) {
+ var scrollWidth = (element as UniElement).scrollWidth
+ console.log("checkScrollWidth---"+scrollWidth)
+ if(scrollWidth > 1900) {
+ return true
+ }
+ }
+ return false
}
}
}
@@ -221,7 +221,7 @@
height: 400rpx;
width: 100%;
background-color: azure;
- border-width: 2rpx;
+ border-width: 2rpx;
border-style: solid;
border-color: chocolate;
}
@@ -249,4 +249,4 @@
padding: 30rpx;
justify-content: center;
}
-
+
diff --git a/pages/component/scroll-view/scroll-view-refresher-props.uvue b/pages/component/scroll-view/scroll-view-refresher-props.uvue
index a6c45b645a6954fb116d9419d74af460af029968..f7afa3c267fa9e177bb727aad74ba887e0e40cc2 100644
--- a/pages/component/scroll-view/scroll-view-refresher-props.uvue
+++ b/pages/component/scroll-view/scroll-view-refresher-props.uvue
@@ -2,11 +2,11 @@
-
+ @refresherabort="refresherabort" style="width: 100%;height: 100%;">
{{item.label}}
diff --git a/pages/component/slider-100/slider-100.test.js b/pages/component/slider-100/slider-100.test.js
index bf942e1cc8905ec7d5ed37333af01c90c7dec6d4..2bee9dff3b44cd93af1023e66582887d30939764 100644
--- a/pages/component/slider-100/slider-100.test.js
+++ b/pages/component/slider-100/slider-100.test.js
@@ -15,12 +15,12 @@ describe('slider', () => {
// TODO 暂时仅获取第一个
const slider1 = await page.$('.slider')
- expect(await slider1.property('value')).toBe(sliderValue)
+ expect(await slider1.attribute('value')).toBe(sliderValue)
// const slider100 = await page.$$('.slider')
// for (let i = 0; i < slider100.length; i++) {
// const slider = slider100[i];
- // expect(await slider.property('value')).toBe(sliderValue)
+ // expect(await slider.attribute('value')).toBe(sliderValue)
// }
})
})
diff --git a/pages/component/slider-100/slider-100.uvue b/pages/component/slider-100/slider-100.uvue
index d90ad7caa893bb4cd072727acf2075467321e752..78fab4b5c846068a1a05dfffde732adc6a90e33e 100644
--- a/pages/component/slider-100/slider-100.uvue
+++ b/pages/component/slider-100/slider-100.uvue
@@ -1,7 +1,5 @@
-
-
@@ -21,9 +19,7 @@
@change="sliderChange" :value="sliderValue" :block-size="20" :show-value="true" />
-
-