提交 d272226f 编写于 作者: L luffy505

modify ace to arkui

Signed-off-by: Nluffy505 <zhangjuan54@huawei.com>
上级 ff6f27ca

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("AceEtsComponentTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":ace_ets_component_assets",
":ace_ets_component_resources",
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "AceEtsComponentTest"
}
ohos_js_assets("ace_ets_component_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
}
ohos_resources("ace_ets_component_resources") {
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
}
{
"description": "Configuration for aceceshi Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "1200000",
"package": "com.open.harmony.acetest",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"AceEtsComponentTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
{
"app": {
"bundleName": "com.open.harmony.acetest",
"vendor": "open",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 7,
"releaseType": "Release",
"target": 7
}
},
"deviceConfig": {},
"module": {
"package": "com.open.harmony.acetest",
"name": ".MyApplication",
"mainAbility": "com.open.harmony.acetest.MainAbility",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"orientation": "unspecified",
"visible": true,
"srcPath": "MainAbility",
"name": ".MainAbility",
"srcLanguage": "ets",
"icon": "$media:icon",
"description": "$string:description_mainability",
"formsEnabled": false,
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
}
],
"js": [
{
"mode": {
"syntax": "ets",
"type": "pageAbility"
},
"pages": [
"pages/index",
"pages/appear",
"pages/areaChange",
"pages/ellipse",
"pages/enable",
"pages/flex",
"pages/gauge",
"pages/global",
"pages/gridContainer",
"pages/gridSettings",
"pages/imageEffects",
"pages/layoutConstraints",
"pages/list",
"pages/marquee",
"pages/overlay",
"pages/stepper",
"pages/swiper",
"pages/textStyle",
"pages/touchAble",
"pages/touch",
"pages/visibility",
"pages/zIndex"
],
"name": ".MainAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter';
@Entry
@Component
struct ColumnExample {
@State alignItems: HorizontalAlign = HorizontalAlign.Start;
onPageShow() {
console.info('[column] page show called');
var stateChangeEvent = {
eventId: 192,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
}
private stateChangCallBack = (eventData) => {
console.info("[column] page stateChangCallBack");
if (eventData != null) {
console.info("[column] page state change called:" + JSON.stringify(eventData));
if(eventData.data.alignItems != null) {
this.alignItems = eventData.data.alignItems;
}
}
}
build() {
Column() {
Text('alignItems').fontSize(9).fontColor(0xCCCCCC).width('90%')
Column() {
Column().width('50%').height(30).backgroundColor(0xAFEEEE)
Column().width('50%').height(30).backgroundColor(0x00FFFF)
}
.key("alignItemsColumn")
.width('90%')
.border({ width: 1 })
.alignItems(this.alignItems)
}.width('100%').padding({ top: 5 })
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter';
@Entry
@Component
struct EllipseExample {
@State width: string = "200px";
@State height: string = "200px";
onPageShow() {
console.info('[ellipse] page show called');
var stateChangeEvent = {
eventId: 92,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
var stateChangeEventTwo = {
eventId: 907,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEventTwo, this.stateChangCallBack);
var stateChangeEventThree = {
eventId: 908,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEventThree, this.stateChangCallBack);
}
private stateChangCallBack = (eventData) => {
console.info("[ellipse] page stateChangCallBack");
if (eventData != null) {
console.info("[ellipse] page state change called:" + JSON.stringify(eventData));
if (eventData.data.width != null) {
this.width = eventData.data.width;
}
if (eventData.data.height != null) {
this.height = eventData.data.height;
}
}
}
build() {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Ellipse().width(`${this.width}`).height(`${this.height}`).key('ellipse')
}.width('100%').height('100%')
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter'
@Entry
@Component
struct EnabledExample {
@State enabled: boolean = true;
@State text: string = "enable";
onPageShow() {
console.info('[enabled] page show called ');
var stateChangeEvent = {
eventId: 93,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
var stateChangeEvent2 = {
eventId: 1111,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent2, this.stateChangCallBack);
}
private stateChangCallBack = (eventData) => {
console.info("[stateChangCallBack] stateChangCallBack ");
if (eventData != null) {
console.info("[stateChangCallBack] state change called: " + JSON.stringify(eventData));
if (eventData.data.enabled != null) {
this.enabled = eventData.data.enabled
}
if (eventData.data.text != null) {
this.text = eventData.data.text
}
}
}
build() {
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button('disable')
.enabled(false)
.backgroundColor(0x317aff)
.opacity(0.4)
Button(this.text)
.key('enabled')
.backgroundColor(0x317aff)
.enabled(this.enabled)
}
.width('100%')
.padding({ top: 5 })
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter';
@Entry
@Component
struct GaugeExample {
@State gaugeValue: string = 50;
@State strokeWidthValue: string = 20;
@State startAngleValue: string = 210;
@State endAngleValue: string = 150;
@State colorValues: Array = [[0x317AF7, 1], [0x5BA854, 1], [0xE08C3A, 1], [0x9C554B, 1], [0xD94838, 1]];
private stateChangCallBack = (eventData) => {
if (eventData != null) {
console.info("gauge page state change called:" + JSON.stringify(eventData));
if (eventData.data.gaugeValue != null) {
this.gaugeValue = eventData.data.gaugeValue;
}
if (eventData.data.strokeWidthValue != null) {
this.strokeWidthValue = eventData.data.strokeWidthValue;
}
if (eventData.data.startAngleValue != null) {
this.startAngleValue = eventData.data.startAngleValue;
}
if (eventData.data.endAngleValue != null) {
this.endAngleValue = eventData.data.endAngleValue;
}
if (eventData.data.colorValues != null) {
this.colorValues = JSON.parse(eventData.data.colorValues);
}
}
}
onPageShow() {
console.info('gauge page show called');
var stateChangeEvent = {
eventId: 102,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
var stateChangeEventTwo = {
eventId: 103,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEventTwo, this.stateChangCallBack);
var stateChangeEvent3 = {
eventId: 904,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent3, this.stateChangCallBack);
var stateChangeEvent4 = {
eventId: 905,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent4, this.stateChangCallBack);
var stateChangeEvent5 = {
eventId: 906,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent5, this.stateChangCallBack);
}
build() {
Column() {
Gauge({ value: 0, min: 0, max: 100 })
.key("gauge")
.value(`${this.gaugeValue}`)
.startAngle(`${this.startAngleValue}`)
.endAngle(`${this.endAngleValue}`)
.strokeWidth(`${this.strokeWidthValue}`)
.width(200)
.height(200)
}.width('100%').margin({ top: 300 })
}
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter';
class ContainerInfo {
label: string = ''
size: string = ''
};
class ChildInfo {
text: string = ''
priority: number = 0
};
@Entry
@Component
struct LayoutConstraints {
private children: string[] = ['1', '2', '3', '4', '5', '6'];
@State aspectRatio: number = 1.5;
private container: ContainerInfo[] = [
{ label: 'Big container', size: '97%' },
{ label: 'Small container', size: '30%' }];
@State priorityChildren: any[] = [
{ text: '1\n(priority:1)', priority: 1 },
{ text: '2\n(priority:2)', priority: 2 },
{ text: '3\n(priority:3)', priority: 3 },
{ text: '4\n(priority:4)', priority: 4 }];
@State currentIndex: number = 0;
build() {
Column({ space: 20 }) {
Text('using container: row').fontSize(20).fontColor(Color.Black).width('100%')
Row({ space: 10 }) {
ForEach(this.children, (item) => {
Text(item)
.backgroundColor(0xbbb2cb)
.fontSize(20)
.aspectRatio(this.aspectRatio)
.height(60)
Text(item)
.backgroundColor(0xbbb2cb)
.fontSize(20)
.aspectRatio(this.aspectRatio)
.width(60)
.key('aspectRatio')
}, item => item)
}
.size({ width: "100%", height: 100 })
.backgroundColor(0xd2cab3)
.clip(true)
Text('using container: grid').fontSize(20).fontColor(Color.Black).width('100%')
Grid() {
ForEach(this.children, (item) => {
GridItem() {
Text(item)
.backgroundColor(0xbbb2cb)
.fontSize(40)
.aspectRatio(this.aspectRatio)
}
}, item => item)
}
.columnsTemplate('1fr 1fr 1fr')
.columnsGap(10)
.rowsGap(10)
.size({ width: "100%", height: 165 })
.backgroundColor(0xd2cab3)
Text('displayPriority 4').fontSize(20).fontColor(Color.Black).width('100%')
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
ForEach(this.priorityChildren, (item) => {
if (item.priority === 1 || item.priority === 5) {
Text(`1\n(priority:${item.priority})`)
.width(135)
.height(60)
.fontSize(18)
.textAlign(TextAlign.Center)
.backgroundColor(0xbbb2cb)
.displayPriority(item.priority)
.key('displayPriority')
} else {
Text(item.text)
.width(135)
.height(60)
.fontSize(18)
.textAlign(TextAlign.Center)
.backgroundColor(0xbbb2cb)
.displayPriority(item.priority)
}
}, item => item.text)
}
.width(this.container[this.currentIndex].size)
.backgroundColor(0xd2cab3)
}.padding(10)
}
onPageShow() {
let aspectRatioChangeEvent = {
eventId: 20,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(aspectRatioChangeEvent, this.stateChangCallBack);
let priorityChangeEvent = {
eventId: 21,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(priorityChangeEvent, this.stateChangCallBack);
let priorityChangeEvent2 = {
eventId: 1112,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(priorityChangeEvent2, this.stateChangCallBack);
}
stateChangCallBack = (eventData) => {
console.info("LayoutConstraints page stateChangCallBack" + JSON.stringify(eventData));
if (eventData) {
if (eventData.data.aspectRatio) {
this.aspectRatio = eventData.data.aspectRatio;
} else if (eventData.data.displayPriority) {
let priority = JSON.parse(JSON.stringify(this.priorityChildren));
priority[0].priority = eventData.data.displayPriority;
this.priorityChildren = [];
this.priorityChildren = priority;
}
}
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter';
@Entry
@Component
struct ListExample {
private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
@State listDirection: Axis = Axis.Vertical;
@State editMode: boolean = false;
@State edgeEffect: EdgeEffect = EdgeEffect.None;
@State chainAnimation: boolean = false;
@State strokeWidth: number = 2.000000;
@State color: string = 0xFFFFFF;
@State startMargin: number = 20.000000;
@State endMargin: number = 20.000000;
onPageShow() {
console.info('[list] page show called');
var stateChangeEvent = {
eventId: 124,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
var stateChangeEventTwo = {
eventId: 125,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEventTwo, this.stateChangCallBackTwo);
var stateChangeEvent3 = {
eventId: 901,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent3, this.stateChangCallBackTwo);
var stateChangeEvent4 = {
eventId: 902,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent4, this.stateChangCallBackTwo);
var stateChangeEvent5 = {
eventId: 903,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent5, this.stateChangCallBackTwo);
}
private stateChangCallBack = (eventData) => {
console.info("[stateChangCallBack] stateChangCallBack");
if (eventData != null) {
console.info("[stateChangCallBack] state change called:" + JSON.stringify(eventData));
if (eventData.data.listDirection != null) {
this.listDirection = eventData.data.listDirection;
}
if (eventData.data.editMode != null) {
this.editMode = eventData.data.editMode;
}
if (eventData.data.edgeEffect != null) {
this.edgeEffect = eventData.data.edgeEffect;
}
if (eventData.data.chainAnimation != null) {
this.chainAnimation = eventData.data.chainAnimation;
}
}
}
private stateChangCallBackTwo = (eventData) => {
console.info("[stateChangCallBackTwo] stateChangCallBack");
if (eventData != null) {
console.info("[stateChangCallBackTwo] state change called:" + JSON.stringify(eventData));
if (eventData.data.strokeWidth != null) {
this.strokeWidth = eventData.data.strokeWidth;
}
if (eventData.data.color != null) {
this.color = eventData.data.color;
}
if (eventData.data.startMargin != null) {
this.startMargin = eventData.data.startMargin;
}
if (eventData.data.endMargin != null) {
this.endMargin = eventData.data.endMargin;
}
}
}
build() {
Stack({ alignContent: Alignment.TopStart }) {
Column() {
List({ space: 20, initialIndex: 0 }) {
ForEach(this.arr, (item) => {
ListItem() {
Text('' + item)
.width('100%')
.height(100)
.fontSize(16)
.textAlign(TextAlign.Center)
.borderRadius(10)
.backgroundColor(0xFFFFFF)
}.editable(true)
}, item => item)
}
.key('list')
.listDirection(this.listDirection)
.divider({
strokeWidth: this.strokeWidth,
color: this.color,
startMargin: this.startMargin,
endMargin: this.endMargin
})
.edgeEffect(this.edgeEffect)
.chainAnimation(this.chainAnimation)
.multiSelectable(true)
.onScrollIndex((firstIndex: number, lastIndex: number) => {
console.info('first' + firstIndex)
console.info('last' + lastIndex)
})
.onScroll((scrollOffset: number, scrollState: ScrollState) => {
console.info('scrollOffset:' + scrollOffset)
console.info('scrollState:' + scrollState)
})
.editMode(this.editMode)
.onItemDelete((index: number) => {
console.info(this.arr[index] + 'Delete')
this.arr.splice(index, 1)
console.info(JSON.stringify(this.arr))
this.editFlag = false
return true
})
.width('90%')
}.width('100%')
Button('edit list')
.onClick(() => {
this.editMode = !this.editMode
}).margin({ top: 5, left: 20 })
}.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 })
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter'
@Entry
@Component
struct OverlayExample {
@State title: string = 'old title'
@State x: number = 0
@State y: number = -15
@State alignment: Alignment = Alignment.Bottom
onPageShow() {
console.info('[overlay] page show called ');
var stateChangeEvent = {
eventId: 143,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
var stateChangeEvent2 = {
eventId: 1110,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent2, this.stateChangCallBack);
}
private stateChangCallBack = (eventData) => {
console.info("[stateChangCallBack] stateChangCallBack ");
if (eventData != null) {
console.info("[stateChangCallBack] state change called: " + JSON.stringify(eventData));
if (eventData.data.align != null) {
this.alignment = eventData.data.align
}
if (eventData.data.title != null) {
this.title = eventData.data.title
}
if (eventData.data.x != null) {
this.x = eventData.data.x
}
if (eventData.data.y != null) {
this.y = eventData.data.y
}
}
}
build() {
Column() {
Column() {
Text('floating layer')
.fontSize(12).fontColor(0xCCCCCC).maxLines(1)
Column() {
Image('/images/img.jpeg')
.width(340).height(240)
.key('overlay')
.overlay(this.title,
{ align: this.alignment, offset: { x: this.x, y: this.y } })
}.border({ color: Color.Black, width: 2 })
}.width('100%')
}.padding({ top: 20 })
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter'
@Entry
@Component
struct StepperExample {
@State currentIndex: number = 0
@State firstState: ItemState = ItemState.Normal
@State secondState: ItemState = ItemState.Normal
@State disabled: ItemState = ItemState.Normal
build() {
Stepper({
index: this.currentIndex
}) {
StepperItem() {
Text('Page One')
.fontSize(35)
.fontColor(Color.Blue)
.width(200)
.lineHeight(50)
.margin({ top: 250 })
}
.nextLabel('')
.position({ x: '35%', y: 0 })
.key('stepperItem1')
StepperItem() {
Text('Page Two')
.fontSize(35)
.fontColor(Color.Blue)
.width(200)
.lineHeight(50)
.margin({ top: 250 })
.key('text1')
.onClick(() => {
this.firstState = this.firstState === ItemState.Skip ? ItemState.Normal : ItemState.Skip
})
}
.nextLabel('Next')
.prevLabel('Previous')
.status(this.firstState)
.position({ x: '35%', y: 0 })
.key('stepperItem2')
StepperItem() {
Text('Page Three')
.fontSize(35)
.fontColor(Color.Blue)
.width(200)
.lineHeight(50)
.margin({ top: 250 })
.key('text2')
.onClick(() => {
this.secondState = this.secondState === ItemState.Waiting ? ItemState.Normal : ItemState.Waiting
})
}
.position({ x: '35%', y: 0 })
.status(this.secondState)
.key('stepperItem3')
StepperItem() {
Text('Page four')
.fontSize(35)
.fontColor(Color.Blue)
.width(200)
.lineHeight(50)
.margin({ top: 250 })
}
.position({ x: '35%', y: 0 })
.nextLabel('Finish')
.key('stepperItem4')
}
.onFinish(() => {
console.log('onFinish')
})
.onSkip(() => {
console.log('onSkip')
})
.onChange((prevIndex: number, index: number) => {
this.currentIndex = index
})
.align(Alignment.Center)
.key('stepper')
}
onPageShow() {
console.info('stepper page show called');
var stateChangeEvent = {
eventId: 202,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack)
var stateChangeEventTwo = {
eventId: 909,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEventTwo, this.stateChangCallBack);
var stateChangeEventThree = {
eventId: 910,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEventThree, this.stateChangCallBack);
}
private stateChangCallBack = (eventData) => {
console.info("stepper page stateChangCallBack" + JSON.stringify(eventData));
if (eventData != null) {
console.info("stepper page state change called:" + JSON.stringify(eventData));
if (eventData.data.currentIndex != null) {
this.currentIndex = parseInt(eventData.data.currentIndex);
}
if (eventData.data.disabled != null) {
this.disabled = eventData.data.disabled;
}
}
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter';
@Entry
@Component
struct VisibilityExample {
@State visibility: Visibility = Visibility.Visible;
onPageShow() {
let hiddenChangeEvent = {
eventId: 47,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(hiddenChangeEvent, this.hiddenChangCallBack)
let noneChangeEvent = {
eventId: 48,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(noneChangeEvent, this.noneChangCallBack)
var stateChangeEvent2 = {
eventId: 1116,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent2, this.stateChangCallBack);
}
private hiddenChangCallBack = (eventData) => {
console.info("[hiddenChangCallBack] stateChangCallBack");
if (eventData != null) {
console.info("[hiddenChangCallBack] state change called:" + JSON.stringify(eventData));
if (eventData.data.visibility != null) {
this.visibility = eventData.data.visibility;
}
}
}
private noneChangCallBack = (eventData) => {
console.info("[noneChangCallBack] stateChangCallBack");
if (eventData != null) {
console.info("[noneChangCallBack] state change called:" + JSON.stringify(eventData));
if (eventData.data.visibility != null) {
this.visibility = eventData.data.visibility;
}
}
}
build() {
Column() {
Column() {
Text('BoxOne').fontSize(9).width('90%').fontColor(0xCCCCCC)
Row()
.visibility(this.visibility)
.width('90%')
.height(80)
.backgroundColor(0xAFEEEE)
.padding(20)
.key('box')
Text('BoxTwo').fontSize(9).width('90%').fontColor(0xCCCCCC)
Row()
.visibility(Visibility.Visible)
.width('90%')
.height(80)
.backgroundColor(0xAFEEEE)
.padding(20)
}.width('90%').border({ width: 1 })
}.width('100%').margin({ top: 5 })
}
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.emitter'
@Entry
@Component
struct zIndexExample {
@State zIndex: number = 1;
onPageShow() {
console.info('[zIndex] page show called ');
var stateChangeEvent = {
eventId: 236,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
var stateChangeEvent2 = {
eventId: 1113,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent2, this.stateChangCallBack);
}
private stateChangCallBack = (eventData) => {
console.info("[stateChangCallBack] stateChangCallBack ");
if (eventData != null) {
console.info("[stateChangCallBack] state change called: " + JSON.stringify(eventData));
if (eventData.data.zIndex != null) {
this.zIndex = eventData.data.zIndex
}
}
}
build() {
Column() {
Stack() {
Text('first child, zIndex(2)')
.size({ width: '40%', height: '60%' }).backgroundColor(0xbbb2cb)
.zIndex(2)
Text('second child, default zIndex(0)')
.size({ width: '90%', height: '80%' }).backgroundColor(0xd2cab3).align(Alignment.TopStart)
Text('third child, zIndex(1)')
.size({ width: '70%', height: '50%' })
.backgroundColor(0xc1cbac)
.align(Alignment.TopStart)
.zIndex(this.zIndex)
.key('zIndex')
}
}.width('100%').height(200)
}
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter'
import Utils from './Utils.ets';
export default function appearJsunit() {
describe('appearTest', function () {
beforeEach(async function (done) {
console.info("appear beforeEach start");
let options = {
uri: 'pages/appear',
}
let result;
try {
router.clear();
let pages = router.getState();
console.info("get appear state pages: " + JSON.stringify(pages));
if (!("appear" == pages.name)) {
console.info("get appear state pages.name: " + JSON.stringify(pages.name));
result = await router.push(options);
await Utils.sleep(2000);
console.info("push appear page result: " + JSON.stringify(result));
}
} catch (err) {
console.error("push appear page error: " + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("appear after each called");
})
it('testAppear01', 0, async function (done) {
console.info('[testAppear01] START');
await Utils.sleep(1000);
try {
let callBackAppear = (backData) => {
console.info("testAppear01 get appearEvent result is: " + JSON.stringify(appearEvent));
expect(backData.data.ACTION).assertEqual(true);
}
var appearEvent = {
eventId: 58,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(appearEvent, callBackAppear);
} catch (err) {
console.info("testAppear01 on appearEvent err : " + JSON.stringify(err));
}
console.info("testAppear01 click result is: " + JSON.stringify(sendEventByKey('appear', 10, "")));
console.info('[testAppear01] END');
done();
});
it('testAppear02', 0, async function (done) {
console.info('[testAppear02] START');
await Utils.sleep(1000);
try {
let callBackAppear = (backData) => {
console.info("testAppear02 get appearEvent result is: " + JSON.stringify(appearEvent));
expect(backData.data.ACTION).assertEqual(true);
}
var appearEvent = {
eventId: 59,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(appearEvent, callBackAppear);
} catch (err) {
console.info("testAppear02 on appearEvent err : " + JSON.stringify(err));
}
console.info("testAppear02 appearEvent click result is: " + JSON.stringify(sendEventByKey('appear', 10, "")));
try {
let callBackDisAppear = (backData) => {
console.info("testAppear02 get disAppearEvent result is: " + JSON.stringify(disAppearEvent));
expect(backData.data.ACTION).assertEqual(true);
}
var disAppearEvent = {
eventId: 60,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(disAppearEvent, callBackDisAppear);
} catch (err) {
console.info("testAppear02 on disAppearEvent err : " + JSON.stringify(err));
}
console.info("testAppear02 disAppearEvent click result is: " + JSON.stringify(sendEventByKey('appear', 10, "")));
console.info('[testAppear02] END');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter'
import Utils from './Utils.ets';
export default function areaChangeJsunit() {
describe('areaChangeTest', function () {
beforeEach(async function (done) {
let options = {
uri: 'pages/areaChange',
}
try {
router.clear();
let pages = router.getState();
console.info("get areaChange state success " + JSON.stringify(pages));
if (!("areaChange" == pages.name)) {
console.info("get areaChange state success " + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(1000);
console.info("push areaChange page success " + JSON.stringify(result));
}
} catch (err) {
console.error("push areaChange page error: " + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("areaChange after each called");
});
it('areaChangeTest_0300', 0, async function (done) {
console.info('areaChangeTest_0300 START');
await Utils.sleep(1000);
let callback = (indexEvent) => {
console.info("areaChangeTest_0300 get state result is: " + JSON.stringify(indexEvent));
expect(indexEvent.data.value).assertEqual('TextText');
}
let indexEvent = {
eventId: 61,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(indexEvent, callback);
} catch (err) {
console.info("areaChangeTest_0300 on events_emitter err : " + JSON.stringify(err));
}
console.info("areaChangeTest_0300 click result is: " + JSON.stringify(sendEventByKey('text1', 10, "")));
var innerEventOne = {
eventId: 62,
priority: events_emitter.EventPriority.LOW
}
await Utils.sleep(1500);
var callback1 = (eventData) => {
console.info("areaChangeTest_0300 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.ACTION).assertEqual(true);
}
try {
events_emitter.on(innerEventOne, callback1);
} catch (err) {
console.info("areaChangeTest_0300 on events_emitter err : " + JSON.stringify(err));
}
console.info('areaChangeTest_0300 END');
done();
});
it('areaChangeTest_0400', 0, async function (done) {
console.info('areaChangeTest_0400 START');
await Utils.sleep(1000);
let callback = (indexEvent) => {
console.info("areaChangeTest_0400 get state result is: " + JSON.stringify(indexEvent));
expect(indexEvent.data.value).assertEqual('TextTextText');
}
let indexEvent = {
eventId: 62,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(indexEvent, callback);
} catch (err) {
console.info("areaChangeTest_0400 on events_emitter err : " + JSON.stringify(err));
}
console.info("areaChangeTest_0400 click result is: " + JSON.stringify(sendEventByKey('text1', 10, "")));
console.info('areaChangeTest_0400 END');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets";
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets';
export default function columnJsunit() {
describe('columnTest', function () {
beforeEach(async function (done) {
console.info("column beforeEach start");
let options = {
uri: 'pages/column',
}
try {
router.clear();
let pages = router.getState();
console.info("get column state pages:" + JSON.stringify(pages));
if (!("column" == pages.name)) {
console.info("get column state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push column page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push column page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("column after each called");
});
it('testColumn01', 0, async function (done) {
console.info('[testColumn01] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('alignItemsColumn');
let obj = JSON.parse(strJson);
console.info("[testColumn01] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.alignItems).assertEqual('HorizontalAlign.Start');
console.info('[testColumn01] END');
done();
});
it('testColumn02', 0, async function (done) {
console.info('[testColumn02] START');
try {
var eventData = {
data: {
"alignItems":HorizontalAlign.Center
}
}
var innerEvent = {
eventId: 192,
priority: events_emitter.EventPriority.LOW
}
console.info("[testColumn02] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testColumn02] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('alignItemsColumn');
let obj = JSON.parse(strJson);
console.info("[testColumn02] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.alignItems).assertEqual('HorizontalAlign.Center');
console.info('[testColumn02] END');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets";
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets';
export default function ellipseJsunit() {
describe('ellipseTest', function () {
beforeEach(async function (done) {
console.info("ellipse beforeEach start");
let options = {
uri: 'pages/ellipse',
}
try {
router.clear();
let pages = router.getState();
console.info("get ellipse state pages:" + JSON.stringify(pages));
if (!("ellipse" == pages.name)) {
console.info("get ellipse state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push ellipse page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push ellipse page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("ellipse after each called");
});
it('testEllipse01', 0, async function (done) {
console.info('[testEllipse01] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testEllipse02] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.height).assertEqual('200.00px');
expect(obj.$attrs.width).assertEqual('200.00px');
console.info('testEllipse02 END');
done();
});
it('testEllipse02', 0, async function (done) {
console.info('[testEllipse02] START');
try {
var eventData = {
data: {
"width": '100px'
}
}
var innerEvent = {
eventId: 92,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEllipse02] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEllipse02] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testEllipse02] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.width).assertEqual('100.00px');
console.info('testEllipse02 END');
done();
});
it('testEllipse03', 0, async function (done) {
console.info('[testEllipse03] START');
try {
var eventData = {
data: {
"height": '500px'
}
}
var innerEvent = {
eventId: 92,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEllipse03] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEllipse03] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testEllipse03] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.height).assertEqual('500.00px');
console.info('testEllipse03 END');
done();
});
it('testEllipse04', 0, async function (done) {
console.info('[testEllipse04] START');
try {
var eventData = {
data: {
"width": '1111111111111'
}
}
var innerEvent = {
eventId: 907,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEllipse04] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEllipse04] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testEllipse04] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.width).assertEqual('1111111111111.00px');
console.info('testEllipse04 END');
done();
});
it('testEllipse05', 0, async function (done) {
console.info('[testEllipse05] START');
try {
var eventData = {
data: {
"height": '12111111111111'
}
}
var innerEvent = {
eventId: 907,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEllipse05] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEllipse05] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testEllipse05] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.height).assertEqual('12111111111111.00px');
console.info('testEllipse05 END');
done();
});
it('testEllipse06', 0, async function (done) {
console.info('[testEllipse06] START');
try {
var eventData = {
data: {
"height": '-40'
}
}
var innerEvent = {
eventId: 908,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEllipse06] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEllipse06] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testEllipse06] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.height).assertEqual('-40.00px');
console.info('testEllipse06 END');
done();
});
it('testEllipse07', 0, async function (done) {
console.info('[testEllipse07] START');
try {
var eventData = {
data: {
"width": '-10'
}
}
var innerEvent = {
eventId: 908,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEllipse07] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEllipse07] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testEllipse07] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.width).assertEqual('-10.00px');
console.info('testEllipse07 END');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter'
import Utils from './Utils.ets';
export default function enableJsunit() {
describe('enableTest', function () {
beforeEach(async function (done) {
console.info("enable beforeEach start");
let options = {
uri: 'pages/enable',
}
try {
router.clear();
let pages = router.getState();
console.info("get enable state pages: " + JSON.stringify(pages));
if (!("enable" == pages.name)) {
console.info("get enable state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push enable page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push enable page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("enable after each called");
});
it('testEnable01', 0, async function (done) {
console.info('[testEnable01] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('enabled');
let obj = JSON.parse(strJson);
console.info("[testEnable01] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.enabled).assertEqual(true);
console.info('[testEnable01] END');
done();
});
it('testEnable02', 0, async function (done) {
console.info('[testEnable02] START');
try {
var eventData = {
data: {
"enabled": false,
"text": "disable"
}
}
var innerEvent = {
eventId: 93,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEnable02] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEnable02] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('enabled');
let obj = JSON.parse(strJson);
console.info("[testEnable02] obj is: " + JSON.stringify(obj.$attrs.enabled));
expect(obj.$attrs.enabled).assertEqual(false);
console.info('testEnable02 END');
done();
});
it('testEnable03', 0, async function (done) {
console.info('[testEnable03] START');
try {
var eventData = {
data: {
"enabled": -3
}
}
var innerEvent = {
eventId: 1111,
priority: events_emitter.EventPriority.LOW
}
console.info("[testEnable03] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testEnable03] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('enabled');
let obj = JSON.parse(strJson);
console.info("[testEnable03] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.enabled).assertEqual(true);
console.info('testEnable03 END');
done();
});
it('testEnable04', 0, async function (done) {
console.info('testEnable04 START');
try {
let eventData = {
data: {
"enabled": 33567444
}
}
let indexEvent = {
eventId: 1111,
priority: events_emitter.EventPriority.LOW
}
console.info("testEnable04 start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("testEnable04 change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('enabled');
let objNew = JSON.parse(strJsonNew);
console.info("testEnable04 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.enabled).assertEqual(true);
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets";
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets';
export default function gaugeJsunit() {
describe('gaugeTest', function () {
beforeEach(async function (done) {
let options = {
uri: 'pages/gauge',
}
try {
router.clear();
let pages = router.getState();
console.info("get gauge state success " + JSON.stringify(pages));
if (!("gauge" == pages.name)) {
console.info("get gauge state success " + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push gauge page success " + JSON.stringify(result));
}
} catch (err) {
console.error("push gauge page error " + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(2000);
console.info("gauge after each called");
});
it('testGauge001', 0, async function (done) {
console.info('[testGauge001] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('gauge');
let obj = JSON.parse(strJson);
console.info("[testGauge001] component obj is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Gauge');
expect(obj.$attrs.strokeWidth).assertEqual('20.00vp');
expect(obj.$attrs.width).assertEqual('200.00vp');
expect(obj.$attrs.height).assertEqual('200.00vp');
expect(obj.$attrs.value).assertEqual('50.00');
done();
});
it('testGauge002', 0, async function (done) {
console.info('[testGauge002] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"gaugeValue": "10"
}
}
var innerEvent = {
eventId: 102,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge002] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge002] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge002] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.value).assertEqual('10.00');
done();
});
it('testGauge003', 0, async function (done) {
console.info('[testGauge003] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"strokeWidthValue": "30",
}
}
var innerEvent = {
eventId: 102,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge003] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge003] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge003] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.strokeWidth).assertEqual('30.00vp');
done();
});
it('testGauge004', 0, async function (done) {
console.info('[testGauge004] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"startAngleValue": "200"
}
}
var innerEvent = {
eventId: 102,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge004] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge004] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge004] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.startAngle).assertEqual('200.00');
done();
});
it('testGauge005', 0, async function (done) {
console.info('[testGauge005] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"endAngleValue": "200"
}
}
var innerEvent = {
eventId: 102,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge005] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge005] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge005] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.endAngle).assertEqual('200.00');
done();
});
it('testGauge006', 0, async function (done) {
console.info('[testGauge006] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"colorValues": JSON.stringify([[0x317AF7, 1], [0x5BA854, 1], [0xE08C3A, 1]])
}
}
var innerEvent = {
eventId: 103,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge006] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge006] change component data error: " + err.message);
}
done();
});
it('testGauge007', 0, async function (done) {
console.info('[testGauge007] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"gaugeValue": "-10"
}
}
var innerEvent = {
eventId: 904,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge007] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge007] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge007] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.value).assertEqual('-10.00');
done();
});
it('testGauge008', 0, async function (done) {
console.info('[testGauge008] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"gaugeValue": 'nan'
}
}
var innerEvent = {
eventId: 904,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge008] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge008] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge008] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.value).assertEqual('nan');
done();
});
it('testGauge009', 0, async function (done) {
console.info('[testGauge009] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"strokeWidthValue": "-30",
}
}
var innerEvent = {
eventId: 904,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge009] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge009] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge009] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.strokeWidth).assertEqual('-30.00vp');
done();
});
it('testGauge010', 0, async function (done) {
console.info('[testGauge010] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"startAngleValue": "-10"
}
}
var innerEvent = {
eventId: 905,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge010] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge010] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge010] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.startAngle).assertEqual('-10.00');
done();
});
it('testGauge011', 0, async function (done) {
console.info('[testGauge011] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"startAngleValue": "nan"
}
}
var innerEvent = {
eventId: 905,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge011] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge011] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge011] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.startAngle).assertEqual('nan');
done();
});
it('testGauge012', 0, async function (done) {
console.info('[testGauge012] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"endAngleValue": "nan"
}
}
var innerEvent = {
eventId: 906,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge012] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge012] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge012] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.endAngle).assertEqual('nan');
done();
});
it('testGauge013', 0, async function (done) {
console.info('[testGauge013] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"endAngleValue": "-10"
}
}
var innerEvent = {
eventId: 906,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge013] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge013] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge013] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.endAngle).assertEqual('-10.00');
done();
});
it('testGauge014', 0, async function (done) {
console.info('[testGauge014] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"strokeWidthValue": "121111111"
}
}
var innerEvent = {
eventId: 905,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGauge014] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGauge014] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJsonNew = getInspectorByKey('gauge');
let objNew = JSON.parse(strJsonNew);
console.info("[testGauge014] component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.strokeWidth).assertEqual('121111111.00vp');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import Utils from './Utils.ets';
export default function globalJsunit() {
describe('globalJsunit', function () {
beforeEach(async function (done) {
console.info("global beforeEach start");
let options = {
uri: 'pages/global',
}
try {
router.clear();
let pages = router.getState();
console.info("get global state pages:" + JSON.stringify(pages));
if (!("global" == pages.name)) {
console.info("get global state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push global page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push global page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
});
/**
* @tc.number ACE_global_setTimeout
* @tc.name setTimeout()
* @tc.desc Test setTimeout
*/
it('ACE_global_setTimeout', 0, function (done) {
let caseName: string = "ACE_global_setTimeout"
console.info(`${caseName} START`);
setTimeout(() => {
expect(true).assertTrue();
}, 100)
console.info(`${caseName} END`);
done();
});
/**
* @tc.number ACE_global_canIUse
* @tc.name canIUse()
* @tc.desc Test canIUse
*/
it('ACE_global_canIUse', 0, function (done) {
let caseName: string = "ACE_global_canIUse"
console.info(`${caseName} START`);
let syscapName: string = "";
var result = canIUse(syscapName);
expect(result === false).assertTrue();
console.info(`${caseName} END`);
done();
});
/**
* @tc.number ACE_global_getApp
* @tc.name getApp()
* @tc.desc Test getApp
*/
it('ACE_global_getApp', 0, function (done) {
let caseName: string = "ACE_global_getApp"
console.info(`${caseName} START`);
try {
var info = getApp();
} catch (err) {
}
console.info(`${caseName} END`);
done();
});
/**
* @tc.number ACE_global_createLocalParticleAbility
* @tc.name createLocalParticleAbility()
* @tc.desc Test createLocalParticleAbility
*/
it('ACE_global_createLocalParticleAbility', 0, function (done) {
let caseName: string = "ACE_global_createLocalParticleAbility"
console.info(`${caseName} START`);
try {
var info = createLocalParticleAbility(100);
} catch (err) {
}
console.info(`${caseName} END`);
done();
});
/**
* @tc.number ACE_global_console_log_0100
* @tc.name console::log
* @tc.desc Test console log printing
*/
it("ACE_global_console_log_0100", 0, async function (done) {
var casename = "ACE_global_001";
console.log("-----------------------ACE_global_console_log Test is starting-----------------------");
try {
console.log("ACE_global_console_log test ok");
expect(true).assertTrue();
} catch (error) {
console.log(casename + "errorcode: " + casename);
expect().assertFail();
done();
}
console.log("-----------------------ACE_global_console_log Test end-----------------------");
done();
});
/**
* @tc.number ACE_global_console_info_0100
* @tc.name console::info
* @tc.desc Test console info printing
*/
it("ACE_global_console_info_0100", 0, async function (done) {
var casename = "ACE_global_002";
console.log("-----------------------ACE_global_console_info Test is starting-----------------------");
try {
console.info("ACE_global_console_info test ok");
expect(true).assertTrue();
} catch (error) {
console.log(casename + "errorcode: " + casename);
expect().assertFail();
done();
}
console.log("-----------------------ACE_global_console_info Test end-----------------------");
done();
});
/**
* @tc.number ACE_global_console_warn_0100
* @tc.name console::warn
* @tc.desc Test console warn printing
*/
it("ACE_global_console_warn_0100", 0, async function (done) {
var casename = "ACE_global_003";
console.log("-----------------------ACE_global_console_warn Test is starting-----------------------");
try {
console.warn("ACE_global_console_warn test ok");
expect(true).assertTrue();
} catch (error) {
console.log(casename + "errorcode: " + casename);
expect().assertFail();
done();
}
console.log("-----------------------ACE_global_console_warn Test end-----------------------");
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets';
export default function girdContainerJsunit() {
describe('girdContainerTest', function () {
beforeEach(async function (done) {
console.info("girdContainer beforeEach start");
let options = {
uri: 'pages/gridContainer',
}
try {
router.clear();
let pages = router.getState();
console.info("get girdContainer state pages:" + JSON.stringify(pages));
if (!("gridContainer" == pages.name)) {
console.info("get girdContainer state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push girdContainer page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push girdContainer page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("girdContainer after each called");
});
it('testGirdContainer01', 0, async function (done) {
console.info('[testGirdContainer01] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('gridContainer');
let obj = JSON.parse(strJson);
console.info("[testGirdContainer01] obj is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('GridContainer');
expect(obj.$attrs.constructor.columns).assertEqual('12');
expect(obj.$attrs.constructor.sizeType).assertEqual('SizeType.XS');
expect(obj.$attrs.constructor.gutter).assertEqual('10.00vp');
expect(obj.$attrs.constructor.margin).assertEqual('20.00vp');
console.info('testGirdContainer01 END');
done();
});
it('testGirdContainer02', 0, async function (done) {
console.info('[testEllipse02] START');
try {
var eventData = {
data: {
"sizeType": 'SM'
}
}
var innerEvent = {
eventId: 109,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGirdContainer02] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testGirdContainer02] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('gridContainer');
let obj = JSON.parse(strJson);
console.info("[testGirdContainer02] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.constructor.sizeType).assertEqual('SizeType.SM');
console.info('testGirdContainer02 END');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets';
export default function gridSettingsJsunit() {
describe('gridSettingsTest', function () {
beforeEach(async function (done) {
let options = {
uri: 'pages/gridSettings',
}
try {
router.clear();
let pages = router.getState();
console.info("get gridSettings state pages:" + JSON.stringify(pages));
if (!("textStyle" == pages.name)) {
console.info("get gridSettings state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push gridSettings page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push gridSettings page error:" + err);
}
done();
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("gridSettings after each called");
});
it('testGridSettings000', 0, async function (done) {
console.info('[testGridSettings000] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('gridContainer');
console.info("[testGridSettings000] component strJson:" + strJson);
expect(true).assertEqual(true);
done();
});
it('testGridSettings001', 0, async function (done) {
console.info('[testGridSettings001] START');
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridRow');
console.info("[testGridSettings001] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings001] gridRow useSizeType: " + JSON.stringify(obj.$attrs.useSizeType));
expect(obj.$attrs.useSizeType.sm.span).assertEqual(2);
expect(obj.$attrs.useSizeType.sm.offset).assertEqual(1);
done();
});
it('testGridSettings002', 0, async function (done) {
console.info('[testGridSettings002] START');
try {
let eventData = {
data: {
"span": 1,
"offset": 2
}
}
let indexEvent = {
eventId: 9,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings002] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings002] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridRow');
console.info("[testGridSettings002] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings002] gridRow useSizeType: " + JSON.stringify(obj.$attrs.useSizeType));
expect(obj.$attrs.useSizeType.sm.span).assertEqual(1);
expect(obj.$attrs.useSizeType.sm.offset).assertEqual(2);
done();
});
it('testGridSettings003', 0, async function (done) {
console.info('[testGridSettings003] START');
try {
let eventData = {
data: {
"span": 0x80000000,
"offset": 0x80000000
}
}
let indexEvent = {
eventId: 9,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings003] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings003] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridRow');
console.info("[testGridSettings003] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings003] gridRow useSizeType: " + JSON.stringify(obj.$attrs.useSizeType));
expect(obj.$attrs.useSizeType.sm.span).assertEqual(-2147483648);
expect(obj.$attrs.useSizeType.sm.offset).assertEqual(-2147483648);
done();
});
it('testGridSettings004', 0, async function (done) {
console.info('[testGridSettings004] START');
try {
let eventData = {
data: {
"span": 0x7FFFFFFF,
"offset": 0x7FFFFFFF
}
}
let indexEvent = {
eventId: 9,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings004] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings004] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridRow');
console.info("[testGridSettings004] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings004] gridRow useSizeType: " + JSON.stringify(obj.$attrs.useSizeType));
expect(obj.$attrs.useSizeType.sm.span).assertEqual(0x7FFFFFFF);
expect(obj.$attrs.useSizeType.sm.offset).assertEqual(0x7FFFFFFF);
done();
});
it('testGridSettings005', 0, async function (done) {
console.info('[testGridSettings005] START');
try {
let eventData = {
data: {
"span": 'error',
"offset": 'error'
}
}
let indexEvent = {
eventId: 9,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings005] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings005] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridRow');
console.info("[testGridSettings005] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings005] gridRow useSizeType: " + JSON.stringify(obj.$attrs.useSizeType));
expect(obj.$attrs.useSizeType.sm.span).assertEqual(0);
expect(obj.$attrs.useSizeType.sm.offset).assertEqual(0);
done();
});
it('testGridSettings006', 0, async function (done) {
console.info('[testGridSettings006] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('gridOffset');
console.info("[testGridSettings006] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings006] gridOffset: " + JSON.stringify(obj.$attrs.gridOffset));
expect(obj.$attrs.gridOffset).assertEqual(0);
done();
});
it('testGridSettings007', 0, async function (done) {
console.info('[testGridSettings007] START');
try {
let eventData = {
data: {
"gridOffset": 1
}
}
let indexEvent = {
eventId: 10,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings007] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings007] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridOffset');
console.info("[testGridSettings007] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings007] gridOffset: " + JSON.stringify(obj.$attrs.gridOffset));
expect(obj.$attrs.gridOffset).assertEqual(1);
done();
});
it('testGridSettings008', 0, async function (done) {
console.info('[testGridSettings008] START');
try {
let eventData = {
data: {
"gridOffset": 0x80000000
}
}
let indexEvent = {
eventId: 10,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings008] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings008] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridOffset');
console.info("[testGridSettings008] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings008] gridOffset: " + JSON.stringify(obj.$attrs.gridOffset));
expect(obj.$attrs.gridOffset).assertEqual(-2147483648);
done();
});
it('testGridSettings009', 0, async function (done) {
console.info('[testGridSettings009] START');
try {
let eventData = {
data: {
"gridOffset": 0x7FFFFFFF
}
}
let indexEvent = {
eventId: 10,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings009] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings009] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridOffset');
console.info("[testGridSettings009] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings009] gridOffset: " + JSON.stringify(obj.$attrs.gridOffset));
expect(obj.$attrs.gridOffset).assertEqual(0x7FFFFFFF);
done();
});
it('testGridSettings010', 0, async function (done) {
console.info('[testGridSettings010] START');
try {
let eventData = {
data: {
"gridOffset": 'error'
}
}
let indexEvent = {
eventId: 10,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings010] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings010] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridOffset');
console.info("[testGridSettings010] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings010] gridOffset: " + JSON.stringify(obj.$attrs.gridOffset));
expect(obj.$attrs.gridOffset).assertEqual(2147483647);
done();
});
it('testGridSettings011', 0, async function (done) {
console.info('[testGridSettings011] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('gridSpan');
console.info("[testGridSettings011] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings011] gridSpan: " + JSON.stringify(obj.$attrs.gridSpan));
expect(obj.$attrs.gridSpan).assertEqual(1);
done();
});
it('testGridSettings012', 0, async function (done) {
console.info('[testGridSettings012] START');
try {
let eventData = {
data: {
"gridSpan": 2
}
}
let indexEvent = {
eventId: 11,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings012] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings012] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridSpan');
console.info("[testGridSettings012] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings012] gridSpan: " + JSON.stringify(obj.$attrs.gridSpan));
expect(obj.$attrs.gridSpan).assertEqual(2);
done();
});
it('testGridSettings013', 0, async function (done) {
console.info('[testGridSettings013] START');
try {
let eventData = {
data: {
"gridSpan": 0x80000000
}
}
let indexEvent = {
eventId: 11,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings013] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings013] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridSpan');
console.info("[testGridSettings013] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings013] gridSpan: " + JSON.stringify(obj.$attrs.gridSpan));
expect(obj.$attrs.gridSpan).assertEqual(-2147483648);
done();
});
it('testGridSettings014', 0, async function (done) {
console.info('[testGridSettings014] START');
try {
let eventData = {
data: {
"gridSpan": 0x7FFFFFFF
}
}
let indexEvent = {
eventId: 11,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings014] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings014] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridSpan');
console.info("[testGridSettings014] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings014] gridSpan: " + JSON.stringify(obj.$attrs.gridSpan));
expect(obj.$attrs.gridSpan).assertEqual(0x7FFFFFFF);
done();
});
it('testGridSettings015', 0, async function (done) {
console.info('[testGridSettings015] START');
try {
let eventData = {
data: {
"gridSpan": 'error'
}
}
let indexEvent = {
eventId: 11,
priority: events_emitter.EventPriority.LOW
}
console.info("[testGridSettings015] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testGridSettings015] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('gridSpan');
console.info("[testGridSettings015] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testGridSettings015] gridSpan: " + JSON.stringify(obj.$attrs.gridSpan));
expect(obj.$attrs.gridSpan).assertEqual(2147483647);
done();
});
});
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets';
export default function layoutConstraintsJsunit() {
describe('layoutConstraintsTest', function () {
beforeEach(async function (done) {
console.info("layoutConstraints beforeEach start");
let options = {
uri: 'pages/layoutConstraints',
}
try {
router.clear();
let pages = router.getState();
console.info("get layoutConstraints state pages:" + JSON.stringify(pages));
if (!("layoutConstraints" == pages.name)) {
console.info("get layoutConstraints state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push layoutConstraints page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push layoutConstraints page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("layoutConstraints after each called");
});
it('testLayoutConstraints001', 0, async function (done) {
console.info('[testLayoutConstraints001] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('aspectRatio');
console.info("[testLayoutConstraints001] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testLayoutConstraints001] aspectRatio: " + obj.$attrs.aspectRatio);
expect(obj.$attrs.aspectRatio).assertEqual(1.5);
done();
});
it('testLayoutConstraints002', 0, async function (done) {
console.info('[testLayoutConstraints002] START');
try {
let eventData = {
data: {
"aspectRatio": 2
}
}
let indexEvent = {
eventId: 20,
priority: events_emitter.EventPriority.LOW
}
console.info("[testLayoutConstraints002] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testLayoutConstraints002] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('aspectRatio');
console.info("[testLayoutConstraints002] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testLayoutConstraints002] aspectRatio: " + obj.$attrs.aspectRatio);
expect(obj.$attrs.aspectRatio).assertEqual(2);
done();
});
it('testLayoutConstraints003', 0, async function (done) {
console.info('[testLayoutConstraints003] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('displayPriority');
console.info("[testLayoutConstraints003] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testLayoutConstraints003] displayPriority: " + obj.$attrs.displayPriority);
expect(obj.$attrs.displayPriority).assertEqual(1);
done();
});
it('testLayoutConstraints004', 0, async function (done) {
console.info('[testLayoutConstraints004] START');
try {
let eventData = {
data: {
"displayPriority": 5
}
}
let indexEvent = {
eventId: 21,
priority: events_emitter.EventPriority.LOW
}
console.info("[testLayoutConstraints004] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testLayoutConstraints004] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('displayPriority');
console.info("[testLayoutConstraints004] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testLayoutConstraints004] displayPriority: " + obj.$attrs.displayPriority);
expect(obj.$attrs.displayPriority).assertEqual(5);
done();
});
it('testLayoutConstraints005', 0, async function (done) {
console.info('[testLayoutConstraints005] START');
try {
let eventData = {
data: {
"aspectRatio": -4
}
}
let indexEvent = {
eventId: 1112,
priority: events_emitter.EventPriority.LOW
}
console.info("[testLayoutConstraints005] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testLayoutConstraints005] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('aspectRatio');
console.info("[testLayoutConstraints005] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testLayoutConstraints005] aspectRatio: " + obj.$attrs.aspectRatio);
expect(obj.$attrs.aspectRatio).assertEqual(-4);
done();
});
it('testLayoutConstraints006', 0, async function (done) {
console.info('[testLayoutConstraints006] START');
try {
let eventData = {
data: {
"aspectRatio": 9997077
}
}
let indexEvent = {
eventId: 1112,
priority: events_emitter.EventPriority.LOW
}
console.info("[testLayoutConstraints006] start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("[testLayoutConstraints006] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('aspectRatio');
console.info("[testLayoutConstraints006] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testLayoutConstraints006] aspectRatio: " + obj.$attrs.aspectRatio);
expect(obj.$attrs.aspectRatio).assertEqual(9997077);
done();
});
});
}
\ No newline at end of file
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import appearJsunit from './AppearJsunit.test.ets';
import areaChangeJsunit from './AreaChangeJsunit.test.ets';
import ellipseJsunit from './EllipseJsunit.test.ets';
import enableJsunit from './EnableJsunit.test.ets';
import gaugeJsunit from './GaugeJsunit.test.ets';
import globalJsunit from './GlobalJsunit.test.ets';
import girdContainerJsunit from './GridContainerJsunit.test.ets';
import gridSettingsJsunit from './GridSettingsJsunit.test.ets';
import imageEffectsJsunit from './ImageEffectsJsunit.test.ets';
import layoutConstraintsJsunit from './LayoutConstraintsJsunit.test.ets';
import listJsunit from './ListJsunit.test.ets';
import marqueeJsunit from './MarqueeJsunit.test.ets';
import overLayJsunit from './OverlayJsunit.test.ets';
import stepperJsunit from './StepperJsunit.test.ets';
import swiperJsunit from './SwiperJsunit.test.ets';
import textStyleJsunit from './TextStyleJsunit.test.ets';
import touchAbleJsunit from './TouchAbleJsunit.test.ets';
import touchJsunit from './TouchJsunit.test.ets';
import visibilityJsunit from './VisibilityJsunit.test.ets';
import zIndexJsunit from './ZIndexJsunit.test.ets';
export default function testsuite() {
touchAbleJsunit();
enableJsunit();
appearJsunit();
zIndexJsunit();
ellipseJsunit();
gaugeJsunit();
globalJsunit();
visibilityJsunit();
girdContainerJsunit();
areaChangeJsunit();
imageEffectsJsunit();
layoutConstraintsJsunit();
listJsunit();
marqueeJsunit();
overLayJsunit();
stepperJsunit();
swiperJsunit();
textStyleJsunit();
touchJsunit();
gridSettingsJsunit();
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets";
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets';
export default function listJsunit() {
describe('listTest', function () {
beforeEach(async function (done) {
console.info("list beforeEach start");
let options = {
uri: 'pages/list',
}
try {
router.clear();
let pages = router.getState();
console.info("get list state pages:" + JSON.stringify(pages));
if (!("list" == pages.name)) {
console.info("get list state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push list page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push list page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("list after each called");
});
it('testList01', 0, async function (done) {
console.info('[testList01] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList01] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.listDirection).assertEqual('Axis.Vertical');
expect(obj.$attrs.editMode).assertEqual('false');
expect(obj.$attrs.edgeEffect).assertEqual('EdgeEffect.None');
expect(obj.$attrs.chainAnimation).assertEqual('false');
expect(obj.$attrs.divider.strokeWidth).assertEqual("2.00vp");
expect(obj.$attrs.divider.color).assertEqual("#FFFFFFFF");
expect(obj.$attrs.divider.startMargin).assertEqual("20.00vp");
expect(obj.$attrs.divider.endMargin).assertEqual("20.00vp");
console.info('[testList01] END');
done();
});
it('testList02', 0, async function (done) {
console.info('[testList02] START');
try {
var eventData = {
data: {
"listDirection": Axis.Horizontal
}
}
var innerEvent = {
eventId: 124,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList02] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList02] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList02] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.listDirection).assertEqual('Axis.Horizontal');
console.info('testList02 END');
done();
});
it('testList03', 0, async function (done) {
console.info('[testList03] START');
try {
var eventData = {
data: {
"editMode": true
}
}
var innerEvent = {
eventId: 124,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList03] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList03] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList03] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.editMode).assertEqual('true');
console.info('testList03 END');
done();
});
it('testList04', 0, async function (done) {
console.info('[testList04] START');
try {
var eventData = {
data: {
"edgeEffect": EdgeEffect.Spring
}
}
var innerEvent = {
eventId: 124,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList04] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList04] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList04] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.edgeEffect).assertEqual('EdgeEffect.Spring');
console.info('testList04 END');
done();
});
it('testList05', 0, async function (done) {
console.info('[testList05] START');
try {
var eventData = {
data: {
"chainAnimation": true
}
}
var innerEvent = {
eventId: 124,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList05] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList05] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList05] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.chainAnimation).assertEqual('true');
console.info('testList05 END');
done();
});
it('testList06', 0, async function (done) {
console.info('[testList06] START');
try {
var eventData = {
data: {
"strokeWidth": "3.000000vp"
}
}
var innerEvent = {
eventId: 125,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList06] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList06] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList06] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.divider.strokeWidth).assertEqual("3.00vp");
console.info('testList06 END');
done();
});
it('testList07', 0, async function (done) {
console.info('[testList07] START');
try {
var eventData = {
data: {
"color": "#FF0000FF"
}
}
var innerEvent = {
eventId: 125,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList07] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList07] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList07] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.divider.color).assertEqual("#FF0000FF");
console.info('testList07 END');
done();
});
it('testList08', 0, async function (done) {
console.info('[testList08] START');
try {
var eventData = {
data: {
"startMargin": "30.000000vp"
}
}
var innerEvent = {
eventId: 125,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList08] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList08] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList08] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.divider.startMargin).assertEqual("30.00vp");
console.info('testList08 END');
done();
});
it('testList09', 0, async function (done) {
console.info('[testList09] START');
try {
var eventData = {
data: {
"endMargin": "30.000000vp"
}
}
var innerEvent = {
eventId: 125,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList09] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList09] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList09] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.divider.endMargin).assertEqual("30.00vp");
console.info('testList09 END');
done();
});
it('testList10', 0, async function (done) {
console.info('[testList10] START');
try {
var eventData = {
data: {
"editMode": "true123"
}
}
var innerEvent = {
eventId: 901,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList10] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList10] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList10] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.editMode).assertEqual('true');
console.info('testList10 END');
done();
});
it('testList11', 0, async function (done) {
console.info('[testList11] START');
try {
var eventData = {
data: {
"editMode": "39000000"
}
}
var innerEvent = {
eventId: 902,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList11] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList11] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList11] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.editMode).assertEqual('true');
console.info('testList11 END');
done();
});
it('testList12', 0, async function (done) {
console.info('[testList12] START');
try {
var eventData = {
data: {
"chainAnimation": "true123"
}
}
var innerEvent = {
eventId: 903,
priority: events_emitter.EventPriority.LOW
}
console.info("[testList12] start to publish emit:" + JSON.stringify(eventData.data));
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testList12] change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJson = getInspectorByKey('list');
let obj = JSON.parse(strJson);
console.info("[testList12] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.chainAnimation).assertEqual('true');
console.info('testList12 END');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import Utils from './Utils.ets';
import events_emitter from '@ohos.events.emitter';
export default function marqueeJsunit() {
describe('marqueeTest', function () {
beforeEach(async function (done) {
let options = {
uri: 'pages/marquee',
}
try {
router.clear();
let pages = router.getState();
console.info("get marquee state success " + JSON.stringify(pages));
if (!("marquee" == pages.name)) {
console.info("get marquee state success " + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(4000);
console.info("push marquee page success " + JSON.stringify(result));
}
} catch (err) {
console.error("push marquee page error " + JSON.stringify(result));
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("marquee after each called");
});
it('testMarquee_0100', 0, async function (done) {
console.info('testMarquee_0100 START');
await Utils.sleep(1500);
let callback = (indexEvent) => {
console.info("testMarquee_0100 get state result is: " + JSON.stringify(indexEvent));
expect(indexEvent.data.start).assertEqual(true);
}
let indexEvent = {
eventId: 130,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(indexEvent, callback);
} catch (err) {
console.info("testMarquee_0100 on events_emitter err : " + JSON.stringify(err));
}
console.info("testMarquee_0100 click result is: " + JSON.stringify(sendEventByKey('button', 10, "")));
await Utils.sleep(1000);
var callback1 = (eventData) => {
console.info("testMarquee_0100 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.fontColor).assertEqual(Color.Blue);
}
var innerEventOne = {
eventId: 127,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(innerEventOne, callback1);
} catch (err) {
console.info("testMarquee_0100 on events_emitter err : " + JSON.stringify(err));
}
console.info('testMarquee_0100 END');
done();
});
it('testMarquee_0200', 0, async function (done) {
console.info('testMarquee_0200 START');
await Utils.sleep(1500);
let callback = (indexEvent) => {
console.info("testMarquee_0200 get state result is: " + JSON.stringify(indexEvent));
expect(indexEvent.data.start).assertEqual(true);
}
let indexEvent = {
eventId: 130,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(indexEvent, callback);
} catch (err) {
console.info("testMarquee_0200 on events_emitter err : " + JSON.stringify(err));
}
console.info("testMarquee_0200 click result is: " + JSON.stringify(sendEventByKey('button', 10, "")));
await Utils.sleep(1000);
var callback1 = (eventData) => {
console.info("testMarquee_0200 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.fontSize).assertEqual(50);
}
var innerEventOne = {
eventId: 128,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(innerEventOne, callback1)
} catch (err) {
console.info("testMarquee_0200 on events_emitter err : " + JSON.stringify(err));
}
console.info('testMarquee_0200 END');
done();
});
it('testMarquee_0300', 0, async function (done) {
console.info('testMarquee_0300 START');
await Utils.sleep(1500);
let callback = (indexEvent) => {
console.info("testMarquee_0300 get state result is: " + JSON.stringify(indexEvent));
expect(indexEvent.data.start).assertEqual(true);
}
let indexEvent = {
eventId: 130,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(indexEvent, callback);
} catch (err) {
console.info("testMarquee_0300 on events_emitter err : " + JSON.stringify(err));
}
console.info("testMarquee_0300 click result is: " + JSON.stringify(sendEventByKey('button', 10, "")));
await Utils.sleep(1000);
var callback1 = (eventData) => {
console.info("testMarquee_0300 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.ACTION).assertEqual(true);
}
var innerEventOne = {
eventId: 129,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(innerEventOne, callback1)
} catch (err) {
console.info("testMarquee_0300 on events_emitter err : " + JSON.stringify(err));
}
console.info('testMarquee_0300 END');
done();
});
})
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter'
import Utils from './Utils.ets';
export default function overLayJsunit() {
describe('overLayTest', function () {
beforeEach(async function (done) {
console.info("overlay beforeEach start");
let options = {
uri: 'pages/overlay',
}
try {
router.clear();
let pages = router.getState();
console.info("get overlay state pages: " + JSON.stringify(pages));
if (!("overlay" == pages.name)) {
console.info("get overlay state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push overlay page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push overlay page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("overlay after each called");
});
it('testOverlay01', 0, async function (done) {
console.info('[testOverlay01] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay01] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.title).assertEqual("old title");
expect(obj.$attrs.overlay.options.align).assertEqual("Alignment.Bottom");
expect(obj.$attrs.overlay.options.offset.x).assertEqual('0.00vp');
expect(obj.$attrs.overlay.options.offset.y).assertEqual('-15.00vp');
console.info('[testOverlay01] END');
done();
});
it('testOverlay02', 0, async function (done) {
console.info('[testOverlay02] START');
try {
var eventData = {
data: {
"title": "new title"
}
}
var innerEvent = {
eventId: 143,
priority: events_emitter.EventPriority.LOW
}
console.info("[testOverlay02] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testOverlay02] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay02] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.title).assertEqual("new title");
console.info('testOverlay02 END');
done();
});
it('testOverlay03', 0, async function (done) {
console.info('[testOverlay03] START');
try {
var eventData = {
data: {
"align": "Alignment.TopStart",
"x": 30,
"y": -30
}
}
var innerEvent = {
eventId: 143,
priority: events_emitter.EventPriority.LOW
}
console.info("[testOverlay03] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testOverlay03] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay03] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.options.align).assertEqual("Alignment.TopStart");
expect(obj.$attrs.overlay.options.offset.x).assertEqual('30.00vp');
expect(obj.$attrs.overlay.options.offset.y).assertEqual('-30.00vp');
console.info('testOverlay03 END');
done();
});
it('testOverlay04', 0, async function (done) {
console.info('[testOverlay04] START');
await Utils.sleep(1000);
try {
var eventData = {
data: {
"align": "Alignment.Center"
}
}
var innerEvent = {
eventId: 143,
priority: events_emitter.EventPriority.LOW
}
console.info("[testOverlay04] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testOverlay04] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay04] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.options.align).assertEqual("Alignment.TopStart");
console.info('testOverlay04 END');
done();
});
it('testOverlay05', 0, async function (done) {
console.info('[testOverlay05] START');
try {
var eventData = {
data: {
"align":'-1'
}
}
var innerEvent = {
eventId: 1110,
priority: events_emitter.EventPriority.LOW
}
console.info("[testOverlay05] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testOverlay05] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay05] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.options.align).assertEqual("Alignment.Center");
console.info('testOverlay05 END');
done();
});
it('testOverlay06', 0, async function (done) {
console.info('[testOverlay06] START');
try {
var eventData = {
data: {
"x": -30,
"y": 30
}
}
var innerEvent = {
eventId: 1110,
priority: events_emitter.EventPriority.LOW
}
console.info("[testOverlay06] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testOverlay06] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay06] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.options.offset.x).assertEqual('-30.00vp');
expect(obj.$attrs.overlay.options.offset.y).assertEqual('30.00vp');
console.info('testOverlay06 END');
done();
});
it('testOverlay07', 0, async function (done) {
console.info('[testOverlay07] START');
try {
var eventData = {
data: {
"x": 1111111111
}
}
var innerEvent = {
eventId: 1110,
priority: events_emitter.EventPriority.LOW
}
console.info("[testOverlay07] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testOverlay07] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay07] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.options.offset.x).assertEqual('1111111111.00vp');
console.info('testOverlay07 END');
done();
});
it('testOverlay08', 0, async function (done) {
console.info('[testOverlay08] START');
try {
var eventData = {
data: {
"y": 1111111111
}
}
var innerEvent = {
eventId: 1110,
priority: events_emitter.EventPriority.LOW
}
console.info("[testOverlay08] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[testOverlay08] change component data error: " + err.message);
}
await Utils.sleep(2000);
let strJson = getInspectorByKey('overlay');
let obj = JSON.parse(strJson);
console.info("[testOverlay08] obj is: " + JSON.stringify(obj.$attrs.overlay));
expect(obj.$attrs.overlay.options.offset.x).assertEqual('1111111111.00vp');
console.info('testOverlay08 END');
done();
});
})
}
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import Utils from './Utils.ets';
import events_emitter from '@ohos.events.emitter';
export default function stepperJsunit() {
describe('stepperTest', function () {
beforeEach(async function (done) {
let options = {
uri: 'pages/stepper',
}
try {
router.clear();
let pages = router.getState();
console.info("get stepper state success " + JSON.stringify(pages));
if (!("stepper" == pages.name)) {
console.info("get stepper state success " + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(1000);
console.info("push stepper page success " + JSON.stringify(result));
}
} catch (err) {
console.error("push stepper page error: " + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("stepper after each called");
});
it('stepperTest_0100', 0, async function (done) {
console.info('stepperTest_0100 START');
let strJson = getInspectorByKey('stepper');
console.info("stepperTest_0100 component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("stepperTest_0100 component obj is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Stepper');
expect(obj.$attrs.index).assertEqual('0');
console.info('stepperTest_0100 END');
done();
});
it('stepperTest_0200', 0, async function (done) {
console.info('stepperTest_0200 START');
let strJson = getInspectorByKey('stepper');
console.info("stepperTest_0200 component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("stepperTest_0200 component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.index).assertEqual('0');
try {
let eventData = {
data: {
"currentIndex": "1",
}
}
let indexEvent = {
eventId: 202,
priority: events_emitter.EventPriority.LOW
}
console.info("stepperTest_0200 start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("stepperTest_0200 change component data error: " + err.message);
}
await Utils.sleep(3000);
let strJsonNew = getInspectorByKey('stepper');
let objNew = JSON.parse(strJsonNew);
console.info("stepperTest_0200 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.index).assertEqual('1');
console.info('stepperTest_0200 END');
done();
});
it('stepperTest_0300', 0, async function (done) {
console.info('stepperTest_0300v START');
let strJson = getInspectorByKey('stepper');
console.info("stepperTest_0300 component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("stepperTest_0300 component obj is: " + JSON.stringify(obj));
try {
let eventData = {
data: {
"currentIndex": "11111111",
}
}
let indexEvent = {
eventId: 909,
priority: events_emitter.EventPriority.LOW
}
console.info("stepperTest_0300 start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("stepperTest_0300 change component data error: " + err.message);
}
await Utils.sleep(3000);
let strJsonNew = getInspectorByKey('stepper');
let objNew = JSON.parse(strJsonNew);
console.info("stepperTest_0300 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.index).assertEqual('11111111');
console.info('stepperTest_0300 END');
done();
});
it('stepperTest_0400', 0, async function (done) {
console.info('stepperTest_0400 START');
let strJson = getInspectorByKey('stepper');
console.info("stepperTest_0400 component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("stepperTest_0400 component obj is: " + JSON.stringify(obj));
try {
let eventData = {
data: {
"currentIndex": "-558038585",
}
}
let indexEvent = {
eventId: 909,
priority: events_emitter.EventPriority.LOW
}
console.info("stepperTest_0400 start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("stepperTest_0400 change component data error: " + err.message);
}
await Utils.sleep(3000);
let strJsonNew = getInspectorByKey('stepper');
let objNew = JSON.parse(strJsonNew);
console.info("stepperTest_0400 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.index).assertEqual('-558038585');
console.info('stepperTest_0400 END');
done();
});
it('stepperTest_0500', 0, async function (done) {
console.info('[stepperTest_0500] START');
try {
var eventData = {
data: {
"currentIndex": '-10'
}
}
var innerEvent = {
eventId: 910,
priority: events_emitter.EventPriority.LOW
}
console.info("[stepperTest_0500] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[stepperTest_0500] change component data error: " + err.message);
}
await Utils.sleep(1000);
let strJson = getInspectorByKey('stepper');
let obj = JSON.parse(strJson);
console.info("[stepperTest_0500] obj is: " + JSON.stringify(obj));
expect(obj.$attrs.index).assertEqual('-10');
console.info('stepperTest_0500 END');
done();
});
})
}
\ No newline at end of file
// @ts-nocheck
/**
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import Utils from './Utils.ets';
import events_emitter from '@ohos.events.emitter';
export default function touchAbleJsunit() {
describe('touchAbleTest', function () {
beforeEach(async function (done) {
console.info("touchAble beforeEach start");
let options = {
uri: 'pages/touchAble',
}
try {
router.clear();
let pages = router.getState();
console.info("get touchAble state pages:" + JSON.stringify(pages));
if (!("touchAble" == pages.name)) {
console.info("get touchAble state pages.name:" + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info("push touchAble page result:" + JSON.stringify(result));
}
} catch (err) {
console.error("push touchAble page error:" + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("touchAble after each called");
});
it('testTouchAble001', 0, async function (done) {
await Utils.sleep(1000)
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testTouchAble001] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.focusable).assertEqual(true);
done();
});
it('testTouchAble002', 0, async function (done) {
await Utils.sleep(1000);
var callbackTwo = (eventData) => {
console.info("[testTouchAble002] get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.ACTION).assertEqual('Ellipse Clicked')
}
var innerEventTwo = {
eventId: 237,
priority: events_emitter.EventPriority.LOW
}
try {
events_emitter.on(innerEventTwo, callbackTwo)
} catch (err) {
console.info("[testTouchAble002] on events_emitter err : " + JSON.stringify(err));
}
console.info('[testClickEvent001] sendEventByKey ' + JSON.stringify(sendEventByKey('ellipse', 10, "")));
await Utils.sleep(1000)
console.info('[testTouchAble002] END');
done();
});
})
}
\ No newline at end of file
{
"color": [
{
"name": "color_hello",
"value": "#ffff0000"
},
{
"name": "color_world",
"value": "#ff0000ff"
}
]
}
\ No newline at end of file
{
"float":[
{
"name":"font_hello",
"value":"28.0fp"
},
{
"name":"font_world",
"value":"20.0fp"
}
]
}
\ No newline at end of file
此差异已折叠。
{
"description": "Configuration for aceceshi Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "700000",
"package": "com.open.harmony.acetestfive",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"AceEtsComponentFiveTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册