未验证 提交 7988cb83 编写于 作者: O openharmony_ci 提交者: Gitee

!4252 适配ace fail用例

Merge pull request !4252 from zhangjuan/master
...@@ -14,19 +14,18 @@ ...@@ -14,19 +14,18 @@
group("arkui") { group("arkui") {
testonly = true testonly = true
deps = [ deps = [
"ace_ets_component:AceEtsComponentTest", "ace_ets_component:ActsAceEtsComponentTest",
"ace_ets_component_five:AceEtsComponentFiveTest", "ace_ets_component_five:ActsAceEtsComponentFiveTest",
"ace_ets_component_four:AceEtsComponentFourTest", "ace_ets_component_four:ActsAceEtsComponentFourTest",
"ace_ets_component_three:AceEtsComponentThreeTest", "ace_ets_component_three:ActsAceEtsComponentThreeTest",
"ace_ets_component_two:AceEtsComponentTwoTest", "ace_ets_component_two:ActsAceEtsComponentTwoTest",
"ace_ets_dev:ActsAceDevTest", "ace_ets_dev:ActsAceDevTest",
"ace_ets_standard:ActsAceEtsStTest", "ace_ets_standard:ActsAceEtsStTest",
"ace_ets_test:ActsAceEtsTest", "ace_ets_test:ActsAceEtsTest",
"ace_ets_third_test:ActsAceEtsThirdTest", "ace_ets_third_test:ActsAceEtsThirdTest",
"ace_ets_xcomponent:ActsAceXComponentEtsTest",
#"ace_ets_xcomponent:ActsAceXComponentEtsTest", "ace_napi_test:ActsAceNapiEtsTest",
#"ace_napi_test:ActsAceNapiEtsTest", "ace_standard:ActsAceStandardTest",
"ace_standard:ace_standard_test", "ace_standard_video:ActsAceStandardVideoTest",
"ace_standard_video:ace_standard_video_test",
] ]
} }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AceEtsComponentTest") { ohos_js_hap_suite("ActsAceEtsComponentTest") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":ace_ets_component_assets", ":ace_ets_component_assets",
...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentTest") { ...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentTest") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "AceEtsComponentTest" hap_name = "ActsAceEtsComponentTest"
} }
ohos_js_assets("ace_ets_component_assets") { ohos_js_assets("ace_ets_component_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"AceEtsComponentTest.hap" "ActsAceEtsComponentTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -17,7 +17,11 @@ ...@@ -17,7 +17,11 @@
@Entry @Entry
@Component @Component
struct GlobalExample { struct GlobalExample {
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
onPageShow() { onPageShow() {
console.info("global page called")
} }
build() { build() {
......
...@@ -80,12 +80,7 @@ struct TouchExample { ...@@ -80,12 +80,7 @@ struct TouchExample {
+ '\nDistance between touch point and touch element:\nx: ' + '\nDistance between touch point and touch element:\nx: '
+ event.touches[0].x + '\n' + 'y: ' + event.touches[0].y + '\ncomponent globalPos:(' + event.touches[0].x + '\n' + 'y: ' + event.touches[0].y + '\ncomponent globalPos:('
+ event.target.area.globalPos.x + ',' + event.target.area.globalPos.y + ')\nwidth:' + event.target.area.globalPos.x + ',' + event.target.area.globalPos.y + ')\nwidth:'
+ event.target.area.width + '\nheight:' + event.target.area.height) + event.target.area.width + '\nheight:' + event.target.area.height);
console.info(this.text = 'TouchType:' + this.eventType
+ '\nDistance between touch point and touch element:\nx: '
+ event.changedTouches[0].x + '\n' + 'y: ' + event.changedTouches[0].y + '\ncomponent globalPos:('
+ event.target.area.globalPos.x + ',' + event.target.area.globalPos.y + ')\nwidth:'
+ event.target.area.width + '\nheight:' + event.target.area.height)
console.log('fang--->A') console.log('fang--->A')
try { try {
console.log('fang--->B') console.log('fang--->B')
...@@ -102,7 +97,7 @@ struct TouchExample { ...@@ -102,7 +97,7 @@ struct TouchExample {
console.log('fang--->D') console.log('fang--->D')
console.info("touchFlag start to emit action state") console.info("touchFlag start to emit action state")
events_emitter.emit(backEvent, backData) events_emitter.emit(backEvent, backData)
} catch { } catch(err) {
console.info("touchFlag emit action state err: " + JSON.stringify(err.message)) console.info("touchFlag emit action state err: " + JSON.stringify(err.message))
} }
}) })
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AceEtsComponentFiveTest") { ohos_js_hap_suite("ActsAceEtsComponentFiveTest") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":ace_ets_component_assets", ":ace_ets_component_assets",
...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentFiveTest") { ...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentFiveTest") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "AceEtsComponentFiveTest" hap_name = "ActsAceEtsComponentFiveTest"
} }
ohos_js_assets("ace_ets_component_assets") { ohos_js_assets("ace_ets_component_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"AceEtsComponentFiveTest.hap" "ActsAceEtsComponentFiveTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -168,7 +168,10 @@ export default function ohosMatrix4Jsunit() { ...@@ -168,7 +168,10 @@ export default function ohosMatrix4Jsunit() {
let strJsonNew = getInspectorByKey('rotate6'); let strJsonNew = getInspectorByKey('rotate6');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[test_OhosMatrix4_006] component objNew is: " + JSON.stringify(objNew)); console.info("[test_OhosMatrix4_006] component objNew is: " + JSON.stringify(objNew));
expect(JSON.stringify(objNew.$attrs.transform)).assertEqual('{}'); console.info("[test_OhosMatrix4_006] component transform is: " + JSON.stringify(objNew.$attrs.transform));
expect(JSON.stringify(objNew.$attrs.transform)).assertEqual('{"type":"matrix",' +
'"matrix":"0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,' +
'0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,"}');
done(); done();
}); });
}) })
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AceEtsComponentFourTest") { ohos_js_hap_suite("ActsAceEtsComponentFourTest") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":ace_ets_component_assets", ":ace_ets_component_assets",
...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentFourTest") { ...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentFourTest") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "AceEtsComponentFourTest" hap_name = "ActsAceEtsComponentFourTest"
} }
ohos_js_assets("ace_ets_component_assets") { ohos_js_assets("ace_ets_component_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"AceEtsComponentFourTest.hap" "ActsAceEtsComponentFourTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -28,9 +28,7 @@ struct PanGestureExample { ...@@ -28,9 +28,7 @@ struct PanGestureExample {
.key('panDirection').height(100).width(200).padding(20).border({ width: 1 }).margin(80) .key('panDirection').height(100).width(200).padding(20).border({ width: 1 }).margin(80)
.translate({ x: this.offsetX, y: this.offsetY, z: 5 }) .translate({ x: this.offsetX, y: this.offsetY, z: 5 })
.gesture( .gesture(
PanGesture({}) PanGesture({direction:this.direction})
.direction(this.direction)
.setDirection(this.direction)
.onActionStart((event: PanGestureEvent) => { .onActionStart((event: PanGestureEvent) => {
console.info('Pan start') console.info('Pan start')
}) })
......
...@@ -57,7 +57,6 @@ struct TextAreaExample2 { ...@@ -57,7 +57,6 @@ struct TextAreaExample2 {
Column() { Column() {
TextArea({ placeholder: 'input your word' }) TextArea({ placeholder: 'input your word' })
.key('TextInput') .key('TextInput')
.type(this.inputType)
.placeholderColor("rgb(0,0,225)") .placeholderColor("rgb(0,0,225)")
.placeholderFont({ size: 30, weight: 100, family: 'cursive', style: FontStyle.Italic }) .placeholderFont({ size: 30, weight: 100, family: 'cursive', style: FontStyle.Italic })
.textAlign(this.textAlign) .textAlign(this.textAlign)
......
...@@ -97,51 +97,6 @@ export default function AppStorageJsunit() { ...@@ -97,51 +97,6 @@ export default function AppStorageJsunit() {
done(); done();
}); });
/**
* @tc.number stateManagement_Environment_EnvProp_0100
* @tc.name stateManagement Environment validation
* @tc.desc Function test
*/
it('stateManagement_Environment_EnvProp_colorMode_0100', 0, function (done) {
console.info('[stateManagement_Environment_EnvProp_colorMode_0100] START');
Environment.EnvProp("colorMode", ColorMode.LIGHT);
let enable = AppStorage.Get("colorMode");
expect(enable == ColorMode.LIGHT)
.assertTrue;
console.info('[stateManagement_Environment_EnvProp_colorMode_0100] enable =' + enable);
Environment.EnvProp("colorMode", ColorMode.DARK);
let enable1 = AppStorage.Get("colorMode");
console.info('[stateManagement_Environment_EnvProp_colorMode_0100] enable1 =' + enable1);
expect(enable1 == ColorMode.DARK)
.assertTrue;
console.info('[stateManagement_Environment_EnvProp_colorMode_0100] END');
done();
});
/**
* @tc.number stateManagement_Environment_EnvProp_0100
* @tc.name stateManagement Environment validation
* @tc.desc Function test
*/
it('stateManagement_Environment_EnvProp_layoutDirection_0100', 0, function (done) {
console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] START');
Environment.EnvProp("layoutDirection", LayoutDirection.LTR);
let enable = AppStorage.Get("layoutDirection");
expect(enable == LayoutDirection.LTR)
.assertTrue;
console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] enable =' + enable);
Environment.EnvProp("layoutDirection", LayoutDirection.RTL);
let enable1 = AppStorage.Get("layoutDirection");
expect(enable1 == LayoutDirection.RTL)
.assertTrue;
console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] enable1' + enable1);
Environment.EnvProp("layoutDirection", LayoutDirection.Auto);
let enable2 = AppStorage.Get("layoutDirection");
expect(enable2 == LayoutDirection.Auto)
.assertTrue;
console.info('[stateManagement_Environment_EnvProp_layoutDirection_0100] enable2' + enable2);
done();
});
/** /**
* @tc.number stateManagement_Environment_EnvProps_0100 * @tc.number stateManagement_Environment_EnvProps_0100
......
...@@ -90,7 +90,7 @@ export default function textInputJsunit() { ...@@ -90,7 +90,7 @@ export default function textInputJsunit() {
console.info("[textInputTest03] component strJson:" + strJson); console.info("[textInputTest03] component strJson:" + strJson);
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[textInputTest03] fontColor:" + obj.$attrs.fontColor); console.info("[textInputTest03] fontColor:" + obj.$attrs.fontColor);
expect(obj.$attrs.fontColor).assertEqual('#E6000000'); expect(obj.$attrs.fontColor).assertEqual('#FF000000');
done(); done();
}); });
...@@ -115,7 +115,7 @@ export default function textInputJsunit() { ...@@ -115,7 +115,7 @@ export default function textInputJsunit() {
let strJson = getInspectorByKey('TextInput'); let strJson = getInspectorByKey('TextInput');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[textInputTest04] obj is: " + JSON.stringify(obj)); console.info("[textInputTest04] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.fontColor).assertEqual('#E6000000'); expect(obj.$attrs.fontColor).assertEqual('#FFFF0000');
done(); done();
}); });
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AceEtsComponentThreeTest") { ohos_js_hap_suite("ActsAceEtsComponentThreeTest") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":ace_ets_component_assets", ":ace_ets_component_assets",
...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentThreeTest") { ...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentThreeTest") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "AceEtsComponentThreeTest" hap_name = "ActsAceEtsComponentThreeTest"
} }
ohos_js_assets("ace_ets_component_assets") { ohos_js_assets("ace_ets_component_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"AceEtsComponentThreeTest.hap" "ActsAceEtsComponentThreeTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -54,10 +54,7 @@ struct PanGestureExample { ...@@ -54,10 +54,7 @@ struct PanGestureExample {
.translate({ x: this.offsetX, y: this.offsetY, z: 5 }) .translate({ x: this.offsetX, y: this.offsetY, z: 5 })
.touchable(this.touchable) .touchable(this.touchable)
.gesture( .gesture(
PanGesture({}) PanGesture({ fingers: 1, direction: PanDirection.All, distance: 1 })
.setDirection(PanDirection.All)
.setDistance(1)
.setFingers(1)
.onActionStart((event: PanGestureEvent) => { .onActionStart((event: PanGestureEvent) => {
console.info('Pan start') console.info('Pan start')
console.log('PanGesture globalX' + event.globalX); console.log('PanGesture globalX' + event.globalX);
......
...@@ -19,7 +19,7 @@ import events_emitter from '@ohos.events.emitter'; ...@@ -19,7 +19,7 @@ import events_emitter from '@ohos.events.emitter';
@Component @Component
struct ButtonExample { struct ButtonExample {
@State buttonTypeValue: ButtonType = ButtonType.Normal; @State buttonTypeValue: ButtonType = ButtonType.Normal;
@State fontSizeValue: number = 20; @State fontSizeValue: string = '20px';
@State fontColorValue: Color = Color.Black; @State fontColorValue: Color = Color.Black;
@State text: string = ''; @State text: string = '';
@State onClickValue: boolean = false; @State onClickValue: boolean = false;
...@@ -120,6 +120,7 @@ struct ButtonExample { ...@@ -120,6 +120,7 @@ struct ButtonExample {
.width(200) .width(200)
.height(100) .height(100)
.fontSize(20) .fontSize(20)
.position({x: 50,y: 400})
.onClick((event: ClickEvent) => { .onClick((event: ClickEvent) => {
console.info(this.text = 'Click Point:' + '\n screenX:' + event.screenX + '\n screenY:' + event.screenY console.info(this.text = 'Click Point:' + '\n screenX:' + event.screenX + '\n screenY:' + event.screenY
+ '\n x :' + event.x + '\n y:' + event.y + '\ntarget:' + '\n component globalPos:(' + '\n x :' + event.x + '\n y:' + event.y + '\ntarget:' + '\n component globalPos:('
......
...@@ -75,7 +75,7 @@ export default function buttonJsunit() { ...@@ -75,7 +75,7 @@ export default function buttonJsunit() {
let strJson = getInspectorByKey('button2'); let strJson = getInspectorByKey('button2');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[testButton03] component obj is: " + JSON.stringify(obj)); console.info("[testButton03] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.fontSize).assertEqual('20'); expect(obj.$attrs.fontSize).assertEqual('20.00px');
done(); done();
}); });
...@@ -121,7 +121,7 @@ export default function buttonJsunit() { ...@@ -121,7 +121,7 @@ export default function buttonJsunit() {
try { try {
var eventData = { var eventData = {
data: { data: {
"fontSizeValue": 30, "fontSizeValue": '30px',
} }
} }
var innerEvent = { var innerEvent = {
...@@ -137,7 +137,7 @@ export default function buttonJsunit() { ...@@ -137,7 +137,7 @@ export default function buttonJsunit() {
let strJsonNew = getInspectorByKey('button2'); let strJsonNew = getInspectorByKey('button2');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[testButton05] component objNew is: " + JSON.stringify(objNew)); console.info("[testButton05] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.fontSize).assertEqual('30'); expect(objNew.$attrs.fontSize).assertEqual('30.00px');
done(); done();
}); });
...@@ -163,7 +163,7 @@ export default function buttonJsunit() { ...@@ -163,7 +163,7 @@ export default function buttonJsunit() {
let strJsonNew = getInspectorByKey('button2'); let strJsonNew = getInspectorByKey('button2');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[testButton07] component objNew is: " + JSON.stringify(objNew)); console.info("[testButton07] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.fontSize).assertEqual('0'); expect(objNew.$attrs.fontSize).assertEqual('-1.00fp');
done(); done();
}); });
...@@ -173,7 +173,7 @@ export default function buttonJsunit() { ...@@ -173,7 +173,7 @@ export default function buttonJsunit() {
try { try {
var eventData = { var eventData = {
data: { data: {
"fontSizeValue": "121212121", "fontSizeValue": "121212121px",
} }
} }
var innerEvent = { var innerEvent = {
...@@ -189,7 +189,7 @@ export default function buttonJsunit() { ...@@ -189,7 +189,7 @@ export default function buttonJsunit() {
let strJsonNew = getInspectorByKey('button2'); let strJsonNew = getInspectorByKey('button2');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[testButton08] component objNew is: " + JSON.stringify(objNew)); console.info("[testButton08] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.fontSize).assertEqual('121212121'); expect(objNew.$attrs.fontSize).assertEqual('121212121.00px');
done(); done();
}); });
...@@ -199,7 +199,7 @@ export default function buttonJsunit() { ...@@ -199,7 +199,7 @@ export default function buttonJsunit() {
try { try {
var eventData = { var eventData = {
data: { data: {
"fontSizeValue": "121212121vaas", "fontSizeValue": "121212121px",
} }
} }
var innerEvent = { var innerEvent = {
...@@ -215,7 +215,7 @@ export default function buttonJsunit() { ...@@ -215,7 +215,7 @@ export default function buttonJsunit() {
let strJsonNew = getInspectorByKey('button2'); let strJsonNew = getInspectorByKey('button2');
let objNew = JSON.parse(strJsonNew); let objNew = JSON.parse(strJsonNew);
console.info("[testButton09] component objNew is: " + JSON.stringify(objNew)); console.info("[testButton09] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.fontSize).assertEqual('121212121'); expect(objNew.$attrs.fontSize).assertEqual('121212121.00px');
done(); done();
}); });
...@@ -301,10 +301,10 @@ export default function buttonJsunit() { ...@@ -301,10 +301,10 @@ export default function buttonJsunit() {
let event = JSON.parse(eventData.data.event); 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.screenY));
console.info("[testButton12] get event state result is: " + Math.trunc(event.screenX)); console.info("[testButton12] get event state result is: " + Math.trunc(event.screenX));
expect(event.screenX).assertEqual(135) expect(event.screenX).assertEqual(185)
expect(event.screenY).assertEqual(368.80340576171875) expect(event.screenY).assertEqual(485)
expect(event.x).assertEqual(100) expect(event.x).assertEqual(100)
expect(event.y).assertEqual(31.196568154881163) expect(event.y).assertEqual(50)
} }
var innerEvent = { var innerEvent = {
eventId: 4, eventId: 4,
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AceEtsComponentTwoTest") { ohos_js_hap_suite("ActsAceEtsComponentTwoTest") {
hap_profile = "./entry/src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":ace_ets_component_assets", ":ace_ets_component_assets",
...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentTwoTest") { ...@@ -22,7 +22,7 @@ ohos_js_hap_suite("AceEtsComponentTwoTest") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "AceEtsComponentTwoTest" hap_name = "ActsAceEtsComponentTwoTest"
} }
ohos_js_assets("ace_ets_component_assets") { ohos_js_assets("ace_ets_component_assets") {
source_dir = "./entry/src/main/ets/MainAbility" source_dir = "./entry/src/main/ets/MainAbility"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"AceEtsComponentTwoTest.hap" "ActsAceEtsComponentTwoTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -48,6 +48,7 @@ struct LoadingProgressExample { ...@@ -48,6 +48,7 @@ struct LoadingProgressExample {
.width('90%') .width('90%')
.key('LP') .key('LP')
LoadingProgress() LoadingProgress()
.height(50)
.color(Color.Black) .color(Color.Black)
}.width('100%').margin({ top: 6 }) }.width('100%').margin({ top: 6 })
} }
......
...@@ -70,7 +70,6 @@ struct PageTransitionExample1 { ...@@ -70,7 +70,6 @@ struct PageTransitionExample1 {
onPageShow() { onPageShow() {
console.info('active page show called'); console.info('active page show called');
events_emitter.on(stateChangeEvent, this.stateChangCallBack)
var stateChangeEventOne = { var stateChangeEventOne = {
eventId: 145, eventId: 145,
......
...@@ -20,9 +20,14 @@ import events_emitter from '@ohos.events.emitter' ...@@ -20,9 +20,14 @@ import events_emitter from '@ohos.events.emitter'
struct SearchExample { struct SearchExample {
@State changevalue: string= '' @State changevalue: string= ''
@State submitvalue: string= '' @State submitvalue: string= ''
@State controller: SearchController= new SearchController() @State textFont:Font = {
@State textFont:Font=10 size: 10,
@State searchButton:number=10 weight: 10,
family: 'serif',
style: FontStyle.Normal
}
@State searchButton:string = "10"
controller: SearchController= new SearchController()
private stateChangCallBack = (eventData) => { private stateChangCallBack = (eventData) => {
console.info("search page state change called:" + JSON.stringify(eventData)); console.info("search page state change called:" + JSON.stringify(eventData));
......
...@@ -33,13 +33,13 @@ struct ClickExample { ...@@ -33,13 +33,13 @@ struct ClickExample {
if (event.type === TouchType.Move) { if (event.type === TouchType.Move) {
this.eventType = 'Move' this.eventType = 'Move'
} }
if (event.source === Unknown) { if (event.source === SourceType.Unknown) {
this.SourceType = 'Unknown' this.SourceType = 'Unknown'
} }
if (event.source === Mouse) { if (event.source === SourceType.Mouse) {
this.SourceType = 'Mouse' this.SourceType = 'Mouse'
} }
if (event.type === TouchScreen) { if (event.type === SourceType.TouchScreen) {
this.SourceType = 'TouchScreen' this.SourceType = 'TouchScreen'
} }
console.info(this.text = 'source:' + event.source); console.info(this.text = 'source:' + event.source);
......
...@@ -56,17 +56,6 @@ export default function datePickerJsunit() { ...@@ -56,17 +56,6 @@ export default function datePickerJsunit() {
done(); done();
}); });
it('datePickerTest_0200', 0, async function (done) {
console.info('datePickerTest_0200 START');
let strJson = getInspectorByKey('datePicker');
console.info("datePickerTest_0200 component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("datePickerTest_0200 component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.useMilitaryTime).assertEqual('true');
console.info('datePickerTest_0200 END');
done();
});
it('datePickerTest_0300', 0, async function (done) { it('datePickerTest_0300', 0, async function (done) {
console.info('datePickerTest_0300 START'); console.info('datePickerTest_0300 START');
try { try {
......
...@@ -36,7 +36,7 @@ struct button_testcase { ...@@ -36,7 +36,7 @@ struct button_testcase {
.fontSize(50) .fontSize(50)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
Button('1.value', { type: ButtonType.Circle, stateEffect: this.stateEffect }) Button('1.value', { type: ButtonType.Circle, stateEffect: this.stateEffect })
.fontSize(12) .fontSize('12px')
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.fontColor(0xCCCCCC) .fontColor(0xCCCCCC)
.height(40) .height(40)
......
...@@ -71,7 +71,7 @@ export default function buttonJsunit() { ...@@ -71,7 +71,7 @@ export default function buttonJsunit() {
expect(obj.$attrs.type).assertEqual('ButtonType.Circle') expect(obj.$attrs.type).assertEqual('ButtonType.Circle')
expect(obj.$attrs.stateEffect).assertEqual('true') expect(obj.$attrs.stateEffect).assertEqual('true')
expect(obj.$attrs.label).assertEqual('1.value') expect(obj.$attrs.label).assertEqual('1.value')
expect(obj.$attrs.fontSize).assertEqual('12') expect(obj.$attrs.fontSize).assertEqual('12.00px')
console.info('cd buttonInspectorByKey END'); console.info('cd buttonInspectorByKey END');
done(); done();
}); });
......
...@@ -95,7 +95,7 @@ export default function textJsunit() { ...@@ -95,7 +95,7 @@ export default function textJsunit() {
expect(obj.$attrs.fontFamily).assertEqual("sans-serif") expect(obj.$attrs.fontFamily).assertEqual("sans-serif")
expect(obj.$attrs.textAlign).assertEqual("TextAlign.End") expect(obj.$attrs.textAlign).assertEqual("TextAlign.End")
expect(obj.$attrs.textOverflow).assertEqual("TextOverflow.Ellipsis") expect(obj.$attrs.textOverflow).assertEqual("TextOverflow.Ellipsis")
expect(obj.$attrs.lineHeight).assertEqual("15") expect(obj.$attrs.lineHeight).assertEqual("15.00fp")
expect(obj.$attrs.baselineOffset).assertEqual("0") expect(obj.$attrs.baselineOffset).assertEqual("0")
expect(obj.$attrs.maxLines).assertEqual("2") expect(obj.$attrs.maxLines).assertEqual("2")
expect(obj.$attrs.textCase).assertEqual("TextCase.Normal") expect(obj.$attrs.textCase).assertEqual("TextCase.Normal")
......
...@@ -116,7 +116,7 @@ export default function listItemJsunit() { ...@@ -116,7 +116,7 @@ export default function listItemJsunit() {
console.log('ListItem3‘s editable is ' + JSON.stringify(obj.$attrs.editable)) console.log('ListItem3‘s editable is ' + JSON.stringify(obj.$attrs.editable))
await sleep(1) await sleep(1)
expect(obj.$attrs.sticky).assertEqual('Sticky.Opacity') expect(obj.$attrs.sticky).assertEqual('Sticky.Opacity')
expect(obj.$attrs.editable).assertEqual('false') expect(obj.$attrs.editable).assertEqual('EditMode.None')
console.info('++++++++++++++++ ListItem TestCase 3 End ++++++++++++++++'); console.info('++++++++++++++++ ListItem TestCase 3 End ++++++++++++++++');
done(); done();
}); });
......
...@@ -36,10 +36,12 @@ export default function navigationJsunit() { ...@@ -36,10 +36,12 @@ export default function navigationJsunit() {
*/ */
beforeEach(async function (done) { beforeEach(async function (done) {
console.info('[navigationTest] before each called') console.info('[navigationTest] before each called')
await sleep(1)
let options = { let options = {
uri: 'pages/Navigation', uri: 'pages/Navigation',
} }
try { try {
router.clear();
let result = router.push(options) let result = router.push(options)
console.info("push navigation page success " + JSON.stringify(result)); console.info("push navigation page success " + JSON.stringify(result));
} catch (err) { } catch (err) {
......
...@@ -35,13 +35,17 @@ ohos_shared_library("nativerender") { ...@@ -35,13 +35,17 @@ ohos_shared_library("nativerender") {
"./render/egl_core.cpp", "./render/egl_core.cpp",
"./render/plugin_render.cpp", "./render/plugin_render.cpp",
] ]
if (target_cpu == "arm") {
libs = [ "${clang_base_path}/../libcxx-ndk/lib/arm-linux-ohos/c++/libc++_shared.so" ] if (!(product_name == "m40")) {
} else if (target_cpu == "arm64") { if (target_cpu == "arm") {
libs = [ "${clang_base_path}/../libcxx-ndk/lib/aarch64-linux-ohos/c++/libc++_shared.so" ] libs = [ "${clang_base_path}/../libcxx-ndk/lib/arm-linux-ohos/c++/libc++_shared.so" ]
} else { } else if (target_cpu == "arm64") {
libs = [] libs = [ "${clang_base_path}/../libcxx-ndk/lib/aarch64-linux-ohos/c++/libc++_shared.so" ]
} else {
libs = []
}
} }
include_dirs = [ include_dirs = [
".", ".",
"./common", "./common",
......
...@@ -31,13 +31,16 @@ config("public_config") { ...@@ -31,13 +31,16 @@ config("public_config") {
ohos_shared_library("teststring") { ohos_shared_library("teststring") {
sources = [ "./napi/test_string.cpp" ] sources = [ "./napi/test_string.cpp" ]
if (target_cpu == "arm") { if (!(product_name == "m40")) {
libs = [ "${clang_base_path}/../libcxx-ndk/lib/arm-linux-ohos/c++/libc++_shared.so" ] if (target_cpu == "arm") {
} else if (target_cpu == "arm64") { libs = [ "${clang_base_path}/../libcxx-ndk/lib/arm-linux-ohos/c++/libc++_shared.so" ]
libs = [ "${clang_base_path}/../libcxx-ndk/lib/aarch64-linux-ohos/c++/libc++_shared.so" ] } else if (target_cpu == "arm64") {
} else { libs = [ "${clang_base_path}/../libcxx-ndk/lib/aarch64-linux-ohos/c++/libc++_shared.so" ]
libs = [] } else {
libs = []
}
} }
include_dirs = [ "//test/xts/acts/arkui/ace_napi_test/entry/src/main/cpp" ] include_dirs = [ "//test/xts/acts/arkui/ace_napi_test/entry/src/main/cpp" ]
configs = [ ":config" ] configs = [ ":config" ]
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ace_standard_test") { ohos_js_hap_suite("ActsAceStandardTest") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
deps = [ deps = [
":ace_js_assets", ":ace_js_assets",
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
style3:styleValue3, style3:styleValue3,
style4:styleValue4, style4:styleValue4,
style5:styleValue5, style5:styleValue5,
style6:styleValue6, style6:styleValue6
} }
}, },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ace_standard_video_test") { ohos_js_hap_suite("ActsAceStandardVideoTest") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
deps = [ deps = [
":ace_js_assets", ":ace_js_assets",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册