未验证 提交 179f2eaa 编写于 作者: O openharmony_ci 提交者: Gitee

!8730 修复代码修改引起xts执行failed问题 cherry-pick 4.0beta1

Merge pull request !8730 from sunjiakun/cherry-pick-1684847329
...@@ -27,6 +27,10 @@ struct DatePickerExample { ...@@ -27,6 +27,10 @@ struct DatePickerExample {
@State textStyle: PickerTextStyle = {color:Color.Red,font:{size:'10px',weight:FontWeight.Normal}} @State textStyle: PickerTextStyle = {color:Color.Red,font:{size:'10px',weight:FontWeight.Normal}}
@State selectedTextStyle: PickerTextStyle = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bold}} @State selectedTextStyle: PickerTextStyle = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bold}}
@State disappearTextStyleDefault: PickerTextStyle = {color:$r("sys.color.ohos_id_color_text_primary"),font:{size:$r("sys.float.ohos_id_text_size_sub_title3"),weight:FontWeight.Lighter}}
@State textStyleDefault: PickerTextStyle = {color:$r("sys.color.ohos_id_color_text_primary"),font:{size:$r("sys.float.ohos_id_text_size_sub_title2"),weight:FontWeight.Normal}}
@State selectedTextStyleDefault: PickerTextStyle ={color:$r("sys.color.ohos_id_color_text_primary_activated"),font:{size:$r("sys.float.ohos_id_text_size_headline8"),weight:FontWeight.Bold}}
private stateChangCallBack = (eventData) => { private stateChangCallBack = (eventData) => {
console.info("select page state change called:" + JSON.stringify(eventData)); console.info("select page state change called:" + JSON.stringify(eventData));
if (eventData != null) { if (eventData != null) {
...@@ -73,6 +77,20 @@ struct DatePickerExample { ...@@ -73,6 +77,20 @@ struct DatePickerExample {
.onChange((date: DatePickerResult) => { .onChange((date: DatePickerResult) => {
console.info( 'select current date is: ' + JSON.stringify(date)) console.info( 'select current date is: ' + JSON.stringify(date))
}) })
DatePicker({
start: new Date('1970-1-1'),
end: new Date('2100-1-1'),
selected: this.selectedDate
})
.lunar(true)
.disappearTextStyle(this.disappearTextStyleDefault)
.textStyle(this.textStyleDefault)
.selectedTextStyle(this.selectedTextStyleDefault)
.key('datePickerDefault')
.onChange((date: DatePickerResult) => {
console.info( 'select current date is: ' + JSON.stringify(date))
})
} }
} }
} }
\ No newline at end of file
...@@ -48,14 +48,14 @@ export default function datepicker() { ...@@ -48,14 +48,14 @@ export default function datepicker() {
}) })
/* /*
* @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0001 * @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0100
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_datePicker_disappearTextStyle_0001', 0, async function (done) { it('ArkUI_Stage_datePicker_disappearTextStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0001] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0100] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Lighter');
...@@ -63,11 +63,11 @@ export default function datepicker() { ...@@ -63,11 +63,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0002 * @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0200
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_disappearTextStyle_0002', 0, async function (done) { it('ArkUI_Stage_datePicker_disappearTextStyle_0200', 0, async function (done) {
let value = {color:Color.Black,font:{size:8,weight:FontWeight.Bolder}} let value = {color:Color.Black,font:{size:8,weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -79,15 +79,15 @@ export default function datepicker() { ...@@ -79,15 +79,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_dataPicker_disappearTextStyle_0002] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.error("[ArkUI_Stage_dataPicker_disappearTextStyle_0200] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -95,11 +95,11 @@ export default function datepicker() { ...@@ -95,11 +95,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0003 * @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0300
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_disappearTextStyle_0003', 0, async function (done) { it('ArkUI_Stage_datePicker_disappearTextStyle_0300', 0, async function (done) {
let value = {color:0x808080,font:{size:8,weight:100}} let value = {color:0x808080,font:{size:8,weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -111,15 +111,15 @@ export default function datepicker() { ...@@ -111,15 +111,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0003] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0300] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('100'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('100');
...@@ -127,11 +127,11 @@ export default function datepicker() { ...@@ -127,11 +127,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0004 * @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0400
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_disappearTextStyle_0004', 0, async function (done) { it('ArkUI_Stage_datePicker_disappearTextStyle_0400', 0, async function (done) {
let value = {color:'#ff0000',font:{size:'1px',weight:'700'}} let value = {color:'#ff0000',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -143,15 +143,15 @@ export default function datepicker() { ...@@ -143,15 +143,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0004] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0400] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('700'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('700');
...@@ -159,11 +159,11 @@ export default function datepicker() { ...@@ -159,11 +159,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0005 * @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0500
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_disappearTextStyle_0005', 0, async function (done) { it('ArkUI_Stage_datePicker_disappearTextStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -175,15 +175,15 @@ export default function datepicker() { ...@@ -175,15 +175,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0005] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0500] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -191,11 +191,11 @@ export default function datepicker() { ...@@ -191,11 +191,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0006 * @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0600
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_disappearTextStyle_0006', 0, async function (done) { it('ArkUI_Stage_datePicker_disappearTextStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -207,27 +207,31 @@ export default function datepicker() { ...@@ -207,27 +207,31 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0006] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('datePickerDefault');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('14.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0600] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual(objDefault.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual(objDefault.$attrs.disappearTextStyle.font.size);
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0007 * @tc.number ArkUI_Stage_datePicker_disappearTextStyle_0700
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_disappearTextStyle_0007', 0, async function (done) { it('ArkUI_Stage_datePicker_disappearTextStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Bold}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Bold}}
try { try {
var eventData = { var eventData = {
...@@ -239,27 +243,31 @@ export default function datepicker() { ...@@ -239,27 +243,31 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_disappearTextStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0007] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('datePickerDefault');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('14.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_datePicker_disappearTextStyle_0700] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual(objDefault.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual(objDefault.$attrs.disappearTextStyle.font.size);
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bold'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bold');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_dataPicker_disappearTextStyle_0008 * @tc.number ArkUI_Stage_dataPicker_disappearTextStyle_0800
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_dataPicker_disappearTextStyle_0008', 0, async function (done) { it('ArkUI_Stage_dataPicker_disappearTextStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -271,10 +279,10 @@ export default function datepicker() { ...@@ -271,10 +279,10 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_dataPicker_disappearTextStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_dataPicker_disappearTextStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_dataPicker_disappearTextStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_dataPicker_disappearTextStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
...@@ -286,11 +294,11 @@ export default function datepicker() { ...@@ -286,11 +294,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_dataPicker_disappearTextStyle_0009 * @tc.number ArkUI_Stage_dataPicker_disappearTextStyle_0900
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_dataPicker_disappearTextStyle_0009', 0, async function (done) { it('ArkUI_Stage_dataPicker_disappearTextStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -302,10 +310,10 @@ export default function datepicker() { ...@@ -302,10 +310,10 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_dataPicker_disappearTextStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_dataPicker_disappearTextStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_dataPicker_disappearTextStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_dataPicker_disappearTextStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
...@@ -317,14 +325,14 @@ export default function datepicker() { ...@@ -317,14 +325,14 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0001 * @tc.number ArkUI_Stage_datePicker_textStyle_0100
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0001', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_textStyle_0001] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_datePicker_textStyle_0100] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -332,11 +340,11 @@ export default function datepicker() { ...@@ -332,11 +340,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0002 * @tc.number ArkUI_Stage_datePicker_textStyle_0200
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0002', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0200', 0, async function (done) {
let value = {color:Color.Red,font:{size:'10px',weight:FontWeight.Bolder}} let value = {color:Color.Red,font:{size:'10px',weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -348,15 +356,15 @@ export default function datepicker() { ...@@ -348,15 +356,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_textStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_datePicker_textStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_datePicker_textStyle_0002] disappearColor:" + obj.$attrs.textStyle.color); console.error("[ArkUI_Stage_datePicker_textStyle_0200] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -364,11 +372,11 @@ export default function datepicker() { ...@@ -364,11 +372,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0003 * @tc.number ArkUI_Stage_datePicker_textStyle_0300
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0003', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0300', 0, async function (done) {
let value = {color:0xFF808080,font:{size:'10px',weight:100}} let value = {color:0xFF808080,font:{size:'10px',weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -380,15 +388,15 @@ export default function datepicker() { ...@@ -380,15 +388,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_textStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_datePicker_textStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_textStyle_0003] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_datePicker_textStyle_0300] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.textStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('100'); expect(obj.$attrs.textStyle.font.weight).assertEqual('100');
...@@ -396,11 +404,11 @@ export default function datepicker() { ...@@ -396,11 +404,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0004 * @tc.number ArkUI_Stage_datePicker_textStyle_0400
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0004', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0400', 0, async function (done) {
let value = {color:'#00ff00',font:{size:'1px',weight:'700'}} let value = {color:'#00ff00',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -412,15 +420,15 @@ export default function datepicker() { ...@@ -412,15 +420,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_textStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_datePicker_textStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_textStyle_0004] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_datePicker_textStyle_0400] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF00FF00'); expect(obj.$attrs.textStyle.color).assertEqual('#FF00FF00');
expect(obj.$attrs.textStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('700'); expect(obj.$attrs.textStyle.font.weight).assertEqual('700');
...@@ -428,11 +436,11 @@ export default function datepicker() { ...@@ -428,11 +436,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0005 * @tc.number ArkUI_Stage_datePicker_textStyle_0500
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0005', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -444,15 +452,15 @@ export default function datepicker() { ...@@ -444,15 +452,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_textStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_datePicker_textStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_textStyle_0005] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_datePicker_textStyle_0500] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.textStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.textStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.textStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -460,11 +468,11 @@ export default function datepicker() { ...@@ -460,11 +468,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0006 * @tc.number ArkUI_Stage_datePicker_textStyle_0600
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0006', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -476,27 +484,31 @@ export default function datepicker() { ...@@ -476,27 +484,31 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_textStyle_0006] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('datePickerDefault');
expect(obj.$attrs.textStyle.font.size).assertEqual('16.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_datePicker_textStyle_0600] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual(objDefault.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.font.size).assertEqual(objDefault.$attrs.textStyle.font.size);
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0007 * @tc.number ArkUI_Stage_datePicker_textStyle_0700
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0007', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}}
try { try {
var eventData = { var eventData = {
...@@ -508,27 +520,31 @@ export default function datepicker() { ...@@ -508,27 +520,31 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_textStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_datePicker_textStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datePicker_textStyle_0007] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('datePickerDefault');
expect(obj.$attrs.textStyle.font.size).assertEqual('16.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_datePicker_textStyle_0700] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual(objDefault.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.font.size).assertEqual(objDefault.$attrs.textStyle.font.size);
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Lighter');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0008 * @tc.number ArkUI_Stage_datePicker_textStyle_0800
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0008', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -540,10 +556,10 @@ export default function datepicker() { ...@@ -540,10 +556,10 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_textStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_datePicker_textStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
...@@ -555,11 +571,11 @@ export default function datepicker() { ...@@ -555,11 +571,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datePicker_textStyle_0009 * @tc.number ArkUI_Stage_datePicker_textStyle_0900
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_datePicker_textStyle_0009', 0, async function (done) { it('ArkUI_Stage_datePicker_textStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -571,10 +587,10 @@ export default function datepicker() { ...@@ -571,10 +587,10 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datePicker_textStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_datePicker_textStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datePicker_textStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_datePicker_textStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
...@@ -586,14 +602,14 @@ export default function datepicker() { ...@@ -586,14 +602,14 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0001 * @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0100
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_datepicker_selectedTextStyle_0001', 0, async function (done) { it('ArkUI_Stage_datepicker_selectedTextStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0001] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0100] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bold'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bold');
...@@ -601,11 +617,11 @@ export default function datepicker() { ...@@ -601,11 +617,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0002 * @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0200
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_datepicker_selectedTextStyle_0002', 0, async function (done) { it('ArkUI_Stage_datepicker_selectedTextStyle_0200', 0, async function (done) {
let value = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bolder}} let value = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -617,15 +633,15 @@ export default function datepicker() { ...@@ -617,15 +633,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_datepicker_selectedTextStyle_0002] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.error("[ArkUI_Stage_datepicker_selectedTextStyle_0200] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -633,11 +649,11 @@ export default function datepicker() { ...@@ -633,11 +649,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0003 * @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0300
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_datepicker_selectedTextStyle_0003', 0, async function (done) { it('ArkUI_Stage_datepicker_selectedTextStyle_0300', 0, async function (done) {
let value = {color:0xFF808080,font:{size:'20px',weight:100}} let value = {color:0xFF808080,font:{size:'20px',weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -649,15 +665,15 @@ export default function datepicker() { ...@@ -649,15 +665,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0003] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0300] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('100'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('100');
...@@ -665,11 +681,11 @@ export default function datepicker() { ...@@ -665,11 +681,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0004 * @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0400
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_datepicker_selectedTextStyle_0004', 0, async function (done) { it('ArkUI_Stage_datepicker_selectedTextStyle_0400', 0, async function (done) {
let value = {color:'#00ff00',font:{size:'1px',weight:'700'}} let value = {color:'#00ff00',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -681,15 +697,15 @@ export default function datepicker() { ...@@ -681,15 +697,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0004] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0400] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF00FF00'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF00FF00');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('700'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('700');
...@@ -697,11 +713,11 @@ export default function datepicker() { ...@@ -697,11 +713,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0005 * @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0500
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_datepicker_selectedTextStyle_0005', 0, async function (done) { it('ArkUI_Stage_datepicker_selectedTextStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -713,15 +729,15 @@ export default function datepicker() { ...@@ -713,15 +729,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0005] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0500] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -729,11 +745,11 @@ export default function datepicker() { ...@@ -729,11 +745,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0006 * @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0600
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_datepicker_selectedTextStyle_0006', 0, async function (done) { it('ArkUI_Stage_datepicker_selectedTextStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -745,27 +761,31 @@ export default function datepicker() { ...@@ -745,27 +761,31 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0006] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF007DFF'); let strJsonDefault = getInspectorByKey('datePickerDefault');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0600] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual(objDefault.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual(objDefault.$attrs.selectedTextStyle.font.size);
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0007 * @tc.number ArkUI_Stage_datepicker_selectedTextStyle_0700
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_datepicker_selectedTextStyle_0007', 0, async function (done) { it('ArkUI_Stage_datepicker_selectedTextStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}}
try { try {
var eventData = { var eventData = {
...@@ -777,15 +797,15 @@ export default function datepicker() { ...@@ -777,15 +797,15 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_datepicker_selectedTextStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_datepicker_selectedTextStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0007] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0700] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF007DFF'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF007DFF');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00vp'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00vp');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Lighter');
...@@ -793,11 +813,11 @@ export default function datepicker() { ...@@ -793,11 +813,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0008 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0800
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0008', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -809,10 +829,10 @@ export default function datepicker() { ...@@ -809,10 +829,10 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
...@@ -824,11 +844,11 @@ export default function datepicker() { ...@@ -824,11 +844,11 @@ export default function datepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0009 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0900
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0009', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -840,10 +860,10 @@ export default function datepicker() { ...@@ -840,10 +860,10 @@ export default function datepicker() {
eventId: 185, eventId: 185,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('datePicker'); let strJson = getInspectorByKey('datePicker');
......
...@@ -22,6 +22,7 @@ import testsuite from '../../test/List.test' ...@@ -22,6 +22,7 @@ import testsuite from '../../test/List.test'
@Component @Component
struct progressTest { struct progressTest {
@State progress: ProgressMask = new ProgressMask(10.0, 100.0, 0x01006CDE); @State progress: ProgressMask = new ProgressMask(10.0, 100.0, 0x01006CDE);
@State progress_default: ProgressMask = new ProgressMask(10.0, 100.0, $r('sys.color.ohos_id_color_mask_regular'));
aboutToAppear(){ aboutToAppear(){
var abilityDelegator: any var abilityDelegator: any
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
...@@ -44,6 +45,13 @@ struct progressTest { ...@@ -44,6 +45,13 @@ struct progressTest {
.backgroundColor(Color.Pink) .backgroundColor(Color.Pink)
.width('500px').height('280px') .width('500px').height('280px')
} }
ListItem() {
Image($r('app.media.icon'))
.key("ArkUX_Stage_Progress_updateColor_default")
.mask(this.progress_default)
.backgroundColor(Color.Pink)
.width('500px').height('280px')
}
ListItem() { ListItem() {
Button("updateColor_restore") Button("updateColor_restore")
.key("ArkUX_Stage_Progress_updateColor_restore") .key("ArkUX_Stage_Progress_updateColor_restore")
...@@ -191,100 +199,6 @@ struct progressTest { ...@@ -191,100 +199,6 @@ struct progressTest {
.fontSize(10) .fontSize(10)
} }
} }
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0100")
.borderColor(0x00ff00)
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0200")
.borderColor('#fffd0000')
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0300")
.borderColor("rgb(138,43,226)")
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0400")
.borderColor(Color.Pink)
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0500")
.borderColor($r("app.color.Progress_borderColor"))
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0600")
.borderColor("")
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0700")
.borderColor(null)
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0800")
.borderColor(undefined)
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_0900")
.borderColor("rgb(138,43,226)")
.borderColor("#FFFD0000")
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_1000")
.borderColor(Color.Pink)
.borderColor("")
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_1100")
.borderColor('bgr(138,43,226)')
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_1200")
.borderColor(0x00ff00)
.backgroundColor(Color.Pink)
.width('500px')
.height('50px')
}
ListItem() {
Progress({ value: 20, total: 150, type: ProgressType.Capsule })
.key("ArkUX_Stage_Progress_borderColor_1300")
.width('500px')
.height('50px')
}
} }
} }
.width('100%') .width('100%')
......
...@@ -315,6 +315,8 @@ export default function progressTest() { ...@@ -315,6 +315,8 @@ export default function progressTest() {
console.info('ArkUX_Stage_Progress_updateColor_1000 START'); console.info('ArkUX_Stage_Progress_updateColor_1000 START');
setTimeout(async()=>{ setTimeout(async()=>{
try{ try{
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor'); let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1000 START :'+ JSON.stringify(strJson)); console.info('ArkUX_Stage_Progress_updateColor_1000 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
...@@ -323,7 +325,7 @@ export default function progressTest() { ...@@ -323,7 +325,7 @@ export default function progressTest() {
JSON.stringify(obj.$attrs)); JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1000 component obj.$attrs.updateColor is: " + console.info("ArkUX_Stage_Progress_updateColor_1000 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor)); JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#99182431"); expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1000 END '); console.info('ArkUX_Stage_Progress_updateColor_1000 END ');
} catch(err) { } catch(err) {
expect().assertFail(); expect().assertFail();
...@@ -346,6 +348,8 @@ export default function progressTest() { ...@@ -346,6 +348,8 @@ export default function progressTest() {
console.info('ArkUX_Stage_Progress_updateColor_1100 START'); console.info('ArkUX_Stage_Progress_updateColor_1100 START');
setTimeout(async()=>{ setTimeout(async()=>{
try{ try{
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor'); let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1100 START :'+ JSON.stringify(strJson)); console.info('ArkUX_Stage_Progress_updateColor_1100 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
...@@ -354,7 +358,7 @@ export default function progressTest() { ...@@ -354,7 +358,7 @@ export default function progressTest() {
JSON.stringify(obj.$attrs)); JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1100 component obj.$attrs.updateColor is: " + console.info("ArkUX_Stage_Progress_updateColor_1100 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor)); JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#99182431"); expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1100 END '); console.info('ArkUX_Stage_Progress_updateColor_1100 END ');
} catch(err) { } catch(err) {
expect().assertFail(); expect().assertFail();
...@@ -377,6 +381,8 @@ export default function progressTest() { ...@@ -377,6 +381,8 @@ export default function progressTest() {
console.info('ArkUX_Stage_Progress_updateColor_1200 START'); console.info('ArkUX_Stage_Progress_updateColor_1200 START');
setTimeout(async()=>{ setTimeout(async()=>{
try{ try{
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor'); let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1200 START :'+ JSON.stringify(strJson)); console.info('ArkUX_Stage_Progress_updateColor_1200 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
...@@ -385,7 +391,7 @@ export default function progressTest() { ...@@ -385,7 +391,7 @@ export default function progressTest() {
JSON.stringify(obj.$attrs)); JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1200 component obj.$attrs.updateColor is: " + console.info("ArkUX_Stage_Progress_updateColor_1200 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor)); JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#99182431"); expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1200 END '); console.info('ArkUX_Stage_Progress_updateColor_1200 END ');
} catch(err) { } catch(err) {
expect().assertFail(); expect().assertFail();
...@@ -408,6 +414,8 @@ export default function progressTest() { ...@@ -408,6 +414,8 @@ export default function progressTest() {
console.info('ArkUX_Stage_Progress_updateColor_1300 START'); console.info('ArkUX_Stage_Progress_updateColor_1300 START');
setTimeout(async()=>{ setTimeout(async()=>{
try{ try{
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor'); let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1300 START :'+ JSON.stringify(strJson)); console.info('ArkUX_Stage_Progress_updateColor_1300 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
...@@ -416,7 +424,7 @@ export default function progressTest() { ...@@ -416,7 +424,7 @@ export default function progressTest() {
JSON.stringify(obj.$attrs)); JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1300 component obj.$attrs.updateColor is: " + console.info("ArkUX_Stage_Progress_updateColor_1300 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor)); JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#99182431"); expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1300 END '); console.info('ArkUX_Stage_Progress_updateColor_1300 END ');
} catch(err) { } catch(err) {
expect().assertFail(); expect().assertFail();
...@@ -472,6 +480,8 @@ export default function progressTest() { ...@@ -472,6 +480,8 @@ export default function progressTest() {
console.info('ArkUX_Stage_Progress_updateColor_1500 START'); console.info('ArkUX_Stage_Progress_updateColor_1500 START');
setTimeout(async()=>{ setTimeout(async()=>{
try{ try{
let strJson_default = getInspectorByKey('ArkUX_Stage_Progress_updateColor_default');
let obj_default = JSON.parse(strJson_default);
let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor'); let strJson = getInspectorByKey('ArkUX_Stage_Progress_updateColor');
console.info('ArkUX_Stage_Progress_updateColor_1500 START :'+ JSON.stringify(strJson)); console.info('ArkUX_Stage_Progress_updateColor_1500 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
...@@ -480,7 +490,7 @@ export default function progressTest() { ...@@ -480,7 +490,7 @@ export default function progressTest() {
JSON.stringify(obj.$attrs)); JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_updateColor_1500 component obj.$attrs.updateColor is: " + console.info("ArkUX_Stage_Progress_updateColor_1500 component obj.$attrs.updateColor is: " +
JSON.stringify(obj.$attrs.updateColor)); JSON.stringify(obj.$attrs.updateColor));
expect(obj.$attrs.updateColor).assertEqual("#99182431"); expect(obj.$attrs.updateColor).assertEqual(obj_default.$attrs.updateColor);
console.info('ArkUX_Stage_Progress_updateColor_1500 END '); console.info('ArkUX_Stage_Progress_updateColor_1500 END ');
} catch(err) { } catch(err) {
expect().assertFail(); expect().assertFail();
...@@ -526,359 +536,5 @@ export default function progressTest() { ...@@ -526,359 +536,5 @@ export default function progressTest() {
expect(result).assertEqual(true); expect(result).assertEqual(true);
},1000) },1000)
}); });
/*
*tc.number ArkUX_Stage_Progress_borderColor_0100
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to 0x00ff00
*/
it('ArkUX_Stage_Progress_borderColor_0100', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0100 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0100');
console.info('ArkUX_Stage_Progress_borderColor_0100 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0100 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0100 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0100 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#FF00FF00");
console.info('ArkUX_Stage_Progress_borderColor_0100 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0100 ERR '+ JSON.stringify(err));
}
done();
},1000)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0200
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to '#fffd0000'
*/
it('ArkUX_Stage_Progress_borderColor_0200', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0200 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0200');
console.info('ArkUX_Stage_Progress_borderColor_0200 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0200 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0200 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0200 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#FFFD0000");
console.info('ArkUX_Stage_Progress_borderColor_0200 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0200 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0300
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to 'rgb(138,43,226)'
*/
it('ArkUX_Stage_Progress_borderColor_0300', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0300 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0300');
console.info('ArkUX_Stage_Progress_borderColor_0300 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0300 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0300 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0300 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#FF8A2BE2");
console.info('ArkUX_Stage_Progress_borderColor_0300 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0300 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0400
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to Color.Pink
*/
it('ArkUX_Stage_Progress_borderColor_0400', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0400 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0400');
console.info('ArkUX_Stage_Progress_borderColor_0400 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0400 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0400 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0400 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#FFFFC0CB");
console.info('ArkUX_Stage_Progress_borderColor_0400 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0400 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0500
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to $r("app.color.Progress_Color")
*/
it('ArkUX_Stage_Progress_borderColor_0500', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0500 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0500');
console.info('ArkUX_Stage_Progress_borderColor_0500 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0500 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0500 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0500 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#FFFD0000");
console.info('ArkUX_Stage_Progress_borderColor_0500 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0500 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0600
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to an outlier ""
*/
it('ArkUX_Stage_Progress_borderColor_0600', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0600 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0600');
console.info('ArkUX_Stage_Progress_borderColor_0600 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0600 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0600 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0600 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#33007DFF");
console.info('ArkUX_Stage_Progress_borderColor_0600 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0600 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0700
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to an outlier null
*/
it('ArkUX_Stage_Progress_borderColor_0700', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0700 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0700');
console.info('ArkUX_Stage_Progress_borderColor_0700 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0700 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0700 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0700 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#33007DFF");
console.info('ArkUX_Stage_Progress_borderColor_0700 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0700 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0800
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to an outlier undefined
*/
it('ArkUX_Stage_Progress_borderColor_0800', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0800 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0800');
console.info('ArkUX_Stage_Progress_borderColor_0800 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0800 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0800 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0800 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#33007DFF");
console.info('ArkUX_Stage_Progress_borderColor_0800 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0800 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_0900
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to Color.Pink
* and again set the borderColor property parameter to "#FFFD0000".
*/
it('ArkUX_Stage_Progress_borderColor_0900', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_0900 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_0900');
console.info('ArkUX_Stage_Progress_borderColor_0900 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_0900 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_0900 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_0900 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#FFFD0000");
console.info('ArkUX_Stage_Progress_borderColor_0900 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_0900 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_1000
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to Color.Pink
* and again set the borderColor property parameter to the outlier 'bgr(138,43,226)'.
*/
it('ArkUX_Stage_Progress_borderColor_1000', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_1000 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_1000');
console.info('ArkUX_Stage_Progress_borderColor_1000 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_1000 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_1000 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_1000 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#33007DFF");
console.info('ArkUX_Stage_Progress_borderColor_1000 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_1000 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_1100
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set borderColor property parameter to outlier 'bgr(138,43,226)'
*/
it('ArkUX_Stage_Progress_borderColor_1100', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_1100 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_1100');
console.info('ArkUX_Stage_Progress_borderColor_1100 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_1100 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_1100 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_1100 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#33007DFF");
console.info('ArkUX_Stage_Progress_borderColor_1100 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_1100 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_1200
*tc.name Tests the borderColor property of the Progress component
*tc.desc Set the borderColor property parameter to 0x00ff00
* and the universal property backgroundColor property value to Color.Pink
*/
it('ArkUX_Stage_Progress_borderColor_1200', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_1200 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_1200');
console.info('ArkUX_Stage_Progress_borderColor_1200 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_1200 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_1200 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_1200 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#FF00FF00");
console.info('ArkUX_Stage_Progress_borderColor_1200 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_1200 ERR '+ JSON.stringify(err));
}
done();
},500)
});
/*
*tc.number ArkUX_Stage_Progress_borderColor_1300
*tc.name Tests the borderColor property of the Progress component
*tc.desc The new attribute borderColor is not set
*/
it('ArkUX_Stage_Progress_borderColor_1300', 0, async function (done) {
console.info('ArkUX_Stage_Progress_borderColor_1300 START');
setTimeout(()=>{
try{
let strJson = getInspectorByKey('ArkUX_Stage_Progress_borderColor_1300');
console.info('ArkUX_Stage_Progress_borderColor_1300 START :'+ JSON.stringify(strJson));
let obj = JSON.parse(strJson);
console.info("ArkUX_Stage_Progress_borderColor_1300 component obj is: " + JSON.stringify(obj));
console.info("ArkUX_Stage_Progress_borderColor_1300 component obj.$attrs is: " +
JSON.stringify(obj.$attrs));
console.info("ArkUX_Stage_Progress_borderColor_1300 component obj.$attrs.capsuleBorderColor is: " +
JSON.stringify(obj.$attrs.capsuleBorderColor));
expect(obj.$attrs.capsuleBorderColor).assertEqual("#33007DFF");
console.info('ArkUX_Stage_Progress_borderColor_1300 END ');
} catch(err) {
expect().assertFail();
console.info('ArkUX_Stage_Progress_borderColor_1300 ERR '+ JSON.stringify(err));
}
done();
},500)
});
}) })
} }
\ No newline at end of file
...@@ -59,6 +59,13 @@ struct TabsExample { ...@@ -59,6 +59,13 @@ struct TabsExample {
@State selfSubTabBorderRadiusStr: string = "20vp" @State selfSubTabBorderRadiusStr: string = "20vp"
@State selfMarginTopStr: string = "10vp" @State selfMarginTopStr: string = "10vp"
@State defaultDividerColor: Resource = $r("sys.color.ohos_id_color_list_separator")
@State defaultIndicatorColor: Resource = $r("sys.color.ohos_id_color_subtab_line_on")
@State defaultIndicatorMarginTop: Resource = $r("sys.float.ohos_id_subtab_line_gap")
@State defaultIndicatorHeight: Resource = $r("sys.float.ohos_id_subtab_line_height")
@State defaultSubTabBorderRadius: Resource = $r("sys.float.ohos_id_corner_radius_clicked")
@State defaultSubTabTextSize: Resource = $r("sys.float.ohos_id_text_size_body1")
@State selfSelectedMode: SelectedMode = SelectedMode.INDICATOR @State selfSelectedMode: SelectedMode = SelectedMode.INDICATOR
private stateChangCallBack = (eventData) => { private stateChangCallBack = (eventData) => {
...@@ -359,6 +366,43 @@ struct TabsExample { ...@@ -359,6 +366,43 @@ struct TabsExample {
.width('90%') .width('90%')
.key('tabsTest5') .key('tabsTest5')
Tabs({ barPosition: BarPosition.Start, controller: this.controller2 }) {
TabContent() {
Column().width('100%').height('100%').backgroundColor(Color.Pink)
}
.key('defaultSubTab')
.tabBar(SubTabBarStyle.of('pink')
.indicator({
marginTop:this.defaultIndicatorMarginTop,
color: this.defaultIndicatorColor,
height: this.defaultIndicatorHeight
})
.board({
borderRadius:this.defaultSubTabBorderRadius
})
.labelStyle({
font: { size: this.defaultSubTabTextSize }
})
)
TabContent() {
Column().width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar('yellow')
TabContent() {
Column().width('100%').height('100%').backgroundColor(Color.Blue)
}.tabBar('blue')
}
.vertical(true).scrollable(true).barMode(BarMode.Fixed)
.barWidth(70).barHeight('100%').animationDuration(400)
.onChange((index: number) => {
console.info(index.toString())
})
.divider({ strokeWidth: '1vp',
color: this.defaultDividerColor
})
.height('200vp')
.width('90%')
.key('defaultTabs')
} }
} }
} }
\ No newline at end of file
...@@ -195,12 +195,18 @@ export default function tabs() { ...@@ -195,12 +195,18 @@ export default function tabs() {
console.log("[ArkUI_Tabs_Divider_0600] change component data error: " + err.message); console.log("[ArkUI_Tabs_Divider_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let defaultStrJson = getInspectorByKey('defaultTabs');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_Divider_0600] defaultDivider:" + JSON.stringify(defaultObj.$attrs.divider));
let defaultDividerObject = defaultObj.$attrs.divider;
let defaultDividerColor = defaultDividerObject.color;
let strJson = getInspectorByKey('tabsTest'); let strJson = getInspectorByKey('tabsTest');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_Divider_0600] divider:" + JSON.stringify(obj.$attrs.divider)); console.info("[ArkUI_Tabs_Divider_0600] divider:" + JSON.stringify(obj.$attrs.divider));
let dividerObject = obj.$attrs.divider; let dividerObject = obj.$attrs.divider;
expect(dividerObject.strokeWidth).assertEqual("0.00px"); expect(dividerObject.strokeWidth).assertEqual("0.00px");
expect(dividerObject.color).assertEqual('#33182431'); expect(dividerObject.color).assertEqual(defaultDividerColor);
expect(dividerObject.startMargin).assertEqual('0.00px'); expect(dividerObject.startMargin).assertEqual('0.00px');
expect(dividerObject.endMargin).assertEqual('0.00px'); expect(dividerObject.endMargin).assertEqual('0.00px');
done(); done();
...@@ -233,12 +239,18 @@ export default function tabs() { ...@@ -233,12 +239,18 @@ export default function tabs() {
console.log("[ArkUI_Tabs_Divider_0700] change component data error: " + err.message); console.log("[ArkUI_Tabs_Divider_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let defaultStrJson = getInspectorByKey('defaultTabs');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_Divider_0700] defaultDivider:" + JSON.stringify(defaultObj.$attrs.divider));
let defaultDividerObject = defaultObj.$attrs.divider;
let defaultDividerColor = defaultDividerObject.color;
let strJson = getInspectorByKey('tabsTest'); let strJson = getInspectorByKey('tabsTest');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_Divider_0700] divider:" + JSON.stringify(obj.$attrs.divider)); console.info("[ArkUI_Tabs_Divider_0700] divider:" + JSON.stringify(obj.$attrs.divider));
let dividerObject = obj.$attrs.divider; let dividerObject = obj.$attrs.divider;
expect(dividerObject.strokeWidth).assertEqual("10.00px"); expect(dividerObject.strokeWidth).assertEqual("10.00px");
expect(dividerObject.color).assertEqual('#33182431'); expect(dividerObject.color).assertEqual(defaultDividerColor);
expect(dividerObject.startMargin).assertEqual("5.00px"); expect(dividerObject.startMargin).assertEqual("5.00px");
expect(dividerObject.endMargin).assertEqual("5.00px"); expect(dividerObject.endMargin).assertEqual("5.00px");
done(); done();
...@@ -513,6 +525,13 @@ export default function tabs() { ...@@ -513,6 +525,13 @@ export default function tabs() {
*/ */
it('ArkUI_Tabs_LabelStyle_0100', 0, async function (done) { it('ArkUI_Tabs_LabelStyle_0100', 0, async function (done) {
console.info("ArkUI_Tabs_LabelStyle_0100 start"); console.info("ArkUI_Tabs_LabelStyle_0100 start");
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_LabelStyle_0100] labelStyle:" + JSON.stringify(defaultObj.$attrs.tabBar.labelStyle));
let defaultLabelStyleObject = defaultObj.$attrs.tabBar.labelStyle;
let defaultFontSize = defaultLabelStyleObject.font.size;
let strJson = getInspectorByKey('indicatorTest5'); let strJson = getInspectorByKey('indicatorTest5');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_LabelStyle_0100] labelStyle:" + JSON.stringify(obj.$attrs.tabBar.labelStyle)); console.info("[ArkUI_Tabs_LabelStyle_0100] labelStyle:" + JSON.stringify(obj.$attrs.tabBar.labelStyle));
...@@ -522,7 +541,7 @@ export default function tabs() { ...@@ -522,7 +541,7 @@ export default function tabs() {
expect(obj.$attrs.tabBar.labelStyle.minFontSize).assertEqual('0.00vp'); expect(obj.$attrs.tabBar.labelStyle.minFontSize).assertEqual('0.00vp');
expect(obj.$attrs.tabBar.labelStyle.maxFontSize).assertEqual('0.00vp'); expect(obj.$attrs.tabBar.labelStyle.maxFontSize).assertEqual('0.00vp');
expect(obj.$attrs.tabBar.labelStyle.heightAdaptivePolicy).assertEqual('TextHeightAdaptivePolicy.MAX_LINES_FIRST'); expect(obj.$attrs.tabBar.labelStyle.heightAdaptivePolicy).assertEqual('TextHeightAdaptivePolicy.MAX_LINES_FIRST');
expect(obj.$attrs.tabBar.labelStyle.font.size).assertEqual('16.00fp'); expect(obj.$attrs.tabBar.labelStyle.font.size).assertEqual(defaultFontSize);
expect(obj.$attrs.tabBar.labelStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.tabBar.labelStyle.font.weight).assertEqual('FontWeight.Normal');
expect(obj.$attrs.tabBar.labelStyle.font.family).assertEqual('HarmonyOS Sans'); expect(obj.$attrs.tabBar.labelStyle.font.family).assertEqual('HarmonyOS Sans');
expect(obj.$attrs.tabBar.labelStyle.font.style).assertEqual('FontStyle.Normal'); expect(obj.$attrs.tabBar.labelStyle.font.style).assertEqual('FontStyle.Normal');
...@@ -616,6 +635,12 @@ export default function tabs() { ...@@ -616,6 +635,12 @@ export default function tabs() {
it('ArkUI_Tabs_LabelStyle_0600', 0, async function (done) { it('ArkUI_Tabs_LabelStyle_0600', 0, async function (done) {
console.info("ArkUI_Tabs_LabelStyle_0600 start"); console.info("ArkUI_Tabs_LabelStyle_0600 start");
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_LabelStyle_0600] default labelStyle:" + JSON.stringify(defaultObj.$attrs.tabBar.labelStyle));
let defaultLabelStyleObject = defaultObj.$attrs.tabBar.labelStyle;
let defaultFontSize = defaultLabelStyleObject.font.size;
let strJson = getInspectorByKey('indicatorTest6'); let strJson = getInspectorByKey('indicatorTest6');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_LabelStyle_0600] labelStyle:" + JSON.stringify(obj.$attrs.tabBar.labelStyle)); console.info("[ArkUI_Tabs_LabelStyle_0600] labelStyle:" + JSON.stringify(obj.$attrs.tabBar.labelStyle));
...@@ -624,7 +649,7 @@ export default function tabs() { ...@@ -624,7 +649,7 @@ export default function tabs() {
expect(obj.$attrs.tabBar.labelStyle.minFontSize).assertEqual('0.00vp'); expect(obj.$attrs.tabBar.labelStyle.minFontSize).assertEqual('0.00vp');
expect(obj.$attrs.tabBar.labelStyle.maxFontSize).assertEqual('0.00vp'); expect(obj.$attrs.tabBar.labelStyle.maxFontSize).assertEqual('0.00vp');
expect(obj.$attrs.tabBar.labelStyle.heightAdaptivePolicy).assertEqual('TextHeightAdaptivePolicy.MAX_LINES_FIRST'); expect(obj.$attrs.tabBar.labelStyle.heightAdaptivePolicy).assertEqual('TextHeightAdaptivePolicy.MAX_LINES_FIRST');
expect(obj.$attrs.tabBar.labelStyle.font.size).assertEqual('16.00fp'); expect(obj.$attrs.tabBar.labelStyle.font.size).assertEqual(defaultFontSize);
expect(obj.$attrs.tabBar.labelStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.tabBar.labelStyle.font.weight).assertEqual('FontWeight.Normal');
expect(obj.$attrs.tabBar.labelStyle.font.family).assertEqual('HarmonyOS Sans'); expect(obj.$attrs.tabBar.labelStyle.font.family).assertEqual('HarmonyOS Sans');
expect(obj.$attrs.tabBar.labelStyle.font.style).assertEqual('FontStyle.Normal'); expect(obj.$attrs.tabBar.labelStyle.font.style).assertEqual('FontStyle.Normal');
...@@ -714,11 +739,18 @@ export default function tabs() { ...@@ -714,11 +739,18 @@ export default function tabs() {
*/ */
it('ArkUI_Tabs_IndicatorColor_0100', 0, async function (done) { it('ArkUI_Tabs_IndicatorColor_0100', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorColor_0100 start"); console.info("ArkUI_Tabs_IndicatorColor_0100 start");
await Utils.sleep(2000);
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_IndicatorColor_0100] default indicator:" + defaultObj.$attrs.tabBar.indicator);
let defaultIndicatorColor = defaultObj.$attrs.tabBar.indicator.color;
let strJson = getInspectorByKey('indicatorTest5'); let strJson = getInspectorByKey('indicatorTest5');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorColor_0100] indicator:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorColor_0100] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorColor = obj.$attrs.tabBar.indicator.color; let indicatorColor = obj.$attrs.tabBar.indicator.color;
expect(indicatorColor).assertEqual("#FF007DFF"); expect(indicatorColor).assertEqual(defaultIndicatorColor);
done(); done();
}); });
...@@ -806,11 +838,16 @@ export default function tabs() { ...@@ -806,11 +838,16 @@ export default function tabs() {
console.log("[ArkUI_Tabs_IndicatorColor_0600] change component data error: " + err.message); console.log("[ArkUI_Tabs_IndicatorColor_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_IndicatorColor_0600] default indicator:" + defaultObj.$attrs.tabBar.indicator);
let defaultIndicatorColor = defaultObj.$attrs.tabBar.indicator.color;
let strJson = getInspectorByKey('indicatorTest1'); let strJson = getInspectorByKey('indicatorTest1');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorColor_0600] indicator:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorColor_0600] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorColor = obj.$attrs.tabBar.indicator.color; let indicatorColor = obj.$attrs.tabBar.indicator.color;
expect(indicatorColor).assertEqual("#FF007DFF"); expect(indicatorColor).assertEqual(defaultIndicatorColor);
done(); done();
}); });
...@@ -849,12 +886,12 @@ export default function tabs() { ...@@ -849,12 +886,12 @@ export default function tabs() {
let indicatorHeight = obj.$attrs.tabBar.indicator.height; let indicatorHeight = obj.$attrs.tabBar.indicator.height;
let indicatorWidth = obj.$attrs.tabBar.indicator.width; let indicatorWidth = obj.$attrs.tabBar.indicator.width;
let indicatorBorderRadius = obj.$attrs.tabBar.indicator.borderRadius; let indicatorBorderRadius = obj.$attrs.tabBar.indicator.borderRadius;
let indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; let IndicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorColor).assertEqual("#FFFF0000"); expect(indicatorColor).assertEqual("#FFFF0000");
expect(indicatorHeight).assertEqual("5.00vp"); expect(indicatorHeight).assertEqual("5.00vp");
expect(indicatorWidth).assertEqual("20.00vp"); expect(indicatorWidth).assertEqual("20.00vp");
expect(indicatorBorderRadius).assertEqual("5.00vp"); expect(indicatorBorderRadius).assertEqual("5.00vp");
expect(indicatorSpace).assertEqual("10.00vp"); expect(IndicatorMarginTop).assertEqual("10.00vp");
done(); done();
}); });
...@@ -865,11 +902,16 @@ export default function tabs() { ...@@ -865,11 +902,16 @@ export default function tabs() {
*/ */
it('ArkUI_Tabs_IndicatorHeight_0100', 0, async function (done) { it('ArkUI_Tabs_IndicatorHeight_0100', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorHeight_0100 start ") console.info("ArkUI_Tabs_IndicatorHeight_0100 start ")
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_IndicatorHeight_0100] default indicator:" + defaultObj.$attrs.tabBar.indicator);
let defaultIndicatorHeight = defaultObj.$attrs.tabBar.indicator.height;
let strJson = getInspectorByKey('indicatorTest5'); let strJson = getInspectorByKey('indicatorTest5');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorHeight_0100] indicator:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorHeight_0100] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorHeight = obj.$attrs.tabBar.indicator.height; let indicatorHeight = obj.$attrs.tabBar.indicator.height;
expect(indicatorHeight).assertEqual("2.00vp"); expect(indicatorHeight).assertEqual(defaultIndicatorHeight);
done(); done();
}); });
...@@ -942,11 +984,16 @@ export default function tabs() { ...@@ -942,11 +984,16 @@ export default function tabs() {
console.log("[ArkUI_Tabs_IndicatorHeight_0500] change component data error: " + err.message); console.log("[ArkUI_Tabs_IndicatorHeight_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_IndicatorHeight_0500] default indicator:" + defaultObj.$attrs.tabBar.indicator);
let defaultIndicatorHeight = defaultObj.$attrs.tabBar.indicator.height;
let strJson = getInspectorByKey('indicatorTest1'); let strJson = getInspectorByKey('indicatorTest1');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorHeight_0500] indicator:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorHeight_0500] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorHeight = obj.$attrs.tabBar.indicator.height; let indicatorHeight = obj.$attrs.tabBar.indicator.height;
expect(indicatorHeight).assertEqual("2.00vp"); expect(indicatorHeight).assertEqual(defaultIndicatorHeight);
done(); done();
}); });
...@@ -1370,10 +1417,15 @@ export default function tabs() { ...@@ -1370,10 +1417,15 @@ export default function tabs() {
*/ */
it('ArkUI_Tabs_SubTabBorderRadius_0100', 0, async function (done) { it('ArkUI_Tabs_SubTabBorderRadius_0100', 0, async function (done) {
console.info("ArkUI_Tabs_SubTabBorderRadius_0100 start"); console.info("ArkUI_Tabs_SubTabBorderRadius_0100 start");
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_SubTabBorderRadius_0100] default subTabBorderRadius:" + defaultObj.$attrs.tabBar.board.borderRadius);
let defaultSubTabBorderRadius = defaultObj.$attrs.tabBar.board.borderRadius;
let strJson = getInspectorByKey('indicatorTest5'); let strJson = getInspectorByKey('indicatorTest5');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_SubTabBorderRadius_0100] subTabBorderRadius:" + obj.$attrs.tabBar.board.borderRadius); console.info("[ArkUI_Tabs_SubTabBorderRadius_0100] subTabBorderRadius:" + obj.$attrs.tabBar.board.borderRadius);
expect(obj.$attrs.tabBar.board.borderRadius).assertEqual("8.00vp"); expect(obj.$attrs.tabBar.board.borderRadius).assertEqual(defaultSubTabBorderRadius);
done(); done();
}); });
...@@ -1443,10 +1495,15 @@ export default function tabs() { ...@@ -1443,10 +1495,15 @@ export default function tabs() {
console.log("[ArkUI_Tabs_SubTabBorderRadius_0500] change component data error: " + err.message); console.log("[ArkUI_Tabs_SubTabBorderRadius_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_SubTabBorderRadius_0500] default subTabBorderRadius:" + defaultObj.$attrs.tabBar.board.borderRadius);
let defaultSubTabBorderRadius = defaultObj.$attrs.tabBar.board.borderRadius;
let strJson = getInspectorByKey('indicatorTest1'); let strJson = getInspectorByKey('indicatorTest1');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_SubTabBorderRadius_0500] subTabBorderRadius:" + obj.$attrs.tabBar.board.borderRadius); console.info("[ArkUI_Tabs_SubTabBorderRadius_0500] subTabBorderRadius:" + obj.$attrs.tabBar.board.borderRadius);
expect(obj.$attrs.tabBar.board.borderRadius).assertEqual("8.00vp"); expect(obj.$attrs.tabBar.board.borderRadius).assertEqual(defaultSubTabBorderRadius);
done(); done();
}); });
...@@ -1617,72 +1674,77 @@ export default function tabs() { ...@@ -1617,72 +1674,77 @@ export default function tabs() {
}); });
/** /**
* @tc.number ArkUI_Tabs_IndicatorSpace_0100 * @tc.number ArkUI_Tabs_IndicatorMarginTop_0100
* @tc.name Tests the indicator.marginTop property of the tabs component * @tc.name Tests the indicator.marginTop property of the tabs component
* @tc.desc the default indicator.marginTop parameter is "0.00vp". * @tc.desc the default indicator.marginTop parameter is "8.00vp".
*/ */
it('ArkUI_Tabs_IndicatorSpace_0100', 0, async function (done) { it('ArkUI_Tabs_IndicatorMarginTop_0100', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorSpace_0100 start"); console.info("ArkUI_Tabs_IndicatorMarginTop_0100 start");
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_IndicatorMarginTop_0100] default indicator:" + defaultObj.$attrs.tabBar.indicator);
let defaultIndicatorMarginTop = defaultObj.$attrs.tabBar.indicator.marginTop;
let strJson = getInspectorByKey('indicatorTest4'); let strJson = getInspectorByKey('indicatorTest4');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0100] indicatorSpace:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0100] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; let indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("8.00vp"); expect(indicatorMarginTop).assertEqual(defaultIndicatorMarginTop);
done(); done();
}); });
/** /**
* @tc.number ArkUI_Tabs_IndicatorWidth_0200 * @tc.number ArkUI_Tabs_IndicatorMarginTop_0200
* @tc.name Tests the indicator.marginTop property of the tabs component * @tc.name Tests the indicator.marginTop property of the tabs component
* @tc.desc set indicator.width to number type. * @tc.desc set indicator.marginTop to number type.
*/ */
it('ArkUI_Tabs_IndicatorSpace_0200', 0, async function (done) { it('ArkUI_Tabs_IndicatorMarginTop_0200', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorSpace_0200 start"); console.info("ArkUI_Tabs_IndicatorMarginTop_0200 start");
let strJson = getInspectorByKey('indicatorTest1'); let strJson = getInspectorByKey('indicatorTest1');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0200] indicatorSpace:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0200] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; let indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("10.00vp"); expect(indicatorMarginTop).assertEqual("10.00vp");
done(); done();
}); });
/** /**
* @tc.number ArkUI_Tabs_IndicatorSpace_0300 * @tc.number ArkUI_Tabs_IndicatorMarginTop_0300
* @tc.name Tests the indicator.marginTop property of the tabs component * @tc.name Tests the indicator.marginTop property of the tabs component
* @tc.desc set indicator.width to string type. * @tc.desc set indicator.width to string type.
*/ */
it('ArkUI_Tabs_IndicatorSpace_0300', 0, async function (done) { it('ArkUI_Tabs_IndicatorMarginTop_0300', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorSpace_0300 start"); console.info("ArkUI_Tabs_IndicatorMarginTop_0300 start");
let strJson = getInspectorByKey('indicatorTest2'); let strJson = getInspectorByKey('indicatorTest2');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0300] indicatorSpace:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0300] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; let indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("10.00vp"); expect(indicatorMarginTop).assertEqual("10.00vp");
done(); done();
}); });
/** /**
* @tc.number ArkUI_Tabs_IndicatorSpace_0400 * @tc.number ArkUI_Tabs_IndicatorMarginTop_0400
* @tc.name Tests the indicator.marginTop property of the tabs component * @tc.name Tests the indicator.marginTop property of the tabs component
* @tc.desc set indicator.width to Resource type. * @tc.desc set indicator.width to Resource type.
*/ */
it('ArkUI_Tabs_IndicatorSpace_0400', 0, async function (done) { it('ArkUI_Tabs_IndicatorMarginTop_0400', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorSpace_0400 start"); console.info("ArkUI_Tabs_IndicatorMarginTop_0400 start");
let strJson = getInspectorByKey('indicatorTest3'); let strJson = getInspectorByKey('indicatorTest3');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0400] indicatorSpace:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0400] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; let indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("10.00vp"); expect(indicatorMarginTop).assertEqual("10.00vp");
done(); done();
}); });
/** /**
* @tc.number ArkUI_Tabs_IndicatorSpace_0500 * @tc.number ArkUI_Tabs_IndicatorMarginTop_0500
* @tc.name Tests the indicator.marginTop property of the tabs component * @tc.name Tests the indicator.marginTop property of the tabs component
* @tc.desc set indicator.marginTop to abnormol value -1 then get the default value "0.00vp" * @tc.desc set indicator.marginTop to abnormol value -1 then get the default value "8.00vp"
*/ */
it('ArkUI_Tabs_IndicatorSpace_0500', 0, async function (done) { it('ArkUI_Tabs_IndicatorMarginTop_0500', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorSpace_0500 start"); console.info("ArkUI_Tabs_IndicatorMarginTop_0500 start");
try { try {
var eventData = { var eventData = {
...@@ -1695,27 +1757,32 @@ export default function tabs() { ...@@ -1695,27 +1757,32 @@ export default function tabs() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Tabs_IndicatorSpace_0500] start to publish emit"); console.info("[ArkUI_Tabs_IndicatorMarginTop_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Tabs_IndicatorSpace_0500] change component data error: " + err.message); console.log("[ArkUI_Tabs_IndicatorMarginTop_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let defaultStrJson = getInspectorByKey('defaultSubTab');
let defaultObj = JSON.parse(defaultStrJson);
console.info("[ArkUI_Tabs_IndicatorMarginTop_0500] default indicator:" + defaultObj.$attrs.tabBar.indicator);
let defaultIndicatorMarginTop = defaultObj.$attrs.tabBar.indicator.marginTop;
let strJson = getInspectorByKey('indicatorTest1'); let strJson = getInspectorByKey('indicatorTest1');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0500] indicatorSpace:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0500] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; let indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("8.00vp"); expect(indicatorMarginTop).assertEqual(defaultIndicatorMarginTop);
done(); done();
}); });
/** /**
* @tc.number ArkUI_Tabs_IndicatorSpace_0600 * @tc.number ArkUI_Tabs_IndicatorMarginTop_0600
* @tc.name Tests the indicator.marginTop property of the tabs component * @tc.name Tests the indicator.marginTop property of the tabs component
* @tc.desc set indicator.marginTop with different length's unit * @tc.desc set indicator.marginTop with different length's unit
*/ */
it('ArkUI_Tabs_IndicatorSpace_0600', 0, async function (done) { it('ArkUI_Tabs_IndicatorMarginTop_0600', 0, async function (done) {
console.info("ArkUI_Tabs_IndicatorHeight_0300 start"); console.info("ArkUI_Tabs_IndicatorMarginTop_0600 start");
try { try {
var eventData = { var eventData = {
...@@ -1727,17 +1794,17 @@ export default function tabs() { ...@@ -1727,17 +1794,17 @@ export default function tabs() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Tabs_IndicatorSpace_0600] start to publish emit"); console.info("[ArkUI_Tabs_IndicatorMarginTop_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Tabs_IndicatorSpace_0600] change component data error: " + err.message); console.log("[ArkUI_Tabs_IndicatorMarginTop_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('indicatorTest2'); let strJson = getInspectorByKey('indicatorTest2');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0600] indicator:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0600] indicator:" + obj.$attrs.tabBar.indicator);
let indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; let indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("10.00px"); expect(indicatorMarginTop).assertEqual("10.00px");
try { try {
var eventData = { var eventData = {
...@@ -1749,17 +1816,17 @@ export default function tabs() { ...@@ -1749,17 +1816,17 @@ export default function tabs() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Tabs_IndicatorSpace_0600] start to publish emit"); console.info("[ArkUI_Tabs_IndicatorMarginTop_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Tabs_IndicatorSpace_0600] change component data error: " + err.message); console.log("[ArkUI_Tabs_IndicatorMarginTop_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
strJson = getInspectorByKey('indicatorTest2'); strJson = getInspectorByKey('indicatorTest2');
obj = JSON.parse(strJson); obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0600] indicator:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0600] indicator:" + obj.$attrs.tabBar.indicator);
indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("10.00fp"); expect(indicatorMarginTop).assertEqual("10.00fp");
try { try {
var eventData = { var eventData = {
...@@ -1771,17 +1838,17 @@ export default function tabs() { ...@@ -1771,17 +1838,17 @@ export default function tabs() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Tabs_IndicatorSpace_0600] start to publish emit"); console.info("[ArkUI_Tabs_IndicatorMarginTop_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Tabs_IndicatorSpace_0600] change component data error: " + err.message); console.log("[ArkUI_Tabs_IndicatorMarginTop_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
strJson = getInspectorByKey('indicatorTest2'); strJson = getInspectorByKey('indicatorTest2');
obj = JSON.parse(strJson); obj = JSON.parse(strJson);
console.info("[ArkUI_Tabs_IndicatorSpace_0600] indicator:" + obj.$attrs.tabBar.indicator); console.info("[ArkUI_Tabs_IndicatorMarginTop_0600] indicator:" + obj.$attrs.tabBar.indicator);
indicatorSpace = obj.$attrs.tabBar.indicator.marginTop; indicatorMarginTop = obj.$attrs.tabBar.indicator.marginTop;
expect(indicatorSpace).assertEqual("10.00lpx"); expect(indicatorMarginTop).assertEqual("10.00lpx");
done(); done();
}); });
}) })
......
...@@ -29,6 +29,9 @@ struct TextPickerExample { ...@@ -29,6 +29,9 @@ struct TextPickerExample {
@State textStyle: PickerTextStyle = {color:Color.Red,font:{size:'10px',weight:FontWeight.Normal}} @State textStyle: PickerTextStyle = {color:Color.Red,font:{size:'10px',weight:FontWeight.Normal}}
@State selectedTextStyle: PickerTextStyle = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bold}} @State selectedTextStyle: PickerTextStyle = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bold}}
@State disappearTextStyleDefault: PickerTextStyle = {color:$r("sys.color.ohos_id_color_text_primary"),font:{size:$r("sys.float.ohos_id_text_size_sub_title3"),weight:FontWeight.Lighter}}
@State textStyleDefault: PickerTextStyle = {color:$r("sys.color.ohos_id_color_text_primary"),font:{size:$r("sys.float.ohos_id_text_size_sub_title2"),weight:FontWeight.Normal}}
@State selectedTextStyleDefault: PickerTextStyle ={color:$r("sys.color.ohos_id_color_text_primary_activated"),font:{size:$r("sys.float.ohos_id_text_size_headline8"),weight:FontWeight.Bold}}
private stateChangCallBack = (eventData) => { private stateChangCallBack = (eventData) => {
console.info("select page state change called:" + JSON.stringify(eventData)); console.info("select page state change called:" + JSON.stringify(eventData));
...@@ -71,6 +74,15 @@ struct TextPickerExample { ...@@ -71,6 +74,15 @@ struct TextPickerExample {
.onChange((value: string, index: number) => { .onChange((value: string, index: number) => {
console.info('Picker item changed, value: ' + value + ', index: ' + index) console.info('Picker item changed, value: ' + value + ', index: ' + index)
}) })
TextPicker({range: this.multipleColumns,selected: this.select})
.disappearTextStyle(this.disappearTextStyleDefault)
.textStyle(this.textStyleDefault)
.selectedTextStyle(this.selectedTextStyleDefault)
.key('textPickerDefault')
.onChange((value: string, index: number) => {
console.info('Picker item changed, value: ' + value + ', index: ' + index)
})
} }
} }
} }
...@@ -47,14 +47,14 @@ export default function textpicker() { ...@@ -47,14 +47,14 @@ export default function textpicker() {
}) })
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0001 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0100
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0001', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0001] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0100] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Lighter');
...@@ -62,11 +62,11 @@ export default function textpicker() { ...@@ -62,11 +62,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0002 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0200
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0002', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0200', 0, async function (done) {
let value = {color:Color.Black,font:{size:8,weight:FontWeight.Bolder}} let value = {color:Color.Black,font:{size:8,weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -78,15 +78,15 @@ export default function textpicker() { ...@@ -78,15 +78,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_textpicker_disappearTextStyle_0002] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.error("[ArkUI_Stage_textpicker_disappearTextStyle_0200] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -94,11 +94,11 @@ export default function textpicker() { ...@@ -94,11 +94,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0003 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0300
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0003', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0300', 0, async function (done) {
let value = {color:0x808080,font:{size:8,weight:100}} let value = {color:0x808080,font:{size:8,weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -110,15 +110,15 @@ export default function textpicker() { ...@@ -110,15 +110,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0003] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0300] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('100'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('100');
...@@ -126,11 +126,11 @@ export default function textpicker() { ...@@ -126,11 +126,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0004 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0400
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0004', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0400', 0, async function (done) {
let value = {color:'#ff0000',font:{size:'1px',weight:'700'}} let value = {color:'#ff0000',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -142,15 +142,15 @@ export default function textpicker() { ...@@ -142,15 +142,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0004] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0400] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('700'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('700');
...@@ -158,11 +158,11 @@ export default function textpicker() { ...@@ -158,11 +158,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0005 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0500
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0005', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -174,15 +174,15 @@ export default function textpicker() { ...@@ -174,15 +174,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0005] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0500] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -190,11 +190,11 @@ export default function textpicker() { ...@@ -190,11 +190,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0006 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0600
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0006', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -206,27 +206,31 @@ export default function textpicker() { ...@@ -206,27 +206,31 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0006] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('textPickerDefault');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('14.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0600] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual(objDefault.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual(objDefault.$attrs.disappearTextStyle.font.size);
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0007 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0700
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0007', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Bold}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Bold}}
try { try {
var eventData = { var eventData = {
...@@ -238,27 +242,31 @@ export default function textpicker() { ...@@ -238,27 +242,31 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0007] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('textPickerDefault');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('14.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0700] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual(objDefault.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual(objDefault.$attrs.disappearTextStyle.font.size);
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bold'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bold');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0008 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0800
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0008', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -270,10 +278,10 @@ export default function textpicker() { ...@@ -270,10 +278,10 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
...@@ -285,11 +293,11 @@ export default function textpicker() { ...@@ -285,11 +293,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0009 * @tc.number ArkUI_Stage_textpicker_disappearTextStyle_0900
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_disappearTextStyle_0009', 0, async function (done) { it('ArkUI_Stage_textpicker_disappearTextStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -301,10 +309,10 @@ export default function textpicker() { ...@@ -301,10 +309,10 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_textpicker_disappearTextStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_disappearTextStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
...@@ -316,14 +324,14 @@ export default function textpicker() { ...@@ -316,14 +324,14 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0001 * @tc.number ArkUI_Stage_textpicker_textStyle_0100
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0001', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_textStyle_0001] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_textpicker_textStyle_0100] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -331,11 +339,11 @@ export default function textpicker() { ...@@ -331,11 +339,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0002 * @tc.number ArkUI_Stage_textpicker_textStyle_0200
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0002', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0200', 0, async function (done) {
let value = {color:Color.Red,font:{size:'10px',weight:FontWeight.Bolder}} let value = {color:Color.Red,font:{size:'10px',weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -347,15 +355,15 @@ export default function textpicker() { ...@@ -347,15 +355,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_textpicker_textStyle_0002] disappearColor:" + obj.$attrs.textStyle.color); console.error("[ArkUI_Stage_textpicker_textStyle_0200] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -363,11 +371,11 @@ export default function textpicker() { ...@@ -363,11 +371,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0003 * @tc.number ArkUI_Stage_textpicker_textStyle_0300
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0003', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0300', 0, async function (done) {
let value = {color:0xFF808080,font:{size:'10px',weight:100}} let value = {color:0xFF808080,font:{size:'10px',weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -379,15 +387,15 @@ export default function textpicker() { ...@@ -379,15 +387,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_textStyle_0003] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_textpicker_textStyle_0300] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.textStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('100'); expect(obj.$attrs.textStyle.font.weight).assertEqual('100');
...@@ -395,11 +403,11 @@ export default function textpicker() { ...@@ -395,11 +403,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0004 * @tc.number ArkUI_Stage_textpicker_textStyle_0400
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0004', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0400', 0, async function (done) {
let value = {color:'#00ff00',font:{size:'1px',weight:'700'}} let value = {color:'#00ff00',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -411,15 +419,15 @@ export default function textpicker() { ...@@ -411,15 +419,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_textStyle_0004] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_textpicker_textStyle_0400] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF00FF00'); expect(obj.$attrs.textStyle.color).assertEqual('#FF00FF00');
expect(obj.$attrs.textStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('700'); expect(obj.$attrs.textStyle.font.weight).assertEqual('700');
...@@ -427,11 +435,11 @@ export default function textpicker() { ...@@ -427,11 +435,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0005 * @tc.number ArkUI_Stage_textpicker_textStyle_0500
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0005', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -443,15 +451,15 @@ export default function textpicker() { ...@@ -443,15 +451,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_textStyle_0005] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_textpicker_textStyle_0500] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.textStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.textStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.textStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -459,11 +467,11 @@ export default function textpicker() { ...@@ -459,11 +467,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0006 * @tc.number ArkUI_Stage_textpicker_textStyle_0600
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0006', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -475,27 +483,31 @@ export default function textpicker() { ...@@ -475,27 +483,31 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_textStyle_0006] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('textPickerDefault');
expect(obj.$attrs.textStyle.font.size).assertEqual('16.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_textpicker_textStyle_0600] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual(objDefault.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.font.size).assertEqual(objDefault.$attrs.textStyle.font.size);
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0007 * @tc.number ArkUI_Stage_textpicker_textStyle_0700
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0007', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}}
try { try {
var eventData = { var eventData = {
...@@ -507,27 +519,31 @@ export default function textpicker() { ...@@ -507,27 +519,31 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_textStyle_0007] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('textPickerDefault');
expect(obj.$attrs.textStyle.font.size).assertEqual('16.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_textpicker_textStyle_0700] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual(objDefault.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.font.size).assertEqual(objDefault.$attrs.textStyle.font.size);
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Lighter');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0008 * @tc.number ArkUI_Stage_textpicker_textStyle_0800
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0008', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -539,10 +555,10 @@ export default function textpicker() { ...@@ -539,10 +555,10 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
...@@ -554,11 +570,11 @@ export default function textpicker() { ...@@ -554,11 +570,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_textStyle_0009 * @tc.number ArkUI_Stage_textpicker_textStyle_0900
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_textStyle_0009', 0, async function (done) { it('ArkUI_Stage_textpicker_textStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -570,10 +586,10 @@ export default function textpicker() { ...@@ -570,10 +586,10 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_textStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_textpicker_textStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_textStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_textStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
...@@ -585,14 +601,14 @@ export default function textpicker() { ...@@ -585,14 +601,14 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0001 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0100
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0001', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0001] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0100] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bold'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bold');
...@@ -600,11 +616,11 @@ export default function textpicker() { ...@@ -600,11 +616,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0002 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0200
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0002', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0200', 0, async function (done) {
let value = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bolder}} let value = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -616,15 +632,15 @@ export default function textpicker() { ...@@ -616,15 +632,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_textpicker_selectedTextStyle_0002] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.error("[ArkUI_Stage_textpicker_selectedTextStyle_0200] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -632,11 +648,11 @@ export default function textpicker() { ...@@ -632,11 +648,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0003 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0300
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0003', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0300', 0, async function (done) {
let value = {color:0xFF808080,font:{size:'20px',weight:100}} let value = {color:0xFF808080,font:{size:'20px',weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -648,15 +664,15 @@ export default function textpicker() { ...@@ -648,15 +664,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0003] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0300] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('100'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('100');
...@@ -664,11 +680,11 @@ export default function textpicker() { ...@@ -664,11 +680,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0004 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0400
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0004', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0400', 0, async function (done) {
let value = {color:'#00ff00',font:{size:'1px',weight:'700'}} let value = {color:'#00ff00',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -680,15 +696,15 @@ export default function textpicker() { ...@@ -680,15 +696,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0004] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0400] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF00FF00'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF00FF00');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('700'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('700');
...@@ -696,11 +712,11 @@ export default function textpicker() { ...@@ -696,11 +712,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0005 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0500
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0005', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -712,15 +728,15 @@ export default function textpicker() { ...@@ -712,15 +728,15 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0005] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0500] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -728,11 +744,11 @@ export default function textpicker() { ...@@ -728,11 +744,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0006 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0600
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0006', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -744,27 +760,31 @@ export default function textpicker() { ...@@ -744,27 +760,31 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0006] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF007DFF'); let strJsonDefault = getInspectorByKey('textPickerDefault');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0600] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual(objDefault.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual(objDefault.$attrs.selectedTextStyle.font.size);
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0007 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0700
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0007', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}}
try { try {
var eventData = { var eventData = {
...@@ -776,27 +796,31 @@ export default function textpicker() { ...@@ -776,27 +796,31 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0007] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF007DFF'); let strJsonDefault = getInspectorByKey('textPickerDefault');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0700] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual(objDefault.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual(objDefault.$attrs.selectedTextStyle.font.size);
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Lighter');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0008 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0800
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0008', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -808,10 +832,10 @@ export default function textpicker() { ...@@ -808,10 +832,10 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
...@@ -823,11 +847,11 @@ export default function textpicker() { ...@@ -823,11 +847,11 @@ export default function textpicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0009 * @tc.number ArkUI_Stage_textpicker_selectedTextStyle_0900
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_textpicker_selectedTextStyle_0009', 0, async function (done) { it('ArkUI_Stage_textpicker_selectedTextStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -839,10 +863,10 @@ export default function textpicker() { ...@@ -839,10 +863,10 @@ export default function textpicker() {
eventId: 183, eventId: 183,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_textpicker_selectedTextStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_textpicker_selectedTextStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('textPicker'); let strJson = getInspectorByKey('textPicker');
......
...@@ -27,6 +27,10 @@ struct TimePickerExample { ...@@ -27,6 +27,10 @@ struct TimePickerExample {
@State textStyle: PickerTextStyle = {color:Color.Red,font:{size:'10px',weight:FontWeight.Normal}} @State textStyle: PickerTextStyle = {color:Color.Red,font:{size:'10px',weight:FontWeight.Normal}}
@State selectedTextStyle: PickerTextStyle = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bold}} @State selectedTextStyle: PickerTextStyle = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bold}}
@State disappearTextStyleDefault: PickerTextStyle = {color:$r("sys.color.ohos_id_color_text_primary"),font:{size:$r("sys.float.ohos_id_text_size_sub_title3"),weight:FontWeight.Lighter}}
@State textStyleDefault: PickerTextStyle = {color:$r("sys.color.ohos_id_color_text_primary"),font:{size:$r("sys.float.ohos_id_text_size_sub_title2"),weight:FontWeight.Normal}}
@State selectedTextStyleDefault: PickerTextStyle ={color:$r("sys.color.ohos_id_color_text_primary_activated"),font:{size:$r("sys.float.ohos_id_text_size_headline8"),weight:FontWeight.Bold}}
private stateChangCallBack = (eventData) => { private stateChangCallBack = (eventData) => {
console.info("select page state change called:" + JSON.stringify(eventData)); console.info("select page state change called:" + JSON.stringify(eventData));
if (eventData != null) { if (eventData != null) {
...@@ -68,6 +72,15 @@ struct TimePickerExample { ...@@ -68,6 +72,15 @@ struct TimePickerExample {
.onChange((date: TimePickerResult) => { .onChange((date: TimePickerResult) => {
console.info('select current date is: ' + JSON.stringify(date)) console.info('select current date is: ' + JSON.stringify(date))
}) })
TimePicker({selected: this.selectedTime})
.disappearTextStyle(this.disappearTextStyleDefault)
.textStyle(this.textStyleDefault)
.selectedTextStyle(this.selectedTextStyleDefault)
.key('timePickerDefault')
.onChange((date: TimePickerResult) => {
console.info('select current date is: ' + JSON.stringify(date))
})
} }
} }
} }
...@@ -48,14 +48,14 @@ export default function timepicker() { ...@@ -48,14 +48,14 @@ export default function timepicker() {
}) })
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0001 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0100
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0001', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0001] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0100] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Lighter');
...@@ -63,11 +63,11 @@ export default function timepicker() { ...@@ -63,11 +63,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0002 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0200
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0002', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0200', 0, async function (done) {
let value = {color:Color.Black,font:{size:8,weight:FontWeight.Bolder}} let value = {color:Color.Black,font:{size:8,weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -79,15 +79,15 @@ export default function timepicker() { ...@@ -79,15 +79,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_timepicker_disappearTextStyle_0002] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.error("[ArkUI_Stage_timepicker_disappearTextStyle_0200] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF000000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -95,11 +95,11 @@ export default function timepicker() { ...@@ -95,11 +95,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0003 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0300
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0003', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0300', 0, async function (done) {
let value = {color:0x808080,font:{size:8,weight:100}} let value = {color:0x808080,font:{size:8,weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -111,15 +111,15 @@ export default function timepicker() { ...@@ -111,15 +111,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timePicker_disappearTextStyle_0003] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_timePicker_disappearTextStyle_0300] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('8.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('100'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('100');
...@@ -127,11 +127,11 @@ export default function timepicker() { ...@@ -127,11 +127,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0004 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0400
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0004', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0400', 0, async function (done) {
let value = {color:'#ff0000',font:{size:'1px',weight:'700'}} let value = {color:'#ff0000',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -143,15 +143,15 @@ export default function timepicker() { ...@@ -143,15 +143,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0004] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0400] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('700'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('700');
...@@ -159,11 +159,11 @@ export default function timepicker() { ...@@ -159,11 +159,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0005 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0500
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0005', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -175,15 +175,15 @@ export default function timepicker() { ...@@ -175,15 +175,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0005] disappearColor:" + obj.$attrs.disappearTextStyle.color); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0500] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -191,11 +191,11 @@ export default function timepicker() { ...@@ -191,11 +191,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0006 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0600
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0006', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -207,27 +207,31 @@ export default function timepicker() { ...@@ -207,27 +207,31 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0006] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('timePickerDefault');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('14.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0600] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual(objDefault.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual(objDefault.$attrs.disappearTextStyle.font.size);
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0007 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0700
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0007', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Bold}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Bold}}
try { try {
var eventData = { var eventData = {
...@@ -239,27 +243,31 @@ export default function timepicker() { ...@@ -239,27 +243,31 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0007] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('timePickerDefault');
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual('14.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0700] disappearColor:" + obj.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.color).assertEqual(objDefault.$attrs.disappearTextStyle.color);
expect(obj.$attrs.disappearTextStyle.font.size).assertEqual(objDefault.$attrs.disappearTextStyle.font.size);
expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bold'); expect(obj.$attrs.disappearTextStyle.font.weight).assertEqual('FontWeight.Bold');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0008 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0800
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0008', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -271,10 +279,10 @@ export default function timepicker() { ...@@ -271,10 +279,10 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
...@@ -286,11 +294,11 @@ export default function timepicker() { ...@@ -286,11 +294,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0009 * @tc.number ArkUI_Stage_timepicker_disappearTextStyle_0900
* @tc.name Tests the disappearTextStyle property of the picker component * @tc.name Tests the disappearTextStyle property of the picker component
* @tc.desc set disappearTextStyle then get the value * @tc.desc set disappearTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_disappearTextStyle_0009', 0, async function (done) { it('ArkUI_Stage_timepicker_disappearTextStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -302,10 +310,10 @@ export default function timepicker() { ...@@ -302,10 +310,10 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_timepicker_disappearTextStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_disappearTextStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
...@@ -317,14 +325,14 @@ export default function timepicker() { ...@@ -317,14 +325,14 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0001 * @tc.number ArkUI_Stage_timepicker_textStyle_0100
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0001', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_textStyle_0001] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_timepicker_textStyle_0100] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -332,11 +340,11 @@ export default function timepicker() { ...@@ -332,11 +340,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0002 * @tc.number ArkUI_Stage_timepicker_textStyle_0200
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0002', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0200', 0, async function (done) {
let value = {color:Color.Red,font:{size:'10px',weight:FontWeight.Bolder}} let value = {color:Color.Red,font:{size:'10px',weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -348,15 +356,15 @@ export default function timepicker() { ...@@ -348,15 +356,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_timepicker_textStyle_0002] disappearColor:" + obj.$attrs.textStyle.color); console.error("[ArkUI_Stage_timepicker_textStyle_0200] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000'); expect(obj.$attrs.textStyle.color).assertEqual('#FFFF0000');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -364,11 +372,11 @@ export default function timepicker() { ...@@ -364,11 +372,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0003 * @tc.number ArkUI_Stage_timepicker_textStyle_0300
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0003', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0300', 0, async function (done) {
let value = {color:0xFF808080,font:{size:'10px',weight:100}} let value = {color:0xFF808080,font:{size:'10px',weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -380,15 +388,15 @@ export default function timepicker() { ...@@ -380,15 +388,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_textStyle_0003] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_timepicker_textStyle_0300] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.textStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('10.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('100'); expect(obj.$attrs.textStyle.font.weight).assertEqual('100');
...@@ -396,11 +404,11 @@ export default function timepicker() { ...@@ -396,11 +404,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0004 * @tc.number ArkUI_Stage_timepicker_textStyle_0400
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0004', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0400', 0, async function (done) {
let value = {color:'#00ff00',font:{size:'1px',weight:'700'}} let value = {color:'#00ff00',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -412,15 +420,15 @@ export default function timepicker() { ...@@ -412,15 +420,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_textStyle_0004] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_timepicker_textStyle_0400] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF00FF00'); expect(obj.$attrs.textStyle.color).assertEqual('#FF00FF00');
expect(obj.$attrs.textStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.textStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.textStyle.font.weight).assertEqual('700'); expect(obj.$attrs.textStyle.font.weight).assertEqual('700');
...@@ -428,11 +436,11 @@ export default function timepicker() { ...@@ -428,11 +436,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0005 * @tc.number ArkUI_Stage_timepicker_textStyle_0500
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0005', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -444,15 +452,15 @@ export default function timepicker() { ...@@ -444,15 +452,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_textStyle_0005] disappearColor:" + obj.$attrs.textStyle.color); console.info("[ArkUI_Stage_timepicker_textStyle_0500] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.textStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.textStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.textStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -460,11 +468,11 @@ export default function timepicker() { ...@@ -460,11 +468,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0006 * @tc.number ArkUI_Stage_timepicker_textStyle_0600
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0006', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -476,27 +484,31 @@ export default function timepicker() { ...@@ -476,27 +484,31 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_textStyle_0006] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('timePickerDefault');
expect(obj.$attrs.textStyle.font.size).assertEqual('16.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_timepicker_textStyle_0600] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual(objDefault.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.font.size).assertEqual(objDefault.$attrs.textStyle.font.size);
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0007 * @tc.number ArkUI_Stage_timepicker_textStyle_0700
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0007', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}}
try { try {
var eventData = { var eventData = {
...@@ -508,27 +520,31 @@ export default function timepicker() { ...@@ -508,27 +520,31 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_textStyle_0007] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual('#FF182431'); let strJsonDefault = getInspectorByKey('timePickerDefault');
expect(obj.$attrs.textStyle.font.size).assertEqual('16.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_timepicker_textStyle_0700] disappearColor:" + obj.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.color).assertEqual(objDefault.$attrs.textStyle.color);
expect(obj.$attrs.textStyle.font.size).assertEqual(objDefault.$attrs.textStyle.font.size);
expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.textStyle.font.weight).assertEqual('FontWeight.Lighter');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0008 * @tc.number ArkUI_Stage_timepicker_textStyle_0800
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0008', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -540,10 +556,10 @@ export default function timepicker() { ...@@ -540,10 +556,10 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
...@@ -555,11 +571,11 @@ export default function timepicker() { ...@@ -555,11 +571,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_textStyle_0009 * @tc.number ArkUI_Stage_timepicker_textStyle_0900
* @tc.name Tests the textStyle property of the picker component * @tc.name Tests the textStyle property of the picker component
* @tc.desc set textStyle then get the value * @tc.desc set textStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_textStyle_0009', 0, async function (done) { it('ArkUI_Stage_timepicker_textStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -571,10 +587,10 @@ export default function timepicker() { ...@@ -571,10 +587,10 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_textStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_timepicker_textStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_textStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_textStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
...@@ -586,14 +602,14 @@ export default function timepicker() { ...@@ -586,14 +602,14 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0001 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0100
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc get the default value * @tc.desc get the default value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0001', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0100', 0, async function (done) {
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0001] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0100] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bold'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bold');
...@@ -601,11 +617,11 @@ export default function timepicker() { ...@@ -601,11 +617,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0002 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0200
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0002', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0200', 0, async function (done) {
let value = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bolder}} let value = {color:Color.Blue,font:{size:'20px',weight:FontWeight.Bolder}}
try { try {
var eventData = { var eventData = {
...@@ -617,15 +633,15 @@ export default function timepicker() { ...@@ -617,15 +633,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0002] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0200] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0002] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0200] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.error("[ArkUI_Stage_timepicker_selectedTextStyle_0002] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.error("[ArkUI_Stage_timepicker_selectedTextStyle_0200] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF0000FF');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bolder'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Bolder');
...@@ -633,11 +649,11 @@ export default function timepicker() { ...@@ -633,11 +649,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0003 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0300
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0003', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0300', 0, async function (done) {
let value = {color:0xFF808080,font:{size:'20px',weight:100}} let value = {color:0xFF808080,font:{size:'20px',weight:100}}
try { try {
var eventData = { var eventData = {
...@@ -649,15 +665,15 @@ export default function timepicker() { ...@@ -649,15 +665,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0003] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0300] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0003] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0300] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0003] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0300] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF808080'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF808080');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('100'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('100');
...@@ -665,11 +681,11 @@ export default function timepicker() { ...@@ -665,11 +681,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0004 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0400
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0004', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0400', 0, async function (done) {
let value = {color:'#00ff00',font:{size:'1px',weight:'700'}} let value = {color:'#00ff00',font:{size:'1px',weight:'700'}}
try { try {
var eventData = { var eventData = {
...@@ -681,15 +697,15 @@ export default function timepicker() { ...@@ -681,15 +697,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0004] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0400] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0004] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0400] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0004] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0400] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF00FF00'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF00FF00');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('1.00px'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('1.00px');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('700'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('700');
...@@ -697,11 +713,11 @@ export default function timepicker() { ...@@ -697,11 +713,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0005 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0500
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0005', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0500', 0, async function (done) {
let value = {color:Color.Green,font:{size:30,weight:450}} let value = {color:Color.Green,font:{size:30,weight:450}}
try { try {
var eventData = { var eventData = {
...@@ -713,15 +729,15 @@ export default function timepicker() { ...@@ -713,15 +729,15 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0005] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0005] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0500] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0005] disappearColor:" + obj.$attrs.selectedTextStyle.color); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0500] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF008000'); expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF008000');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('30.00fp'); expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('30.00fp');
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal');
...@@ -729,11 +745,11 @@ export default function timepicker() { ...@@ -729,11 +745,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0006 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0600
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0006', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0600', 0, async function (done) {
let value = {color:'#80808g',font:{size:-1,weight:1000}} let value = {color:'#80808g',font:{size:-1,weight:1000}}
try { try {
var eventData = { var eventData = {
...@@ -745,27 +761,31 @@ export default function timepicker() { ...@@ -745,27 +761,31 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0006] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0600] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0006] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0600] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0006] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF007DFF'); let strJsonDefault = getInspectorByKey('timePickerDefault');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0600] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual(objDefault.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual(objDefault.$attrs.selectedTextStyle.font.size);
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Normal');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0007 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0700
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0007', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0700', 0, async function (done) {
let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}} let value = {color:'xxx',font:{size:'xxx',weight:FontWeight.Lighter}}
try { try {
var eventData = { var eventData = {
...@@ -777,27 +797,31 @@ export default function timepicker() { ...@@ -777,27 +797,31 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0007] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0700] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0007] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0700] change component data error: " + err.message);
} }
await Utils.sleep(2000); await Utils.sleep(2000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
let obj = JSON.parse(strJson); let obj = JSON.parse(strJson);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0007] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual('#FF007DFF'); let strJsonDefault = getInspectorByKey('timePickerDefault');
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual('20.00vp'); let objDefault = JSON.parse(strJsonDefault);
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0700] disappearColor:" + obj.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.color).assertEqual(objDefault.$attrs.selectedTextStyle.color);
expect(obj.$attrs.selectedTextStyle.font.size).assertEqual(objDefault.$attrs.selectedTextStyle.font.size);
expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Lighter'); expect(obj.$attrs.selectedTextStyle.font.weight).assertEqual('FontWeight.Lighter');
done(); done();
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0008 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0800
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0008', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0800', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}} let value = {color:'rgb(138,43,226)',font:{size:'20vp',weight:900}}
try { try {
var eventData = { var eventData = {
...@@ -809,10 +833,10 @@ export default function timepicker() { ...@@ -809,10 +833,10 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0008] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0800] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0008] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0800] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
...@@ -824,11 +848,11 @@ export default function timepicker() { ...@@ -824,11 +848,11 @@ export default function timepicker() {
}); });
/* /*
* @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0009 * @tc.number ArkUI_Stage_timepicker_selectedTextStyle_0900
* @tc.name Tests the selectedTextStyle property of the picker component * @tc.name Tests the selectedTextStyle property of the picker component
* @tc.desc set selectedTextStyle then get the value * @tc.desc set selectedTextStyle then get the value
*/ */
it('ArkUI_Stage_timepicker_selectedTextStyle_0009', 0, async function (done) { it('ArkUI_Stage_timepicker_selectedTextStyle_0900', 0, async function (done) {
let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}} let value = {color:'rgb(138,43,226)',font:{size:'15lpx',weight:90}}
try { try {
var eventData = { var eventData = {
...@@ -840,10 +864,10 @@ export default function timepicker() { ...@@ -840,10 +864,10 @@ export default function timepicker() {
eventId: 184, eventId: 184,
priority: events_emitter.EventPriority.LOW priority: events_emitter.EventPriority.LOW
} }
console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0009] start to publish emit"); console.info("[ArkUI_Stage_timepicker_selectedTextStyle_0900] start to publish emit");
events_emitter.emit(innerEvent, eventData); events_emitter.emit(innerEvent, eventData);
} catch (err) { } catch (err) {
console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0009] change component data error: " + err.message); console.log("[ArkUI_Stage_timepicker_selectedTextStyle_0900] change component data error: " + err.message);
} }
await Utils.sleep(3000); await Utils.sleep(3000);
let strJson = getInspectorByKey('timePicker'); let strJson = getInspectorByKey('timePicker');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册