diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets index 309903e23a3eda8cdcd9f63773ca7a428c6147c0..9103407baf777469c59a9a3700fb3f91e3b0749f 100644 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets +++ b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets @@ -90,7 +90,7 @@ struct TextInputOnEditChange { .border({ width: 1 }) .padding(10) .textAlign(TextAlign.Center) - //设置复制选项时调用 + //设置复制选项时调用 .copyOption(0) .key("textInputCopyOptionText") @@ -108,7 +108,7 @@ struct TextInputOnEditChange { //设置密码显示/隐藏图标时调用 .showPasswordIcon(true) .key("showPasswordIconText") - + }.width("100%").height("100%") } } diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/config.json b/arkui/ace_ets_component_attrlack/entry/src/main/config.json index c1fa0bbe374b6018f8ee4cbfb24c59204a8b0bf3..aeb9ccac30aee48d0cd44a2bd465a49f821ef27d 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/config.json +++ b/arkui/ace_ets_component_attrlack/entry/src/main/config.json @@ -93,11 +93,13 @@ "pages/gridCol", "pages/gridRow", "pages/listtest", + "pages/list_item_group", "pages/loadingProgress", "pages/pluginComponent", "pages/progress", "pages/radio", "pages/refresh", + "pages/remoteWindow", "pages/router", "pages/scroll_edge", "pages/sidebar", @@ -110,7 +112,9 @@ "pages/web", "pages/copyOption", "pages/responseType", - "pages/hoverEffect" + "pages/hoverEffect", + "pages/hitTestMode", + "pages/color" ], "name": ".MainAbility", "window": { diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/color.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/color.ets new file mode 100644 index 0000000000000000000000000000000000000000..4afa006f0d6b60229e546a5b665e4be4f3bf1650 --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/color.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../common/Log.ets'; + +const TAG = 'ets_apiLack_add'; + +@Entry +@Component +export default +struct ColorEnum { + build() { + Column() { + Text('Transparent') + .fontColor(Color.Transparent) + .backgroundColor(Color.Yellow) + .fontSize(50) + .key('Transparent') + .onClick(() => { + let strJson = getInspectorByKey('Transparent'); + let obj = JSON.parse(strJson); + console.info("testTransparent fontColor is" + obj.$attrs.fontColor); + }) + }.width("100%").height("100%") + } +} + diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/common.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/common.ets index b413cc63f7a328c1089ee8c31811f62749bab0c2..d5e9b6245e5b7ab86f800a8b9a6d38ea771d9ec3 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/common.ets +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/common.ets @@ -14,7 +14,7 @@ */ import Log from '../common/Log.ets'; - +import events_emitter from '@ohos.events.emitter'; const TAG = 'ets_apiLack_add'; @Entry @@ -118,7 +118,26 @@ export default struct CommonColorMode { .textOverflow({ overflow: TextOverflow.None }) .key("areaText") .onClick((event) => { - Log.showInfo(TAG, 'area: ' + JSON.stringify(event.target.area)) + Log.showInfo(TAG, 'JSON.stringify area : ' + JSON.stringify(event.target.area)) + const area = JSON.stringify(event.target.area) + console.info("area value1 is: " + area) + console.info("area value3 is: " + JSON.parse(JSON.stringify(event.target.area))["width"]) + let value = JSON.parse(JSON.stringify(event.target.area))["width"] + try { + var backData = { + data: { + "STATUS": value + } + } + let backEvent = { + eventId: 60312, + priority: events_emitter.EventPriority.LOW + } + console.info("areaValue start to emit action state") + events_emitter.emit(backEvent, backData) + } catch (err) { + console.info("areaValue emit action state err: " + JSON.stringify(err.message)) + } }) Text("common-Repeat") .width(320) @@ -263,6 +282,25 @@ export default struct CommonColorMode { .key("touchesText") .onTouch((event) => { Log.showInfo(TAG, 'touches: ' + JSON.stringify(event.touches)) + const touchesValue = JSON.stringify(event.touches) + console.info("touches value1 is: " + touchesValue) + console.info("touches value3 is: " + JSON.stringify(event.touches)[0]["type"]) + let value = JSON.stringify(event.touches)[0]["type"] + try { + var backData1 = { + data: { + "STATUS": value + } + } + let backEvent1 = { + eventId: 60313, + priority: events_emitter.EventPriority.LOW + } + console.info("touchesValue start to emit action state") + events_emitter.emit(backEvent1, backData1) + } catch (err) { + console.info("touchesValue emit action state err: " + JSON.stringify(err.message)) + } }) Text("common-ChangedTouches") @@ -280,6 +318,25 @@ export default struct CommonColorMode { .key("changedTouchesText") .onTouch((event) => { Log.showInfo(TAG, 'changedTouches: ' + JSON.stringify(event.changedTouches)) + const changedTouchesValue = JSON.stringify(event.changedTouches) + console.info("changedTouchesValue value1 is: " + changedTouchesValue) + console.info("changedTouchesValue value3 is: " + changedTouchesValue[0]["type"]) + let value = changedTouchesValue[0]["type"] + try { + var backData2 = { + data: { + "STATUS": value + } + } + let backEvent2 = { + eventId: 60314, + priority: events_emitter.EventPriority.LOW + } + console.info("touchesValue start to emit action state") + events_emitter.emit(backEvent2, backData2) + } catch (err) { + console.info("touchesValue emit action state err: " + JSON.stringify(err.message)) + } }) Text("common-KeyCode") diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/hitTestMode.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/hitTestMode.ets new file mode 100644 index 0000000000000000000000000000000000000000..435a19efac72c0d43ea35235e05ccdcc76de85ee --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/hitTestMode.ets @@ -0,0 +1,66 @@ +// @ts-nocheck +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../common/Log.ets'; + +const TAG = 'ets_apiLack_add'; + +@Entry +@Component +struct HitTestMode { + build() { + Column() { + // outer stack 1 + Stack() { + Button('outer button') + .onTouch((event) => { + console.info('HitTestMode outer button touched type: ' + event.type) + }) + // inner stack + Stack() { + Button('inner button') + .key("innnerButton") + .onTouch((event) => { + console.info('HitTestMode inner button touched type: ' + event.type) + }) + } + .key("Block") + .width("100%") + .height("100%") + .hitTestBehavior(HitTestMode.Block) + .onTouch((event) => { + console.info('HitTestMode inner stack touched type: ' + event.type) + }) + + Text('Transparent') + .key("Transparent") + .hitTestBehavior(HitTestMode.Transparent) + .width("100%") + .height("50%") + .onTouch((event) => { + console.info('HitTestMode text touched type: ' + event.type) + let strJson = getInspectorByKey('Transparent'); + let obj = JSON.parse(strJson); + console.info("HitTestMode hitTestBehavior is " + obj.$attrs.hitTestBehavior); + let strJson2 = getInspectorByKey('Block'); + let obj2 = JSON.parse(strJson2); + console.info("HitTestMode hitTestBehavior is " + obj2.$attrs.hitTestBehavior); + }) + }.width(300).height(300).backgroundColor(Color.Gray) + }.width('100%').height('100%') + } +} + diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/list_item_group.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/list_item_group.ets new file mode 100644 index 0000000000000000000000000000000000000000..5be8952e7b9667b1df943402cca6243cc2775b32 --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/list_item_group.ets @@ -0,0 +1,86 @@ +// @ts-nocheck +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../common/Log.ets'; +const TAG = 'ets_apiLack_add'; + +function itemHeadBuilder(text: string) { + @Builder function itemHead() { + Text(text) + .fontSize(20) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(10) + } + return itemHead +} + +function itemFootBuilder(num: number) { + @Builder function itemFoot() { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(5) + } + return itemFoot +} + +@Entry +@Component +struct ListItemGroupExample { + private timetable: any = [ + { + title:'Mon', + projects:['语文', '数学', '英语'] + }, + { + title:'Tues', + projects:['物理', '化学', '生物'] + }, + { + title:'Wens', + projects:['历史', '地理', '政治'] + }, + { + title:'Thur', + projects:['美术', '音乐', '体育'] + } + ] + + build() { + Column() { + List({ space: 20 }) { + ForEach(this.timetable, (item) => { + ListItemGroup({ header:itemHeadBuilder(item.title), footer:itemFootBuilder(item.projects.length) }) { + ForEach(item.projects, (project) => { + ListItem() { + Text(project) + .width("100%").height(100).fontSize(20) + .textAlign(TextAlign.Center).backgroundColor(0xFFFFFF) + } + }, item => item) + } + .key(item) + .borderRadius(20) + .divider({ strokeWidth: 1, color: Color.Blue}) // 每行之间的分界线 + }) + } + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } + } \ No newline at end of file diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/remoteWindow.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/remoteWindow.ets index 5d1fae1d35d873433cf92093dc480f6d9a00c3f6..40c64df19733671fdc145f14906ad09bb7456096 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/remoteWindow.ets +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/remoteWindow.ets @@ -20,6 +20,8 @@ const TAG = 'ets_apiLack_add'; @Entry @Component export default struct FormComponentFormDimension { + @State target: WindowAnimationTarget = undefined // 通过windowAnimationManager获取 + aboutToAppear() { Log.showInfo(TAG, `aboutToAppear Dimension start`) } @@ -52,6 +54,7 @@ export default struct FormComponentFormDimension { .position({ x: px2vp(this.target?.windowBounds.left), y: px2vp(this.target?.windowBounds.top) }) .width(px2vp(this.target?.windowBounds.width)) .height(px2vp(this.target?.windowBounds.height)) + .key('remoteWindow') } .width('100%') diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/text_input.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/text_input.ets index 784b28a6ac75430bff4980a1c64e40f8052bbab6..dd5271d4a3f7879f2a966b442eba4f89f979c745 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/text_input.ets +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/text_input.ets @@ -21,6 +21,8 @@ const TAG = 'ets_apiLack_add'; @Component export default struct Text_inputPhoneNumber { @State text: string = '' + @State text1: string = 'PhoneNumber' + @State text2: string = 'Address' aboutToAppear() { Log.showInfo(TAG, `aboutToAppear Text_inputPhoneNumber start`) @@ -49,6 +51,37 @@ export default struct Text_inputPhoneNumber { this.text = value }) + Text(this.text1).width('90%') + TextInput({ placeholder: 'input your word' }) + .key('textInput1') + .type(InputType.PhoneNumber) + .placeholderColor("rgb(0,0,225)") + .placeholderFont({ size: 30, weight: 100, family: 'cursive', style: FontStyle.Italic }) + .caretColor(Color.Blue) + .height(50) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontFamily("sans-serif") + .fontStyle(FontStyle.Normal) + .fontColor(Color.Red) + .style(TextInputStyle.Default) + + Text(this.text2).width('90%') + TextInput({ placeholder: 'input your word' }) + .key('textInput2') + .type(InputType.PhoneNumber) + .placeholderColor("rgb(0,0,225)") + .placeholderFont({ size: 30, weight: 100, family: 'cursive', style: FontStyle.Italic }) + .caretColor(Color.Blue) + .height(50) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontFamily("sans-serif") + .fontStyle(FontStyle.Normal) + .fontColor(Color.Red) + .style(TextInputStyle.Inline) + .margin(10) + }.width("100%").height("100%") } } diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets index 45ccbfd3369b972d510145699d07a49c42414845..9f8e983b6bf66601966ee332f573219431707ef3 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets @@ -23,14 +23,17 @@ import canvasActualBoundingBoxAscentJsunit from './canvas.test.ets'; import checkBoxGroupJsunit from './checkBox.test.ets'; import checkBoxGroupPartJsunit from './checkBoxGroup.test.ets'; import commonColorModeJsunit from './common.test.ets'; +import configurationApiTest from './configuration.test.ets' import datePickerLunarJsunit from './datePicker.test.ets'; import enumsCancelJsunit from './enums.test.ets'; import gestureParallelJsunit from './gesture.test.ets'; import listtestIdleJsunit from './listtest.test.ets'; +import list_item_groupJsunit from './list_item_group.test.ets' import loadingProgressCircularJsunit from './loadingProgress.test.ets'; import progressScaleCountJsunit from './progress.test.ets'; import radioGroupJsunit from './radio.test.ets'; import refreshDragJsunit from './refresh.test.ets'; +import remoteWindowJsunit from './remoteWindow.test.ets' import sidebarIconsJsunit from './sidebar.test.ets'; import sliderMovingJsunit from './slider.test.ets'; import stateManagementDARKJsunit from './stateManagement.test.ets'; @@ -42,12 +45,13 @@ import webEditTextJsunit from './web.test.ets'; import hoverEffectJsunit from './hoverEffect.test.ets'; import responseTypeJsunit from './responseType.test.ets'; import copyOptionJsunit from './copyOption.test.ets'; +import hitTestModeJsunit from './hitTestMode.test.ets'; +import colorEnumJsunit from './color.test.ets'; +import basicJsunit from './basic.test.ets'; export default function testsuite() { animatorOnframeJsunit() - curvesEaseOutJsunit() routerStandardJsunit() - uiAppearanceALWAYS_DARKJsunit() appVersionCodeJsunit() alertDialogCenterStartJsunit() canvasActualBoundingBoxAscentJsunit() @@ -55,22 +59,23 @@ export default function testsuite() { checkBoxGroupPartJsunit() commonColorModeJsunit() datePickerLunarJsunit() - enumsCancelJsunit() gestureParallelJsunit() listtestIdleJsunit() loadingProgressCircularJsunit() progressScaleCountJsunit() radioGroupJsunit() - refreshDragJsunit() + remoteWindowJsunit() sidebarIconsJsunit() sliderMovingJsunit() stateManagementDARKJsunit() stepperItemDisabledJsunit() swiperMaskJsunit() - text_inputPhoneNumberJsunit() unitsModuleNameJsunit() webEditTextJsunit() hoverEffectJsunit() responseTypeJsunit() copyOptionJsunit() + hitTestModeJsunit() + colorEnumJsunit() + basicJsunit() } \ No newline at end of file diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/basic.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/basic.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8eb9b20b7ead170c13a66a49e7558bd5b6abbd1e --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/basic.test.ets @@ -0,0 +1,81 @@ +// @ts-nocheck +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index"; +import Utils from './Utils.ets' + +export default function basicJsunit() { + describe('basicJsunit', function () { + let businessCallback: AsyncCallback> = (error, data) => { + console.info("businessCallback error data is" + JSON.stringify(error.data)); + expect(JSON.stringify(error.data)).assertEqual("[1,2]"); + } + + function businessErrorTest(asyncCallback: AsyncCallback>): void { + let businessError: BusinessError> = { + code: 1, + data: [1,2] + }; + businessCallback(businessError, "businessErrorCallback"); + } + + let asyncCallback: AsyncCallback> = (error, data) => { + console.info("asyncCallback error data is" + error.data); + expect(error.data).assertEqual(EdgeEffect.Fade); + } + + function asyncCallbackTest(asyncCallback: AsyncCallback): void { + let businessError: BusinessError = { + code: 1, + data: EdgeEffect.Fade + }; + asyncCallback(businessError, "asyncCallback"); + } + + beforeEach(async function (done) { + console.info("basicTest beforeEach start"); + done() + }); + + afterEach(async function () { + await Utils.sleep(1000); + console.info("basicTest after each called"); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0001 + * @tc.name testAsyncCallbackE0001 + * @tc.desic aceAsyncCallbackEEtsTest0001 + */ + it('testAsyncCallbackE0001', 0, async function (done) { + console.info('basicTest testAsyncCallbackE0001 START'); + await Utils.sleep(2000); + asyncCallbackTest(asyncCallback); + done(); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0002 + * @tc.name testBusinessError0002 + * @tc.desic aceBusinessErrorEtsTest0001 + */ + it('testBusinessError0002', 0, async function (done) { + console.info('basicTest testBusinessError0002 START'); + await Utils.sleep(2000); + businessErrorTest(businessCallback); + done(); + }); + }); +} \ No newline at end of file diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/color.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/color.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b7426766b35ee5196a0da2c896b58163510f942 --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/color.test.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" +import Utils from './Utils.ets' + +export default function colorEnumJsunit() { + describe('colorEnumJsunit', function () { + beforeEach(async function (done) { + console.info("color beforeEach start"); + let options = { + uri: 'pages/color', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get color state success " + JSON.stringify(pages)); + if (!("color" == pages.name)) { + console.info("get color state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(1000); + console.info("push color page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push color page error: " + err); + } + done() + }); + + afterEach(async function () { + await Utils.sleep(1000); + console.info("colorEnumTest after each called"); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0001 + * @tc.name testcolorTransparent0001 + * @tc.desic acecolorTransparentEtsTest0001 + */ + it('testcolorTransparent0001', 0, async function (done) { + console.info('colorEnumTest testcolorTransparent0001 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('Transparent'); + console.info("[testcolorTransparent0001] component width strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('Text'); + console.info("[testcolorTransparent0001] fontColor value :" + obj.$attrs.fontColor); + expect(obj.$attrs.fontColor).assertEqual("#FF000000"); + done(); + }); + }) +} diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/common.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/common.test.ets index 5d22eb6ecea74a58866eb72ff814ddad1007d963..95f35a18b1919ee687d3e0c145732f332575aea3 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/common.test.ets +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/common.test.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +import events_emitter from '@ohos.events.emitter'; import router from '@system.router'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" import Utils from './Utils.ets' @@ -47,124 +48,199 @@ export default function commonColorModeJsunit() { /* * @tc.number SUB_ACE_BASIC_ETS_API_0011 - * @tc.name testcommonColorMode0011 + * @tc.name testCommonColorMode0011 * @tc.desic acecommonColorModeEtsTest0011 */ - it('testcommonColorMode0011', 0, async function (done) { - console.info('commonColorMode testcommonColorMode0011 START'); + it('testCommonColorMode0011', 0, async function (done) { + console.info('commonColorMode testCommonColorMode0011 START'); await Utils.sleep(2000); let strJson = getInspectorByKey('ThinText'); - console.info("[testcommonColorMode0011] component textAlign strJson:" + strJson); + console.info("[testCommonColorMode0011] component textAlign strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Text'); expect(obj.$attrs.backgroundBlurStyle).assertEqual(undefined); - console.info("[testcommonColorMode0011] backgroundBlurStyle value :" + obj.$attrs.backgroundBlurStyle); + console.info("[testCommonColorMode0011] backgroundBlurStyle value :" + obj.$attrs.backgroundBlurStyle); done(); }); /* * @tc.number SUB_ACE_BASIC_ETS_API_0012 - * @tc.name testcommonColorMode0012 + * @tc.name testCommonColorMode0012 * @tc.desic acecommonColorModeEtsTest0012 */ - it('testcommonColorMode0012', 0, async function (done) { - console.info('commonColorMode testcommonColorMode0012 START'); + it('testCommonColorMode0012', 0, async function (done) { + console.info('commonColorMode testCommonColorMode0012 START'); await Utils.sleep(2000); let strJson = getInspectorByKey('ThickText'); - console.info("[testcommonColorMode0012] component textAlign strJson:" + strJson); + console.info("[testCommonColorMode0012] component textAlign strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Text'); expect(obj.$attrs.backgroundBlurStyle).assertEqual(undefined); - console.info("[testcommonColorMode0012] backgroundBlurStyle value :" + obj.$attrs.backgroundBlurStyle); + console.info("[testCommonColorMode0012] backgroundBlurStyle value :" + obj.$attrs.backgroundBlurStyle); done(); }); /* * @tc.number SUB_ACE_BASIC_ETS_API_00017 - * @tc.name testcommonMiddle0001 + * @tc.name testCommonMiddle0001 * @tc.desic acecommonMiddleEtsTest0001 */ - it('testcommonMiddle0001', 0, async function (done) { - console.info('commonMiddle testcommonMiddle0001 START'); + it('testCommonMiddle0001', 0, async function (done) { + console.info('commonMiddle testCommonMiddle0001 START'); await Utils.sleep(2000); let strJson = getInspectorByKey('middleText'); - console.info("[testcommonMiddle0001] component textAlign strJson:" + strJson); + console.info("[testCommonMiddle0001] component textAlign strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Text'); - console.info("[testcommonMiddle0001] alignRules value :" + obj.$attrs.alignRules); + console.info("[testCommonMiddle0001] alignRules value :" + obj.$attrs.alignRules); expect(obj.$attrs.alignRules).assertEqual(undefined); - console.info("[testcommonMiddle0001] alignRules value :" + obj.$attrs.alignRules); + console.info("[testCommonMiddle0001] alignRules value :" + obj.$attrs.alignRules); done(); }); /* * @tc.number SUB_ACE_BASIC_ETS_API_00018 - * @tc.name testcommonOutset0001 + * @tc.name testCommonOutset0001 * @tc.desic acecommonOutsetEtsTest0001 */ - it('testcommonOutset0001', 0, async function (done) { - console.info('commonOutset testcommonOutset0001 START'); + it('testCommonOutset0001', 0, async function (done) { + console.info('commonOutset testCommonOutset0001 START'); await Utils.sleep(2000); let strJson = getInspectorByKey('outsetText'); - console.info("[testcommonOutset0001] component textAlign strJson:" + strJson); + console.info("[testCommonOutset0001] component textAlign strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Text'); - console.info("[testcommonOutset0001] borderImage value :" + obj.$attrs.borderImage); + console.info("[testCommonOutset0001] borderImage value :" + obj.$attrs.borderImage); expect(obj.$attrs.borderImage).assertEqual(undefined); - console.info("[testcommonOutset0001] borderImage value :" + obj.$attrs.borderImage); + console.info("[testCommonOutset0001] borderImage value :" + obj.$attrs.borderImage); done(); }); /* * @tc.number SUB_ACE_BASIC_ETS_API_00019 - * @tc.name testcommonRepeat0001 + * @tc.name testCommonRepeat0001 * @tc.desic acecommonRepeatEtsTest0001 */ - it('testcommonRepeat0001', 0, async function (done) { - console.info('commonRepeat testcommonRepeat0001 START'); + it('testCommonRepeat0001', 0, async function (done) { + console.info('commonRepeat testCommonRepeat0001 START'); await Utils.sleep(2000); let strJson = getInspectorByKey('RepeatText'); - console.info("[testcommonRepeat0001] component textAlign strJson:" + strJson); + console.info("[testCommonRepeat0001] component textAlign strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Text'); expect(obj.$attrs.borderImage).assertEqual(undefined); - console.info("[testcommonOutset0001] borderImage value :" + obj.$attrs.borderImage); + console.info("[testCommonOutset0001] borderImage value :" + obj.$attrs.borderImage); done(); }); /* * @tc.number SUB_ACE_BASIC_ETS_API_00020 - * @tc.name testcommonSpace0001 + * @tc.name testCommonSpace0001 * @tc.desic acecommonSpaceEtsTest0001 */ - it('testcommonSpace0001', 0, async function (done) { - console.info('commonSpace testcommonSpace0001 START'); + it('testCommonSpace0001', 0, async function (done) { + console.info('commonSpace testCommonSpace0001 START'); await Utils.sleep(2000); let strJson = getInspectorByKey('SpaceText'); - console.info("[testcommonSpace0001] component textAlign strJson:" + strJson); + console.info("[testCommonSpace0001] component textAlign strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Text'); expect(obj.$attrs.borderImage).assertEqual(undefined); - console.info("[testcommonSpace0001] borderImage value :" + obj.$attrs.borderImage); + console.info("[testCommonSpace0001] borderImage value :" + obj.$attrs.borderImage); done(); }); /* * @tc.number SUB_ACE_BASIC_ETS_API_00021 - * @tc.name testcommonSlice0001 + * @tc.name testCommonSlice0001 * @tc.desic acecommonSliceEtsTest0001 */ - it('testcommonSlice0001', 0, async function (done) { - console.info('commonSlice testcommonSlice0001 START'); + it('testCommonSlice0001', 0, async function (done) { + console.info('commonSlice testCommonSlice0001 START'); await Utils.sleep(2000); let strJson = getInspectorByKey('sliceText'); - console.info("[testcommonSlice0001] component textAlign strJson:" + strJson); + console.info("[testCommonSlice0001] component textAlign strJson:" + strJson); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Text'); - console.info("[testcommonSlice0001] borderImage value :" + obj.$attrs.borderImage); + console.info("[testCommonSlice0001] borderImage value :" + obj.$attrs.borderImage); expect(obj.$attrs.borderImage).assertEqual(undefined); - console.info("[testcommonSlice0001] borderImage value :" + obj.$attrs.borderImage); + console.info("[testCommonSlice0001] borderImage value :" + obj.$attrs.borderImage); done(); }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_00022 + * @tc.name testCommonArea0001 + * @tc.desic acecommonAreaEtsTest0001 + */ + it('testCommonArea0001', 0, async function (done) { + console.info('commonSlice testCommonArea0001 START'); + await Utils.sleep(500); + try { + var innerEvent = { + eventId: 60312, + priority: events_emitter.EventPriority.LOW + } + var callback = (eventData) => { + console.info("testCommonArea0001 get event state result is: " + JSON.stringify(eventData)); + expect(eventData.data.STATUS).assertEqual(320); + done(); + } + console.info("testCommonArea0001 click result is: " + JSON.stringify(sendEventByKey('areaText', 10, ""))); + events_emitter.on(innerEvent, callback); + } catch (err) { + console.info("testCommonArea0001 on click err : " + JSON.stringify(err)); + } + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_00023 + * @tc.name testCommonTouches0001 + * @tc.desic acecommonTouchesEtsTest0001 + */ + it('testCommonTouches0001', 0, async function (done) { + console.info('commonSlice testCommonTouches0001 START'); + await Utils.sleep(500); + try { + var innerEvent = { + eventId: 60313, + priority: events_emitter.EventPriority.LOW + } + var callback = (eventData) => { + console.info("testCommonTouches0001 get event state result is: " + JSON.stringify(eventData)); + expect(eventData.data.STATUS).assertEqual(undefined); + done(); + } + console.info("testCommonTouches0001 click result is: " + JSON.stringify(sendEventByKey('touchesText', 10, ""))); + events_emitter.on(innerEvent, callback); + } catch (err) { + console.info("testCommonTouches0001 on click err : " + JSON.stringify(err)); + } + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_00024 + * @tc.name testCommonChangedTouches0001 + * @tc.desic acecommonTouchesEtsTest0001 + */ + it('testCommonChangedTouches0001', 0, async function (done) { + console.info('commonSlice testCommonChangedTouches0001 START'); + await Utils.sleep(500); + try { + var innerEvent = { + eventId: 60314, + priority: events_emitter.EventPriority.LOW + } + var callback = (eventData) => { + console.info("testCommonChangedTouches0001 get event state result is: " + JSON.stringify(eventData)); + expect(eventData.data.STATUS).assertEqual(undefined); + done(); + } + console.info("changedTouches0001 click is: " + JSON.stringify(sendEventByKey('changedTouchesText', 10, ""))); + events_emitter.on(innerEvent, callback); + } catch (err) { + console.info("testCommonChangedTouches0001 on click err : " + JSON.stringify(err)); + } + }); }) } diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/configuration.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/configuration.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..db992bd890dffdc7a3a304a04390b2a76e2a4122 --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/configuration.test.ets @@ -0,0 +1,52 @@ +// @ts-nocheck +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import configuration from '@system.configuration'; +import router from '@system.router'; +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" +import events_emitter from '@ohos.events.emitter'; +import Utils from './Utils.ets' + +export default function configurationApiTest() { + describe('configurationApiTest', function () { + beforeEach(async function (done) { + await Utils.sleep(1000); + console.info("appVersionCode after each called"); + }); + + afterEach(async function () { + await Utils.sleep(1000); + console.info("appVersionCode after each called"); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0001 + * @tc.name colorMode001 + * @tc.desic aceColorMode001EtsTest0001 + */ + it('colorMode001', 0, async function (done) { + console.info('colorMode001 test START'); + const localeInfo = configuration.getLocale(); + console.info("[configuration.getLocale] localeInfo: " + JSON.stringify(localeInfo)); + console.info("[configuration.getLocale] colorMode: " + localeInfo.colorMode); + console.info("[configuration.getLocale] fontScale: " + localeInfo.fontScale); + expect(localeInfo.colorMode).assertEqual('COLOR_MODE_LIGHT'); + expect(localeInfo.fontScale).assertEqual('ltr'); + console.info('testConfigurationGetLocale END'); + done(); + }); + }) +} diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/hitTestMode.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/hitTestMode.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..51a791f94b0b5acd1f8909958b002aea1280e13a --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/hitTestMode.test.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" +import Utils from './Utils.ets' + +export default function hitTestModeJsunit() { + describe('hitTestModeJsunit', function () { + beforeEach(async function (done) { + console.info("hitTestMode beforeEach start"); + let options = { + uri: 'pages/hitTestMode', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get hitTestMode state success " + JSON.stringify(pages)); + if (!("hitTestMode" == pages.name)) { + console.info("get hitTestMode state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push hitTestMode page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push hitTestMode page error: " + err); + } + done() + }); + + afterEach(async function () { + await Utils.sleep(1000); + console.info("hitTestModeTest after each called"); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0002 + * @tc.name testhitTestMode0002 + * @tc.desic acehitTestModelEtsTest0002 + */ + it('testhitTestMode0002', 0, async function (done) { + console.info('hitTestMode testhitTestMode0002 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('Block'); + console.info("[testhitTestMode0002] component width strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('Stack'); + console.info("[testhitTestMode0002] hitTestBehavior value :" + obj.$attrs.hitTestBehavior); + expect(obj.$attrs.hitTestBehavior).assertEqual(undefined); + done(); + }); + }) +} diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/list_item_group.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/list_item_group.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1acde951290c8ccca89fe9ab153ea649d72b4c4f --- /dev/null +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/list_item_group.test.ets @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import events_emitter from '@ohos.events.emitter'; +import router from '@system.router'; +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" +import Utils from './Utils.ets' + +export default function list_item_groupJsunit() { + describe('list_item_groupJsunit', function () { + beforeAll(async function (done) { + console.info("flex beforeEach start"); + let options = { + uri: 'pages/list_item_group', + } + try { + router.clear(); + let pages = router.getState(); + console.info("get list_item_group state success " + JSON.stringify(pages)); + if (!("list_item" == pages.name)) { + console.info("get list_item_group state success " + JSON.stringify(pages.name)); + let result = await router.push(options); + await Utils.sleep(2000); + console.info("push list_item_group page success " + JSON.stringify(result)); + } + } catch (err) { + console.error("push list_item_group page error: " + err); + } + done() + }); + + afterEach(async function () { + await Utils.sleep(1000); + console.info("list_item_group after each called"); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0001 + * @tc.name testlist_itemOnSelect0001 + * @tc.desic acelist_itemOnSelectEtsTest0001 + */ + it('testlist_item_group0001', 0, async function (done) { + console.info('testcase testlist_item_group0001 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('Mon'); + console.info("[testlist_item_group0001] component state strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('ListItemGroup'); + console.info("[testlist_item_group0001] editable value :" + obj.$type); + done(); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0002 + * @tc.name testlist_itemOnSelect0002 + * @tc.desic acelist_itemOnSelectEtsTest0002 + */ + it('testlist_item_group0002', 0, async function (done) { + console.info('testcase testlist_item_group0002 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('Tues'); + console.info("[testlist_item_group0002] component border strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('ListItemGroup'); + console.info("[testlist_item_group0002] selectable value :" + obj.$type); + done(); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0002 + * @tc.name testlist_itemOnSelect0003 + * @tc.desic acelist_itemOnSelectEtsTest0002 + */ + it('testlist_item_group0003', 0, async function (done) { + console.info('testcase testlist_item_group0003 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('Wens'); + console.info("[testlist_item_group0003] component border strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('ListItemGroup'); + expect(obj.$attrs.header).assertNotEqual(undefined); + console.info("[testlist_itemOnSelect0003] hear value :" + obj.$attrs.header); + done(); + }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0004 + * @tc.name testlist_itemSwipeAction0004 + * @tc.desic acelist_itemSwipeActionEtsTest0004 + */ + it('testlist_item_group0004', 0, async function (done) { + console.info('testcase testlist_item_group0004 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('Thurs'); + console.info("[testlist_item_group0004] component border strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('ListItemGroup'); + expect(obj.$attrs.rooter).assertNotEqual(undefined); + console.info("[testlist_item_group0004] hear value :" + obj.$attrs.rooter); + done(); + }); + }) +} diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/remoteWindow.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/remoteWindow.test.ets index 1dc2d8ac010da8423da0e17bc3d84aa260bdb07c..0c2d49b0d65648a3603e0a2bb64db1d3ad610e4a 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/remoteWindow.test.ets +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/remoteWindow.test.ets @@ -164,8 +164,6 @@ export default function remoteWindowJsunit() { done(); }); - - /* * @tc.number SUB_ACE_BASIC_ETS_API_0009 * @tc.name testRemoteWindow0009 @@ -216,5 +214,22 @@ export default function remoteWindowJsunit() { console.info("[testRemoteWindow0011] indicatorStyle value :" + obj.$attrs.indicatorStyle); done(); }); + + /* + * @tc.number SUB_ACE_BASIC_ETS_API_0012 + * @tc.name testRemoteWindow0011 + * @tc.desic aceRemoteWindowEtsTest0011 + */ + it('testRemoteWindow0012', 0, async function (done) { + console.info('RemoteWindow testRemoteWindow0012 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('remoteWindow'); + console.info("[testRemoteWindow0012] component textAlign strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$attrs.target).assertNotEqual(undefined); + expect(obj.$attrs.target.missionId).assertNotEqual(undefined); + console.info("[testRemoteWindow0012] missionId value :" + obj.$attrs.target.missionId); + done(); + }); }) } diff --git a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/text_input.test.ets b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/text_input.test.ets index 71523e4c4752cf6dd03c381b3e78d90a0beba174..78f6960769179cd2dfc27eef02627e0b749b1bb2 100644 --- a/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/text_input.test.ets +++ b/arkui/ace_ets_component_attrlack/entry/src/main/ets/test/text_input.test.ets @@ -61,5 +61,29 @@ export default function text_inputPhoneNumberJsunit() { console.info("[testtext_inputPhoneNumber0001] type value :" + obj.$attrs.type); done(); }); + + it('testtextInputStyle0001', 0, async function (done) { + console.info('textInputStyle testtextInputStyle0001 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('textInput1'); + console.info("[testtextInputStyle0001] strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('TextInput'); + expect(obj.$attrs.style).assertEqual('TextInputStyle.Default'); + console.info("[testtextInputStyle0001] textInput1 InputStyle value :" + obj.$attrs.style); + done(); + }); + + it('testtextInputStyle0002', 0, async function (done) { + console.info('textInputStyle testtextInputStyle0002 START'); + await Utils.sleep(2000); + let strJson = getInspectorByKey('textInput2'); + console.info("[testtextInputStyle0002] strJson:" + strJson); + let obj = JSON.parse(strJson); + expect(obj.$type).assertEqual('TextInput'); + expect(obj.$attrs.style).assertEqual('TextInputStyle.Inline'); + console.info("[testtextInputStyle0002] textInput2 inputStyle value :" + obj.$attrs.style); + done(); + }); }) }