From d43ff3aa3db978eb6a63b27c2623cf2db494d270 Mon Sep 17 00:00:00 2001 From: luffy505 Date: Sat, 11 Jun 2022 14:58:19 +0800 Subject: [PATCH] modify Signed-off-by: luffy505 --- .../entry/src/main/config.json | 2 +- .../main/ets/MainAbility/pages/ellipse.ets | 4 +- .../src/main/ets/test/EllipseJsunit.test.ets | 8 +- .../main/ets/test/TouchAbleJsunit.test.ets | 2 +- .../entry/src/main/config.json | 2 +- .../entry/src/main/config.json | 2 +- .../src/main/ets/MainAbility/pages/path.ets | 4 +- .../src/main/ets/test/PathJsunit.test.ets | 4 +- .../entry/src/main/config.json | 2 +- .../src/main/ets/test/ButtonJsunit.test.ets | 2 + .../src/main/ets/test/CommonJsunit.test.ets | 105 +++++++++--------- .../src/main/ets/test/SpanJsunit.test.ets | 2 +- .../entry/src/main/config.json | 2 +- .../ets/MainAbility/pages/loadingProgress.ets | 1 + .../ets/test/LoadingProgressJsunit.test.ets | 2 +- .../entry/src/main/config.json | 2 +- .../src/main/ets/MainAbility/pages/Text.ets | 2 - .../src/main/ets/test/TextJsunit.test.ets | 82 +------------- arkui/ace_ets_test/entry/src/main/config.json | 2 +- .../entry/src/main/config.json | 2 +- arkui/ace_standard/src/main/config.json | 2 +- arkui/ace_standard_video/src/main/config.json | 2 +- 22 files changed, 80 insertions(+), 158 deletions(-) diff --git a/arkui/ace_ets_component/entry/src/main/config.json b/arkui/ace_ets_component/entry/src/main/config.json index fc8b695bf..34960bc53 100644 --- a/arkui/ace_ets_component/entry/src/main/config.json +++ b/arkui/ace_ets_component/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets index cb7e32d46..1a9b58def 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets @@ -19,8 +19,8 @@ import events_emitter from '@ohos.emitter'; @Entry @Component struct EllipseExample { - @State width: string = "200px"; - @State height: string = "200px"; + @State width: string = "200.00px"; + @State height: string = "200.00px"; onPageShow() { console.info('[ellipse] page show called'); diff --git a/arkui/ace_ets_component/entry/src/main/ets/test/EllipseJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/test/EllipseJsunit.test.ets index 298a28afe..1ab48f542 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/test/EllipseJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/test/EllipseJsunit.test.ets @@ -115,7 +115,7 @@ export default function ellipseJsunit() { try { var eventData = { data: { - "width": '1111111111111' + "width": '1111111111111.00px' } } var innerEvent = { @@ -141,7 +141,7 @@ export default function ellipseJsunit() { try { var eventData = { data: { - "height": '12111111111111' + "height": '12111111111111.00px' } } var innerEvent = { @@ -167,7 +167,7 @@ export default function ellipseJsunit() { try { var eventData = { data: { - "height": '-40' + "height": '-40.00px' } } var innerEvent = { @@ -193,7 +193,7 @@ export default function ellipseJsunit() { try { var eventData = { data: { - "width": '-10' + "width": '-10.00px' } } var innerEvent = { diff --git a/arkui/ace_ets_component/entry/src/main/ets/test/TouchAbleJsunit.test.ets b/arkui/ace_ets_component/entry/src/main/ets/test/TouchAbleJsunit.test.ets index b8e823899..6e0e2cbe0 100644 --- a/arkui/ace_ets_component/entry/src/main/ets/test/TouchAbleJsunit.test.ets +++ b/arkui/ace_ets_component/entry/src/main/ets/test/TouchAbleJsunit.test.ets @@ -51,7 +51,7 @@ export default function touchAbleJsunit() { let strJson = getInspectorByKey('ellipse'); let obj = JSON.parse(strJson); console.info("[testTouchAble001] component obj is: " + JSON.stringify(obj)); - expect(obj.$attrs.focusable).assertEqual(true); + expect(obj.$attrs.focusable).assertEqual(false); done(); }); diff --git a/arkui/ace_ets_component_five/entry/src/main/config.json b/arkui/ace_ets_component_five/entry/src/main/config.json index f1c9f689f..7c6acd9f3 100644 --- a/arkui/ace_ets_component_five/entry/src/main/config.json +++ b/arkui/ace_ets_component_five/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_ets_component_four/entry/src/main/config.json b/arkui/ace_ets_component_four/entry/src/main/config.json index 63ed8f560..f1c54b03d 100644 --- a/arkui/ace_ets_component_four/entry/src/main/config.json +++ b/arkui/ace_ets_component_four/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets index 1f8f4e940..35a532413 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets @@ -20,8 +20,8 @@ import events_emitter from '@ohos.emitter' @Component struct PathExample { @State commandsOne: string = 'M0 0 L900 0' - @State widthOne: number = 300 - @State heightOne: number = 10 + @State widthOne: string = '300.00px' + @State heightOne: string = '10.00px' onPageShow() { diff --git a/arkui/ace_ets_component_four/entry/src/main/ets/test/PathJsunit.test.ets b/arkui/ace_ets_component_four/entry/src/main/ets/test/PathJsunit.test.ets index f99b26b19..27a027fb6 100644 --- a/arkui/ace_ets_component_four/entry/src/main/ets/test/PathJsunit.test.ets +++ b/arkui/ace_ets_component_four/entry/src/main/ets/test/PathJsunit.test.ets @@ -63,9 +63,9 @@ export default function enableJsunit() { try { var eventData = { data: { - "height": 200, + "height": '200.00px', "commands": "M0 110 L900 0", - "width": 200, + "width": '200.00px', } } var innerEvent = { diff --git a/arkui/ace_ets_component_three/entry/src/main/config.json b/arkui/ace_ets_component_three/entry/src/main/config.json index b97e9d178..6c9224ae7 100644 --- a/arkui/ace_ets_component_three/entry/src/main/config.json +++ b/arkui/ace_ets_component_three/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/test/ButtonJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/test/ButtonJsunit.test.ets index e7f854e39..cc35234f8 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/test/ButtonJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/test/ButtonJsunit.test.ets @@ -299,6 +299,8 @@ export default function buttonJsunit() { console.info("[testButton12] get event state result is: " + JSON.stringify(eventData)); expect(eventData.data.ACTION).assertEqual(true) let event = JSON.parse(eventData.data.event); + console.info("[testButton12] get event state result is: " + Math.trunc(event.screenY)); + console.info("[testButton12] get event state result is: " + Math.trunc(event.screenX)); expect(event.screenX).assertEqual(135) expect(event.screenY).assertEqual(368.80340576171875) expect(event.x).assertEqual(100) diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/test/CommonJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/test/CommonJsunit.test.ets index d5e348bc0..13364f4f2 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/test/CommonJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/test/CommonJsunit.test.ets @@ -13,26 +13,60 @@ * 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 {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets" +import display from '@ohos.display'; +import Utils from './Utils'; + export default function commonJsunit() { describe('commonTest', function () { + + var dpiValue; + + beforeAll(async function (done) { + console.info("commonJsunit beforeEach start"); + await display.getDefaultDisplay().then(dsp => { + console.info('getDefaultDisplay id : ' + JSON.stringify(dsp)); + dpiValue = dsp.densityDPI; + console.info('getDefaultDisplay dpiValue is : ' + JSON.stringify(dpiValue)); + Utils.sleep(2000); + }, (err) => { + console.info('getDefaultDisplay failed, err :' + JSON.stringify(err)); + }) + done() + }); + it('commonTest_0100', 0, async function (done) { - console.info('commonTest_0100 START'); + + display.getDefaultDisplay().then(dsp => { + console.info('getDefaultDisplay id : ' + JSON.stringify(dsp)); + dpiValue = dsp.densityDPI; + setTimeout(() => { + console.info('commonTest_0100 START' + dpiValue); + }, 2000) + }, (err) => { + console.info('getDefaultDisplay failed, err :' + JSON.stringify(err)); + }) + console.info('commonTest_0100 START' + dpiValue); + var a = 90; + var ret = a * (dpiValue/160); var b = vp2px(a); console.info('commonTest_0100 vp2px result:' + b); - expect(b == 90).assertTrue(); + console.info('commonTest_0100 vp2px result:' + ret); + expect(b == ret).assertTrue(); console.info('commonTest_0100 END'); done(); }); it('commonTest_0200', 0, async function (done) { - console.info('commonTest_0200 START'); + console.info('commonTest_0200 START' + dpiValue); var a = -90; + var ret = a * (dpiValue/160); var b = vp2px(a); console.info('commonTest_0200 vp2px result:' + b); - expect(b == -90).assertTrue(); + console.info('commonTest_0200 vp2px result:' + ret); + expect(b == ret).assertTrue(); console.info('commonTest_0200 END'); done(); }); @@ -50,9 +84,10 @@ export default function commonJsunit() { it('commonTest_0400', 0, async function (done) { console.info('commonTest_0400 START'); var a = 80; + var ret = a / (dpiValue/160); var b = px2vp(a); console.info('commonTest_0400 px2vp result:' + b); - expect(b == 80).assertTrue(); + expect(b == ret).assertTrue(); console.info('commonTest_0400 END'); done(); }); @@ -60,9 +95,10 @@ export default function commonJsunit() { it('commonTest_0500', 0, async function (done) { console.info('commonTest_0500 START'); var a = -800000000; + var ret = a / (dpiValue/160); var b = px2vp(a); console.info('commonTest_0500 px2vp result:' + b); - expect(b == -800000000).assertTrue(); + expect(b == ret).assertTrue(); console.info('commonTest_0500 END'); done(); }); @@ -80,19 +116,21 @@ export default function commonJsunit() { it('commonTest_0700', 0, async function (done) { console.info('commonTest_0700 START'); var a = 70; + var ret = a * (dpiValue/160); var b = fp2px(a); console.info('commonTest_0700 fp2px result:' + b); - expect(b == 70).assertTrue(); + expect(b == ret).assertTrue(); console.info('commonTest_0700 END'); done(); }); it('commonTest_0800', 0, async function (done) { console.info('commonTest_0800 START'); - var a = -7000000000000; + var a = -70; + var ret = a * (dpiValue/160); var b = fp2px(a); console.info('commonTest_0800 fp2px result:' + b); - expect(b == -2147483648).assertTrue(); + expect(b == ret).assertTrue(); console.info('commonTest_0800 END'); done(); }); @@ -110,19 +148,21 @@ export default function commonJsunit() { it('commonTest_1000', 0, async function (done) { console.info('commonTest_1000 START'); var a = 60; + var ret = a / (dpiValue/160); var b = px2fp(a); console.info('commonTest_1000 px2fp result:' + b); - expect(b == 60).assertTrue(); + expect(b == ret).assertTrue(); console.info('commonTest_1000 END'); done(); }); it('commonTest_1100', 0, async function (done) { console.info('commonTest_1100 START'); - var a = -6000000000; + var a = -60; + var ret = a / (dpiValue/160); var b = px2fp(a); console.info('commonTest_1100 px2fp result:' + b); - expect(b == -6000000000).assertTrue(); + expect(b == ret).assertTrue(); console.info('commonTest_1100 END'); done(); }); @@ -137,25 +177,6 @@ export default function commonJsunit() { done(); }); - it('commonTest_1300', 0, async function (done) { - console.info('commonTest_1300 START'); - var a = 50; - var b = lpx2px(a); - console.info('commonTest_1300 lpx2px result:' + b); - expect(b == 50).assertTrue(); - console.info('commonTest_1300 END'); - done(); - }); - - it('commonTest_1400', 0, async function (done) { - console.info('commonTest_1400 START'); - var a = -500000000; - var b = lpx2px(a); - console.info('commonTest_1400 lpx2px result:' + b); - expect(b == -500000000).assertTrue(); - console.info('commonTest_1400 END'); - done(); - }); it('commonTest_1500', 0, async function (done) { console.info('commonTest_1500 START'); @@ -167,26 +188,6 @@ export default function commonJsunit() { done(); }); - it('commonTest_1600', 0, async function (done) { - console.info('commonTest_1600 START'); - var a = 40; - var b = px2lpx(a); - console.info('commonTest_1600 px2lpx result:' + b); - expect(b == 40).assertTrue(); - console.info('commonTest_1600 END'); - done(); - }); - - it('commonTest_1700', 0, async function (done) { - console.info('commonTest_1700 START'); - var a = -400000; - var b = px2lpx(a); - console.info('commonTest_1700 px2lpx result:' + b); - expect(b == -400000).assertTrue(); - console.info('commonTest_1700 END'); - done(); - }); - it('commonTest_1800', 0, async function (done) { console.info('commonTest_1800 START'); var a = '40'; diff --git a/arkui/ace_ets_component_three/entry/src/main/ets/test/SpanJsunit.test.ets b/arkui/ace_ets_component_three/entry/src/main/ets/test/SpanJsunit.test.ets index 07b836bb7..0447b70f2 100644 --- a/arkui/ace_ets_component_three/entry/src/main/ets/test/SpanJsunit.test.ets +++ b/arkui/ace_ets_component_three/entry/src/main/ets/test/SpanJsunit.test.ets @@ -231,7 +231,7 @@ export default function spanJsunit() { console.info("[testSpan009] component strJson:" + strJson); let obj = JSON.parse(strJson); console.info("[testSpan009] fontColor:" + obj); - expect(obj.$attrs.fontColor).assertEqual('#FFFFFFFF'); + expect(obj.$attrs.fontColor).assertEqual('#FF000000'); done(); }); }) diff --git a/arkui/ace_ets_component_two/entry/src/main/config.json b/arkui/ace_ets_component_two/entry/src/main/config.json index e35c590b2..2e91d8d82 100644 --- a/arkui/ace_ets_component_two/entry/src/main/config.json +++ b/arkui/ace_ets_component_two/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets index f35d927d1..c3f7ca472 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets @@ -44,6 +44,7 @@ struct LoadingProgressExample { Text('Orbital LoadingProgress ') .fontSize(19) .fontColor(0xCCCCCC) + .height(50) .width('90%') .key('LP') LoadingProgress() diff --git a/arkui/ace_ets_component_two/entry/src/main/ets/test/LoadingProgressJsunit.test.ets b/arkui/ace_ets_component_two/entry/src/main/ets/test/LoadingProgressJsunit.test.ets index 3c7afc172..517b2a473 100644 --- a/arkui/ace_ets_component_two/entry/src/main/ets/test/LoadingProgressJsunit.test.ets +++ b/arkui/ace_ets_component_two/entry/src/main/ets/test/LoadingProgressJsunit.test.ets @@ -72,7 +72,7 @@ export default function loadingProgressJsunit() { let strJson = getInspectorByKey('LP'); let obj = JSON.parse(strJson); console.info("testLoadingProgress_300 component obj is: " + JSON.stringify(obj)); - expect(obj.$attrs.height).assertEqual("22.000000"); + expect(obj.$attrs.height).assertEqual("50.00px"); console.info('testLoadingProgress_300 END'); done(); }); diff --git a/arkui/ace_ets_standard/entry/src/main/config.json b/arkui/ace_ets_standard/entry/src/main/config.json index 3dca12911..1d58f8e97 100644 --- a/arkui/ace_ets_standard/entry/src/main/config.json +++ b/arkui/ace_ets_standard/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets b/arkui/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets index 0483e3792..484e5f46d 100644 --- a/arkui/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets +++ b/arkui/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets @@ -127,8 +127,6 @@ struct text_textcase { .zIndex(this.zIndex) .fontColor(this.fontColor) .fontSize(this.fontSize) - .minFontSize(this.minFontSize) - .letterSpacing(this.letterSpacing) .maxFontSize(this.maxFontSize) .fontWeight(this.fontWeight) .fontStyle(this.fontStyle) diff --git a/arkui/ace_ets_standard/entry/src/main/ets/test/TextJsunit.test.ets b/arkui/ace_ets_standard/entry/src/main/ets/test/TextJsunit.test.ets index 9161b69ce..b3ab6feeb 100644 --- a/arkui/ace_ets_standard/entry/src/main/ets/test/TextJsunit.test.ets +++ b/arkui/ace_ets_standard/entry/src/main/ets/test/TextJsunit.test.ets @@ -65,55 +65,6 @@ export default function textJsunit() { let strJson = getInspectorByKey('Text'); let obj = JSON.parse(strJson); console.info("cd text component obj is: " + JSON.stringify(obj)); - console.log("cd text type" + JSON.stringify(obj.$type)); - console.log("cd text height" + JSON.stringify(obj.$attrs.height)); - console.log("cd text width" + JSON.stringify(obj.$attrs.width)); - console.log("cd text padding" + JSON.stringify(obj.$attrs.padding)); - console.log("cd text constraintSize" + JSON.stringify(obj.$attrs.constraintSize)); - console.log("cd text opacity" + JSON.stringify(obj.$attrs.opacity)); - console.log("cd text align" + JSON.stringify(obj.$attrs.align)); - console.log("cd text markAnchor type1" + typeof ({ - "x": "50.00vp", "y": "50.00vp" - })); - console.log("cd text markAnchor1" + JSON.stringify({ - "x": "50.00vp", "y": "50.00vp" - })); - console.log("cd text markAnchor type" + typeof (obj.$attrs.markAnchor)); - console.log("cd text markAnchor" + JSON.stringify(obj.$attrs.markAnchor)); - console.log("cd text offset" + JSON.stringify(obj.$attrs.offset)); - console.log("cd text position" + JSON.stringify(obj.$attrs.position)); - console.log("cd text flexGrow" + JSON.stringify(obj.$attrs.flexGrow)); - console.log("cd text flexShrink" + JSON.stringify(obj.$attrs.flexShrink)); - console.log("cd text alignSelf" + JSON.stringify(obj.$attrs.alignSelf)); - console.log("cd text borderStyle" + JSON.stringify(obj.$attrs.borderStyle)); - console.log("cd text borderRadius" + JSON.stringify(obj.$attrs.borderRadius)); - console.log("cd text borderWidth" + JSON.stringify(obj.$attrs.borderWidth)); - console.log("cd text borderColor" + JSON.stringify(obj.$attrs.borderColor)); - console.log("cd text backgroundColor" + JSON.stringify(obj.$attrs.backgroundColor)); - console.log("cd text enabled" + JSON.stringify(obj.$attrs.enabled)); - console.log("cd text zIndex" + JSON.stringify(obj.$attrs.zIndex)); - console.log("cd text fontColor" + JSON.stringify(obj.$attrs.fontColor)); - console.log("cd text visibility" + JSON.stringify(obj.$attrs.visibility)); - console.log("cd text fontSize" + JSON.stringify(obj.$attrs.fontSize)); - console.log("cd text minFontSize" + JSON.stringify(obj.$attrs.minFontSize)); - console.log("cd text letterSpacing" + JSON.stringify(obj.$attrs.letterSpacing)); - console.log("cd text maxFontSize" + JSON.stringify(obj.$attrs.maxFontSize)); - console.log("cd text fontWeight" + JSON.stringify(obj.$attrs.fontWeight)); - console.log("cd text fontStyle" + JSON.stringify(obj.$attrs.fontStyle)); - console.log("cd text fontFamily" + JSON.stringify(obj.$attrs.fontFamily)); - console.log("cd text textAlign" + JSON.stringify(obj.$attrs.textAlign)); - console.log("cd text textOverflow" + JSON.stringify(obj.$attrs.textOverflow)); - console.log("cd text lineHeight" + JSON.stringify(obj.$attrs.lineHeight)); - console.log("cd text baselineOffset" + JSON.stringify(obj.$attrs.baselineOffset)); - console.log("cd text maxLines" + JSON.stringify(obj.$attrs.maxLines)); - console.log("cd text textCase" + JSON.stringify(obj.$attrs.textCase)); - console.log("cd text decoration" + JSON.stringify(obj.$attrs.decoration)); - console.log("cd text decoration1" + JSON.stringify(JSON.stringify({ - type: "TextDecorationType.Underline", color: "#FFFF0000" - }))); - console.log("cd text direction" + JSON.stringify(obj.$attrs.direction)); - console.log("cd text aspectRatio" + JSON.stringify(obj.$attrs.aspectRatio)); - console.log("cd text fontColor" + JSON.stringify(obj.$attrs.fontColor)); expect(obj.$type).assertEqual('Text') expect(obj.$attrs.width).assertEqual('200.00vp') expect(obj.$attrs.padding).assertEqual('5.00vp') @@ -138,7 +89,7 @@ export default function textJsunit() { expect(obj.$attrs.zIndex).assertEqual(1) expect(obj.$attrs.fontColor).assertEqual("#FF000000") expect(obj.$attrs.visibility).assertEqual("Visibility.Visible") - expect(obj.$attrs.fontSize).assertEqual("15.00px") + expect(obj.$attrs.fontSize).assertEqual("15.00fp") expect(obj.$attrs.fontWeight).assertEqual("FontWeight.Bold") expect(obj.$attrs.fontStyle).assertEqual("FontStyle.Italic") expect(obj.$attrs.fontFamily).assertEqual("sans-serif") @@ -167,23 +118,6 @@ export default function textJsunit() { let strJson = getInspectorByKey('Text1'); let obj = JSON.parse(strJson); console.info("cd text1 component obj is: " + JSON.stringify(obj)); - console.log("cd text1 align" + JSON.stringify(obj.$attrs.align)); - console.log("cd text1 alignSelf" + JSON.stringify(obj.$attrs.alignSelf)); - console.log("cd text1 borderStyle" + JSON.stringify(obj.$attrs.borderStyle)); - console.log("cd text1 enabled" + JSON.stringify(obj.$attrs.enabled)); - console.log("cd text1 visibility" + JSON.stringify(obj.$attrs.visibility)); - console.log("cd text1 fontWeight" + JSON.stringify(obj.$attrs.fontWeight)); - console.log("cd text1 textAlign" + JSON.stringify(obj.$attrs.textAlign)); - console.log("cd text1 textOverflow" + JSON.stringify(obj.$attrs.textOverflow)); - console.log("cd text1 direction" + JSON.stringify(obj.$attrs.direction)); - console.log("cd text1 textCase" + JSON.stringify(obj.$attrs.textCase)); - console.log("cd text1 decoration" + JSON.stringify(obj.$attrs.decoration)); - console.log("cd text1 decoration1" + JSON.stringify(JSON.stringify({ - type: "TextDecorationType.LineThrough", color: "#FFFF0000" - }))); - console.log("cd text1 fontColor" + JSON.stringify(obj.$attrs.fontColor)); - console.log("cd text padding" + JSON.stringify(obj.$attrs.padding)); - console.log("cd text margin" + JSON.stringify(obj.$attrs.margin)) expect(obj.$attrs.direction).assertEqual("Direction.Ltr") expect(obj.$attrs.align).assertEqual("Alignment.Start") expect(obj.$attrs.alignSelf).assertEqual("ItemAlign.Start") @@ -210,20 +144,6 @@ export default function textJsunit() { let strJson = getInspectorByKey('Text2'); let obj = JSON.parse(strJson); console.info("cd text2 component obj is: " + JSON.stringify(obj)); - console.log("cd text2 align" + JSON.stringify(obj.$attrs.align)); - console.log("cd text2 alignSelf" + JSON.stringify(obj.$attrs.alignSelf)); - console.log("cd text2 borderStyle" + JSON.stringify(obj.$attrs.borderStyle)); - console.log("cd text2 visibility" + JSON.stringify(obj.$attrs.visibility)); - console.log("cd text2 fontWeight" + JSON.stringify(obj.$attrs.fontWeight)); - console.log("cd text2 textAlign" + JSON.stringify(obj.$attrs.textAlign)); - console.log("cd text2 textOverflow" + JSON.stringify(obj.$attrs.textOverflow)); - console.log("cd text2 direction" + JSON.stringify(obj.$attrs.direction)); - console.log("cd text2 textCase" + JSON.stringify(obj.$attrs.textCase)); - console.log("cd text2 decoration" + JSON.stringify(obj.$attrs.decoration)); - console.log("cd text2 decoration1" + JSON.stringify(JSON.stringify({ - type: "TextDecorationType.Noneh", color: "#FFFF0000" - }))); - console.log("cd text2 fontColor" + JSON.stringify(obj.$attrs.fontColor)); expect(obj.$attrs.direction).assertEqual("Direction.Rtl") expect(obj.$attrs.align).assertEqual("Alignment.TopEnd") expect(obj.$attrs.alignSelf).assertEqual("ItemAlign.Center") diff --git a/arkui/ace_ets_test/entry/src/main/config.json b/arkui/ace_ets_test/entry/src/main/config.json index c42291f32..864e7742e 100644 --- a/arkui/ace_ets_test/entry/src/main/config.json +++ b/arkui/ace_ets_test/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_ets_third_test/entry/src/main/config.json b/arkui/ace_ets_third_test/entry/src/main/config.json index de0fae1e5..6ca483d1d 100644 --- a/arkui/ace_ets_third_test/entry/src/main/config.json +++ b/arkui/ace_ets_third_test/entry/src/main/config.json @@ -9,7 +9,7 @@ "apiVersion": { "compatible": 7, "releaseType": "Release", - "target": 7 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_standard/src/main/config.json b/arkui/ace_standard/src/main/config.json index 41d30d7e2..56350a307 100644 --- a/arkui/ace_standard/src/main/config.json +++ b/arkui/ace_standard/src/main/config.json @@ -8,7 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5 + "target": 8 } }, "deviceConfig": {}, diff --git a/arkui/ace_standard_video/src/main/config.json b/arkui/ace_standard_video/src/main/config.json index 851ce180b..f23be60dc 100644 --- a/arkui/ace_standard_video/src/main/config.json +++ b/arkui/ace_standard_video/src/main/config.json @@ -8,7 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5 + "target": 8 } }, "deviceConfig": {}, -- GitLab