Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d31663d5
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d31663d5
编写于
9月 26, 2022
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
code check
Signed-off-by:
N
bayanxing
<
bayanxing@kaihong.com
>
上级
32769de9
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
107 addition
and
6 deletion
+107
-6
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/common.ets
..._attrlack/entry/src/main/ets/MainAbility/pages/common.ets
+55
-2
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets
..._component_attrlack/entry/src/main/ets/test/List.test.ets
+1
-4
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/configuration.test.ets
...t_attrlack/entry/src/main/ets/test/configuration.test.ets
+51
-0
未找到文件。
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/common.ets
浏览文件 @
d31663d5
...
...
@@ -14,7 +14,7 @@
*/
import Log from '../common/Log.ets';
import events_emitter from '@ohos.events.emitter';
const TAG = 'ets_apiLack_add';
@Entry
...
...
@@ -118,7 +118,26 @@ export default struct CommonColorMode {
.textOverflow({ overflow: TextOverflow.None })
.key("areaText")
.onClick((event) => {
Log.showInfo(TAG, 'area: ' + JSON.stringify(event.target.area))
Log.showInfo(TAG, 'JSON.stringify area : ' + JSON.stringify(event.target.area))
const area = JSON.stringify(event.target.area)
console.info("area value is: " + area)
console.info("area.position value is: " + area.position)
console.info("area.position value is: " + area.position.x)
try {
var backData = {
data: {
"STATUS": area
}
}
let backEvent = {
eventId: 60312,
priority: events_emitter.EventPriority.LOW
}
console.info("areaValue start to emit action state")
events_emitter.emit(backEvent, backData)
} catch (err) {
console.info("areaValue emit action state err: " + JSON.stringify(err.message))
}
})
Text("common-Repeat")
.width(320)
...
...
@@ -263,6 +282,23 @@ export default struct CommonColorMode {
.key("touchesText")
.onTouch((event) => {
Log.showInfo(TAG, 'touches: ' + JSON.stringify(event.touches))
const touches = JSON.stringify(event.touches)
const touchesValue = JSON.parse(touches)
try {
var backData1 = {
data: {
"STATUS": touchesValue
}
}
let backEvent1 = {
eventId: 60313,
priority: events_emitter.EventPriority.LOW
}
console.info("touchesValue start to emit action state")
events_emitter.emit(backEvent1, backData1)
} catch (err) {
console.info("touchesValue emit action state err: " + JSON.stringify(err.message))
}
})
Text("common-ChangedTouches")
...
...
@@ -280,6 +316,23 @@ export default struct CommonColorMode {
.key("changedTouchesText")
.onTouch((event) => {
Log.showInfo(TAG, 'changedTouches: ' + JSON.stringify(event.changedTouches))
const changedTouches = JSON.stringify(event.changedTouches)
const changedTouchesValue = JSON.parse(changedTouches)
try {
var backData2 = {
data: {
"STATUS": changedTouches
}
}
let backEvent2 = {
eventId: 60314,
priority: events_emitter.EventPriority.LOW
}
console.info("touchesValue start to emit action state")
events_emitter.emit(backEvent2, backData2)
} catch (err) {
console.info("touchesValue emit action state err: " + JSON.stringify(err.message))
}
})
Text("common-KeyCode")
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets
浏览文件 @
d31663d5
...
...
@@ -23,6 +23,7 @@ import canvasActualBoundingBoxAscentJsunit from './canvas.test.ets';
import checkBoxGroupJsunit from './checkBox.test.ets';
import checkBoxGroupPartJsunit from './checkBoxGroup.test.ets';
import commonColorModeJsunit from './common.test.ets';
import configurationApiTest from './configuration.test.ets'
import datePickerLunarJsunit from './datePicker.test.ets';
import enumsCancelJsunit from './enums.test.ets';
import gestureParallelJsunit from './gesture.test.ets';
...
...
@@ -45,9 +46,7 @@ import copyOptionJsunit from './copyOption.test.ets';
export default function testsuite() {
animatorOnframeJsunit()
curvesEaseOutJsunit()
routerStandardJsunit()
uiAppearanceALWAYS_DARKJsunit()
appVersionCodeJsunit()
alertDialogCenterStartJsunit()
canvasActualBoundingBoxAscentJsunit()
...
...
@@ -55,13 +54,11 @@ export default function testsuite() {
checkBoxGroupPartJsunit()
commonColorModeJsunit()
datePickerLunarJsunit()
enumsCancelJsunit()
gestureParallelJsunit()
listtestIdleJsunit()
loadingProgressCircularJsunit()
progressScaleCountJsunit()
radioGroupJsunit()
refreshDragJsunit()
sidebarIconsJsunit()
sliderMovingJsunit()
stateManagementDARKJsunit()
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/configuration.test.ets
0 → 100644
浏览文件 @
d31663d5
// @ts-nocheck
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import configuration from '@system.configuration';
import router from '@system.router';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index"
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils.ets'
export default function configurationApiTest() {
describe('configurationApiTest', function () {
beforeEach(async function (done) {
await Utils.sleep(1000);
console.info("appVersionCode after each called");
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("appVersionCode after each called");
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_0001
* @tc.name colorMode001
* @tc.desic aceColorMode001EtsTest0001
*/
it('colorMode001', 0, async function (done) {
console.info('colorMode001 test START');
const localeInfo = configuration.getLocale();
console.info("[configuration.getLocale] localeInfo: " + JSON.stringify(localeInfo));
console.info("[configuration.getLocale] colorMode: " + localeInfo.colorMode);
console.info("[configuration.getLocale] fontScale: " + localeInfo.fontScale);
expect(localeInfo.colorMode).assertEqual('COLOR_MODE_LIGHT');
expect(localeInfo.fontScale).assertEqual('ltr');
console.info('testConfigurationGetLocale END');
});
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录