Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
013fde70
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看板
未验证
提交
013fde70
编写于
1月 01, 2023
作者:
O
openharmony_ci
提交者:
Gitee
1月 01, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7078 【ACE子系统】新增接口用例
Merge pull request !7078 from hekun/master
上级
dd2767c3
d13a8282
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
264 addition
and
1 deletion
+264
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets
...t_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets
+6
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/test/common_ts_ets_api.test.ets
...pilack/entry/src/main/ets/test/common_ts_ets_api.test.ets
+25
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/test/stateManagement.test.ets
..._apilack/entry/src/main/ets/test/stateManagement.test.ets
+88
-0
arkui/ace_ets_component_attrlack/entry/src/main/config.json
arkui/ace_ets_component_attrlack/entry/src/main/config.json
+2
-1
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/gestureSetting.ets
...k/entry/src/main/ets/MainAbility/pages/gestureSetting.ets
+71
-0
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets
..._component_attrlack/entry/src/main/ets/test/List.test.ets
+2
-0
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/alertDialog.test.ets
...ent_attrlack/entry/src/main/ets/test/alertDialog.test.ets
+22
-0
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/ohosrouter.test.ets
...nent_attrlack/entry/src/main/ets/test/ohosrouter.test.ets
+48
-0
未找到文件。
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets
浏览文件 @
013fde70
...
...
@@ -86,6 +86,12 @@ struct SwiperCurve {
.onChange((index: number) => {
console.info(index.toString())
})
.onAnimationStart((index: number) => {
console.info(index.toString())
})
.onAnimationEnd((index: number) => {
console.info(index.toString())
})
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button('next')
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/common_ts_ets_api.test.ets
浏览文件 @
013fde70
...
...
@@ -17,6 +17,7 @@ import events_emitter from '@ohos.events.emitter';
import router from '@system.router';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index"
import Utils from './Utils.ets'
import font from '@ohos.font'
export default function common_ts_ets_apiStaticClearJsunit() {
describe('common_ts_ets_apiStaticClearTest', function () {
...
...
@@ -95,5 +96,29 @@ export default function common_ts_ets_apiStaticClearJsunit() {
console.info("common_ts_ets_apiEnvProp0001 on events_emitter err : " + JSON.stringify(err));
}
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_0003
* @tc.name test_font_registerFont_0001
* @tc.desc Register a customized font in the FontManager
*/
it('test_font_registerFont_0001', 0, async function (done) {
console.info('test_font_registerFont_0001 Register a customized font in the FontManagerSTART');
await Utils.sleep(2000);
let fontOptions = {
familyName: "Italy",
familySrc: "resource/base/Italy"
}
try {
let result = font.registerFont(fontOptions);
done();
} catch (err) {
console.info("test_font_registerFont_0001 err : " + JSON.stringify(err));
expect().assertFail();
done();
}
});
})
}
arkui/ace_ets_component_apilack/entry/src/main/ets/test/stateManagement.test.ets
浏览文件 @
013fde70
...
...
@@ -150,5 +150,93 @@ export default function stateManagementGetSharedJsunit() {
}
console.info('teststateManagementsetAndProp0001 END');
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_0005
* @tc.name test_staticClear_0001
* @tc.desc delete the property
*/
it('test_staticClear_0001', 0, async function (done) {
console.info('test_staticClear_0001 Register a customized font in the FontManagerSTART');
await Utils.sleep(2000);
try {
let simple = AppStorage.staticClear();
expect(simple).assertFalse();
done();
} catch (err) {
console.info("test_font_registerFont_0001 err : " + JSON.stringify(err));
expect(true).assertTrue();
done();
}
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_0007
* @tc.name test_setAndLink_0001
* @tc.desc bind localStorage
*/
it('test_setAndLink_0001', 0, async function (done) {
console.info('test_setAndLink_0001 START');
await Utils.sleep(2000);
try {
let storage = new LocalStorage()
storage.setAndLink<string>('storageSimpleProp', '121');
let size = storage.size()
expect(size == 1).assertTrue();
done();
} catch (err) {
console.info("test_font_registerFont_0001 err : " + JSON.stringify(err));
expect().assertFail();
done();
}
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_0007
* @tc.name test_setAndLink_0001
* @tc.desc bind localStorage
*/
it('test_setAndLink_0001', 0, async function (done) {
console.info('test_setAndLink_0001 START');
await Utils.sleep(2000);
try {
let storage = new LocalStorage()
storage.setAndLink<string>('storageSimpleProp', '121');
let size = storage.size()
expect(size == 1).assertTrue();
done();
} catch (err) {
console.info("test_setAndLink_0001 err : " + JSON.stringify(err));
expect().assertFail();
done();
}
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_0008
* @tc.name test_setAndProp_0001
* @tc.desc bind localStorage
*/
it('test_setAndProp_0001', 0, async function (done) {
console.info('test_setAndProp_0001 START');
await Utils.sleep(2000);
try {
let storage = new LocalStorage()
storage.setAndProp<string>("setAndProp",'12');
let size = storage.size();
expect(size == 1).assertTrue();
done();
} catch (err) {
console.info("test_setAndProp_0001 err : " + JSON.stringify(err));
expect().assertFail();
done();
}
});
})
}
arkui/ace_ets_component_attrlack/entry/src/main/config.json
浏览文件 @
013fde70
...
...
@@ -117,7 +117,8 @@
"pages/hoverEffect"
,
"pages/hitTestMode"
,
"pages/color"
,
"pages/navigation_lack"
"pages/navigation_lack"
,
"pages/gestureSetting"
],
"name"
:
".MainAbility"
,
"window"
:
{
...
...
arkui/ace_ets_component_attrlack/entry/src/main/ets/MainAbility/pages/gestureSetting.ets
0 → 100644
浏览文件 @
013fde70
/**
* Copyright (c) 2022 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.
*/
@Entry
@Component
struct GestureSettingsExample {
@State priorityTestValue: string = ''
@State parallelTestValue: string = ''
build() {
Column() {
Column() {
Text('TapGesture:' + this.priorityTestValue).fontSize(28)
.gesture(
TapGesture()
.onAction(() => {
this.priorityTestValue += '\nText'
}))
}
.height(200)
.width(250)
.padding(20)
.margin(20)
.border({ width: 3 })
// 设置为priorityGesture时,点击文本会忽略Text组件的TapGesture手势事件,优先识别父组件Column的TapGesture手势事件
.priorityGesture(
TapGesture()
.onAction((event: GestureEvent) => {
this.priorityTestValue += '\nColumn'
console.info("Gesture pressure" + event.pressure);
console.info("Gesture tiltX" + event.tiltX);
console.info("Gesture tiltY" + event.tiltY);
console.info("Gesture sourceTool object" + event.sourceTool);
console.info("Gesture sourceTool enum value " + SourceTool.Finger);
console.info("Gesture sourceTool enum value " + SourceTool.Pen);
}), GestureMask.IgnoreInternal)
Column() {
Text('TapGesture:' + this.parallelTestValue).fontSize(28)
.gesture(
TapGesture()
.onAction(() => {
this.parallelTestValue += '\nText'
}))
}
.height(200)
.width(250)
.padding(20)
.margin(20)
.border({ width: 3 })
.parallelGesture(
TapGesture()
.onAction((event: GestureEvent) => {
this.parallelTestValue += '\nColumn'
}), GestureMask.Normal)
}
}
}
\ No newline at end of file
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/List.test.ets
浏览文件 @
013fde70
...
...
@@ -46,6 +46,7 @@ import responseTypeJsunit from './responseType.test.ets';
import copyOptionJsunit from './copyOption.test.ets';
import hitTestModeJsunit from './hitTestMode.test.ets';
import colorEnumJsunit from './color.test.ets';
import ohosrouterJsunit from './ohosrouter.test.ets';
export default function testsuite() {
animatorOnframeJsunit()
...
...
@@ -75,4 +76,5 @@ export default function testsuite() {
copyOptionJsunit()
hitTestModeJsunit()
colorEnumJsunit()
ohosrouterJsunit()
}
\ No newline at end of file
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/alertDialog.test.ets
浏览文件 @
013fde70
...
...
@@ -17,6 +17,7 @@ import router from '@system.router';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index"
import Utils from './Utils.ets'
import events_emitter from '@ohos.events.emitter';
import measure from '@ohos.measure'
export default function alertDialogCenterStartJsunit() {
describe('alertDialogCenterStartTest', function () {
...
...
@@ -71,5 +72,26 @@ export default function alertDialogCenterStartJsunit() {
console.info("testalertDialogCenterStart0001 on events_emitter err : " + JSON.stringify(err));
}
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_0002
* @tc.name testMeasureText0001
* @tc.desic test text width
*/
it('testMeasureText0001', 0, async function (done) {
console.info('testMeasureText0001 start');
await Utils.sleep(2000);
try {
let measureOptions = {textContent : "alertDialog-CenterStart"};
let width = measure.measureText(measureOptions);
expect(width > 0).assertFalse();
done();
} catch (err) {
console.info("testMeasureText0001 err : " + JSON.stringify(err));
expect().assertFail();
done();
}
});
})
}
arkui/ace_ets_component_attrlack/entry/src/main/ets/test/ohosrouter.test.ets
0 → 100644
浏览文件 @
013fde70
/**
* 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 router from '@ohos.router';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index"
import Utils from './Utils.ets'
export default function ohosrouterJsunit() {
describe('ohosrouterJsunit', function () {
beforeAll(async function (done) {
console.info("ohosrouterJsunit beforeAll");
done();
});
afterEach(async function () {
await Utils.sleep(1000);
console.info("ohosrouterJsunit aftereach");
});
/*
* @tc.number SUB_ACE_BASIC_ETS_API_001
* @tc.name ohosrouterJsunit_001
* @tc.desc test routermode
*/
it('ohosrouterJsunit_001', 0, async function (done) {
try {
expect(1).assertEqual(router.RouterMode.Single);
done();
} catch (error) {
console.error(`ohosrouterJsunit_001 pushUrl args error code is ${error.code}, message is ${error.message}`)
expect().assertFail();
};
});
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录