diff --git a/pages/component/checkbox/checkbox.test.js b/pages/component/checkbox/checkbox.test.js index 66db34d30232a763cb32c647413fdb9676bde468..dcc31fe22218a8d0ef1175799e0e48079bac0921 100644 --- a/pages/component/checkbox/checkbox.test.js +++ b/pages/component/checkbox/checkbox.test.js @@ -42,11 +42,15 @@ describe('Checkbox.uvue', () => { }) it('checked', async () => { const cb = await page.$('.cb') - expect(await cb.property('checked')).toBe(true) + // TODO + const newValue1 = await cb.property('checked') + expect(newValue1.toString()).toBe(true + '') await page.setData({ checked: false, }) - expect(await cb.property('checked')).toBe(false) + // TODO + const newValue2 = await cb.property('checked') + expect(newValue2.toString()).toBe(false + '') }) it('color', async () => { const cb = await page.$('.cb') diff --git a/pages/component/radio/radio.test.js b/pages/component/radio/radio.test.js index aca487c82751a2b554a1eae572f8ac0ab172650d..f0ab5bd6a05527d43ef188038dd4959dc44d6abf 100644 --- a/pages/component/radio/radio.test.js +++ b/pages/component/radio/radio.test.js @@ -40,11 +40,14 @@ describe('Radio.uvue', () => { }) it('checked', async () => { const radio = await page.$('.r') - expect(await radio.property('checked')).toBe(true) + // TODO + const newValue1 = await radio.property('checked') + expect(newValue1.toString()).toBe(true + '') await page.setData({ checked: false, }) - expect(await radio.property('checked')).toBe(false) + const newValue2 = await radio.property('checked') + expect(newValue2.toString()).toBe(false + '') }) it('color', async () => { const radio = await page.$('.r') diff --git a/pages/component/slider-100/slider-100.test.js b/pages/component/slider-100/slider-100.test.js index bf942e1cc8905ec7d5ed37333af01c90c7dec6d4..4f3dad868ce1227cf6598890b1f55a8319eee5b1 100644 --- a/pages/component/slider-100/slider-100.test.js +++ b/pages/component/slider-100/slider-100.test.js @@ -15,7 +15,9 @@ describe('slider', () => { // TODO 暂时仅获取第一个 const slider1 = await page.$('.slider') - expect(await slider1.property('value')).toBe(sliderValue) + // TODO + const newValue = await slider1.property('value') + expect(newValue.toString()).toBe(sliderValue + '') // const slider100 = await page.$$('.slider') // for (let i = 0; i < slider100.length; i++) { diff --git a/pages/component/slider/slider.test.js b/pages/component/slider/slider.test.js index f67f77c83229748ab13ff018091af6cd40e20af8..1538512e5d03b4b6f9336ec23889f848de27b992 100644 --- a/pages/component/slider/slider.test.js +++ b/pages/component/slider/slider.test.js @@ -15,7 +15,9 @@ describe('slider', () => { sliderValue: sliderValue, }) await page.waitFor(100) - expect(await slider.property('value')).toBe(sliderValue) + // TODO + const newValue = await slider.property('value') + expect(newValue.toString()).toBe(sliderValue + '') }) it('color', async () => { const slider = await page.$('.slider-custom-color-and-size') diff --git a/pages/component/switch/switch.test.js b/pages/component/switch/switch.test.js index 9e1f569f979a0129ba7589d533ecc0d21452cdfc..259438994d2dd7b1b7c0b5f9a84af35bde09d331 100644 --- a/pages/component/switch/switch.test.js +++ b/pages/component/switch/switch.test.js @@ -29,13 +29,17 @@ describe('switch', () => { checked: false, }) await page.waitFor(100) - expect(await switch_element.property('checked')).toBe(false) + // TODO + const newValue1 = await switch_element.property('checked') + expect(newValue1.toString()).toBe(false + '') await page.setData({ checked: true, }) await page.waitFor(100) - expect(await switch_element.property('checked')).toBe(true) + // TODO + const newValue2 = await switch_element.property('checked') + expect(newValue2.toString()).toBe(true + '') }) it('color', async () => { const switch_element = await page.$('.switch-color')