Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5a5d2891
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看板
未验证
提交
5a5d2891
编写于
1月 24, 2022
作者:
O
openharmony_ci
提交者:
Gitee
1月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1690 ACE问题单修改
Merge pull request !1690 from coooooool01/master
上级
ab224c61
facf92a3
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
49 addition
and
159 deletion
+49
-159
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets
.../entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets
+7
-3
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets
...entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets
+29
-26
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets
...d/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets
+1
-1
ace/ace_ets_test/entry/src/main/config.json
ace/ace_ets_test/entry/src/main/config.json
+0
-1
ace/ace_ets_test/entry/src/main/ets/MainAbility/pages/HyperLink.ets
...s_test/entry/src/main/ets/MainAbility/pages/HyperLink.ets
+0
-36
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/HyperLinkJsunit.test.ets
...ry/src/main/ets/MainAbility/test/HyperLinkJsunit.test.ets
+0
-78
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/List.test.ets
...ts_test/entry/src/main/ets/MainAbility/test/List.test.ets
+0
-2
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets
...try/src/main/ets/MainAbility/test/ListItemJsunit.test.ets
+2
-2
ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets
...y/src/main/ets/MainAbility/test/NavigationJsunit.test.ets
+6
-6
ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets
...try/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets
+3
-3
ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets
...ry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets
+1
-1
未找到文件。
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/BadgeJsunit.test.ets
浏览文件 @
5a5d2891
...
...
@@ -74,9 +74,13 @@ export default function badgeJsunit() {
console.log("yr badge0 position-BadgePosition.Right" + JSON.stringify(obj.$attrs.position))
expect(obj.$attrs.maxCount).assertEqual('99');
console.log("yr badge0 maxCount-'99'" + JSON.stringify(obj.$attrs.maxCount))
expect(obj.$attrs.style.color).assertEqual('0xFFFFFF');
expect(obj.$attrs.style.fontSize).assertEqual('16');
expect(obj.$attrs.style.badgeSize).assertEqual('20');
let style = JSON.parse(obj.$attrs.style)
console.log(style.color)
console.log(style.fontSize)
console.log(style.badgeSize)
expect(style.color).assertEqual('#FFFFFFFF');
expect(style.fontSize).assertEqual('16.000000fp');
expect(style.badgeSize).assertEqual('20.000000fp');
console.log("badge0 style : " + JSON.stringify(obj.$attrs.style))
console.info('testGetInspectorByKey END');
done();
...
...
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/SliderJsunit.test.ets
浏览文件 @
5a5d2891
...
...
@@ -64,26 +64,29 @@ export default function sliderJsunit() {
let strJson = getInspectorByKey('slider1');
let obj = JSON.parse(strJson);
console.info("component obj is Slider: " + JSON.stringify(obj));
console.info("slider1 blockColor" + JSON.stringify(obj.$attrs.blockColor))
console.info("slider1 selectedColor" + JSON.stringify(obj.$attrs.selectedColor))
console.info("slider1 trackColor" + JSON.stringify(obj.$attrs.trackColor))
console.info("slider1 showTips" + JSON.stringify(obj.$attrs.showTips))
console.info("slider1 showSteps" + JSON.stringify(obj.$attrs.showSteps))
console.info("slider1 value" + JSON.stringify(obj.$attrs.value))
console.info("slider1 min" + JSON.stringify(obj.$attrs.min))
console.info("slider1 max" + JSON.stringify(obj.$attrs.max))
console.info("slider1 step" + JSON.stringify(obj.$attrs.step))
console.info("slider1 style" + JSON.stringify(obj.$attrs.style))
expect(obj.$attrs.blockColor).assertEqual('#FFFF0000')
expect(obj.$attrs.selectedColor).assertEqual('#FF0000FF')
expect(obj.$attrs.trackColor).assertEqual('#FF808080')
expect(obj.$attrs.showTips).assertEqual("false")
expect(obj.$attrs.showSteps).assertEqual("false")
expect(obj.$attrs.value).assertEqual(40.000000.toFixed(6))
expect(obj.$attrs.min).assertEqual(0.000000.toFixed(6))
expect(obj.$attrs.max).assertEqual(100.000000.toFixed(6))
expect(obj.$attrs.step).assertEqual(1.000000.toFixed(6))
expect(obj.$attrs.style).assertEqual("SliderStyle.Outset")
console.info("component obj is Slider: " + JSON.stringify(obj.$attrs.constructor));
console.info("slider1 blockColor " + JSON.stringify(obj.$attrs.constructor.blockColor))
console.info("slider1 selectedColor " + JSON.stringify(obj.$attrs.constructor.selectedColor))
console.info("slider1 trackColor " + JSON.stringify(obj.$attrs.constructor.trackColor))
console.info("slider1 showTips " + JSON.stringify(obj.$attrs.constructor.showTips))
console.info("slider1 showSteps " + JSON.stringify(obj.$attrs.constructor.showSteps))
console.info("slider1 value " + JSON.stringify(obj.$attrs.constructor.value))
console.info("slider1 min " + JSON.stringify(obj.$attrs.constructor.min))
console.info("slider1 max " + JSON.stringify(obj.$attrs.constructor.max))
console.info("slider1 step " + JSON.stringify(obj.$attrs.constructor.step))
console.info("slider1 style " + JSON.stringify(obj.$attrs.constructor.style))
expect(obj.$attrs.constructor.blockColor).assertEqual('#FFFF0000')
expect(obj.$attrs.constructor.selectedColor).assertEqual('#FF0000FF')
expect(obj.$attrs.constructor.trackColor).assertEqual('#FF808080')
expect(obj.$attrs.constructor.showTips).assertEqual("false")
expect(obj.$attrs.constructor.showSteps).assertEqual("false")
expect(obj.$attrs.constructor.value).assertEqual(40.000000.toFixed(6))
expect(obj.$attrs.constructor.min).assertEqual(0.000000.toFixed(6))
expect(obj.$attrs.constructor.max).assertEqual(100.000000.toFixed(6))
expect(obj.$attrs.constructor.step).assertEqual(1.000000.toFixed(6))
expect(obj.$attrs.constructor.style).assertEqual("SliderStyle.Outset")
console.info('testGetSliderAttr1 END');
done();
});
...
...
@@ -98,12 +101,12 @@ export default function sliderJsunit() {
let strJson = getInspectorByKey('slider2');
let obj = JSON.parse(strJson);
console.info("component obj is Slider: " + JSON.stringify(obj));
console.info("slider2 showTips
" + JSON.stringify(obj.$attrs
.showTips))
console.info("slider2 showSteps
" + JSON.stringify(obj.$attrs
.showSteps))
console.info("slider1 style
" + JSON.stringify(obj.$attrs
.style))
expect(obj.$attrs.showTips).assertEqual("true")
expect(obj.$attrs.showSteps).assertEqual("true")
expect(obj.$attrs.style).assertEqual("SliderStyle.Inset")
console.info("slider2 showTips
" + JSON.stringify(obj.$attrs.constructor
.showTips))
console.info("slider2 showSteps
" + JSON.stringify(obj.$attrs.constructor
.showSteps))
console.info("slider1 style
" + JSON.stringify(obj.$attrs.constructor
.style))
expect(obj.$attrs.
constructor.
showTips).assertEqual("true")
expect(obj.$attrs.
constructor.
showSteps).assertEqual("true")
expect(obj.$attrs.
constructor.
style).assertEqual("SliderStyle.Inset")
console.info('testGetSliderAttr2 END');
done();
});
...
...
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets
浏览文件 @
5a5d2891
...
...
@@ -135,7 +135,7 @@ export default function textJsunit() {
expect(obj.$attrs.zIndex).assertEqual(1)
expect(obj.$attrs.fontColor).assertEqual("#FF000000")
expect(obj.$attrs.visibility).assertEqual("Visibility.Visible")
expect(obj.$attrs.fontSize).assertEqual("15")
expect(obj.$attrs.fontSize).assertEqual("15
.000000fp
")
expect(obj.$attrs.fontWeight).assertEqual("FontWeight.Bold")
expect(obj.$attrs.fontStyle).assertEqual("FontStyle.Italic")
expect(obj.$attrs.fontFamily).assertEqual("sans-serif")
...
...
ace/ace_ets_test/entry/src/main/config.json
浏览文件 @
5a5d2891
...
...
@@ -63,7 +63,6 @@
"pages/AlphabetIndexer"
,
"pages/Grid"
,
"pages/GridItem"
,
"pages/HyperLink"
,
"pages/List"
,
"pages/ListItem"
,
"pages/Navigator"
,
...
...
ace/ace_ets_test/entry/src/main/ets/MainAbility/pages/HyperLink.ets
已删除
100644 → 0
浏览文件 @
ab224c61
/*
* 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.
*/
@Entry
@Component
struct hyperLink_testcase {
@State active: boolean = false
build() {
Column() {
Column() {
Hyperlink('https://developer.harmonyos.com/', 'Go to the developer website') {
Text("click to link to developer page")
.fontSize(30)
}.color("#008000")
.key('hyperlink1')
}.width('100%').margin({ top: 5 })
}
.width(300)
.height(300)
.borderColor(Color.Pink)
.borderWidth(2)
}
}
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/HyperLinkJsunit.test.ets
已删除
100644 → 0
浏览文件 @
ab224c61
/*
* 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.
*/
// @ts-nocheck
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
export default function hyperlinkJsunit() {
function sleep(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve()
}, time * 1000)
}).then(() => {
console.info(`sleep ${time} over...`)
})
}
describe('hyperLinkTest', function () {
beforeEach(async function (done) {
let options = {
uri: 'pages/HyperLink',
}
try {
router.clear();
let pages = router.getState();
console.info("get HyperLink state success " + JSON.stringify(pages));
if (!("HyperLink" == pages.name)) {
console.info("get HyperLink state success " + JSON.stringify(pages.name));
let result = await router.push(options)
console.info("push HyperLink page success " + JSON.stringify(result));
}
} catch (err) {
console.error("push HyperLink page error " + JSON.stringify(result));
}
await sleep(2)
done()
});
afterEach(async function () {
await sleep(1)
console.info("HyperLink after each called");
});
/**
* @tc.number SUB_ACE_BASIC_ETS_API_0360
* @tc.name hyperLinkTest001
* @tc.desc aceEtsTest
*/
it('hyperLinkTest001', 0, async function (done) {
console.info('++++++++++++++++ Hyperlink TestCase 1 START ++++++++++++++++');
await sleep(1)
let strJson = getInspectorByKey('hyperlink1');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Hyperlink')
console.info("属性值集合: " + JSON.stringify(obj));
console.log('Hyperlink‘s address is ' + JSON.stringify(obj.$attrs.address))
console.log('Hyperlink‘s content is ' + JSON.stringify(obj.$attrs.content))
expect(obj.$attrs.address).assertEqual('https://developer.harmonyos.com/')
expect(obj.$attrs.content).assertEqual('Go to the developer website')
console.info('++++++++++++++++ Hyperlink TestCase 1 End ++++++++++++++++');
done();
});
})
}
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/List.test.ets
浏览文件 @
5a5d2891
...
...
@@ -24,13 +24,11 @@ import panelJsunit from './PanelJsunit.test.ets';
import navigatorJsunit from './NavigatorJsunit.test.ets';
import rowJsunit from './RowJsunit.test.ets';
import listItemJsunit from './ListItemJsunit.test.ets';
import hyperlinkJsunit from './HyperLinkJsunit.test.ets';
import gridItemJsunit from './GridItem.test.ets';
import gridJsunit from './GridJsnuit.test.ets';
import videoJsunit from './VideoJsunit.test.ets';
export default function testsuite() {
alphabetIndexerJsunit()
hyperlinkJsunit()
rowJsunit()
gridJsunit()
gridItemJsunit()
...
...
ace/ace_ets_test/entry/src/main/ets/MainAbility/test/ListItemJsunit.test.ets
浏览文件 @
5a5d2891
...
...
@@ -92,8 +92,8 @@ export default function listItemJsunit() {
console.log('ListItem2‘s sticky is ' + JSON.stringify(obj.$attrs.sticky))
console.log('ListItem2‘s editable is ' + JSON.stringify(obj.$attrs.editable))
await sleep(1)
expect(obj.$attr.sticky).assertEqual('Sticky.Opacity')
expect(obj.$attr.editable).assertEqual('true')
expect(obj.$attr
s
.sticky).assertEqual('Sticky.Opacity')
expect(obj.$attr
s
.editable).assertEqual('true')
console.info('++++++++++++++++ ListItem TestCase 3 End ++++++++++++++++');
done();
});
...
...
ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/NavigationJsunit.test.ets
浏览文件 @
5a5d2891
...
...
@@ -69,10 +69,10 @@ export default function navigationJsunit() {
let obj = JSON.parse(strJson);
console.info("[navigation1] get inspector value is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Navigation')
expect(obj.$attrs.
navigationT
itle).assertEqual('title')
expect(obj.$attrs.
navigationSubT
itle).assertEqual('subtitle')
expect(obj.$attrs.hide
Navigation
BackButton).assertFalse()
expect(obj.$attrs.hide
Navigation
Bar).assertFalse()
expect(obj.$attrs.
t
itle).assertEqual('title')
expect(obj.$attrs.
subt
itle).assertEqual('subtitle')
expect(obj.$attrs.hideBackButton).assertFalse()
expect(obj.$attrs.hide
Title
Bar).assertFalse()
console.info('testNavigation010 End');
done();
});
...
...
@@ -89,8 +89,8 @@ export default function navigationJsunit() {
let obj = JSON.parse(strJson);
console.info("[navigation2] get inspector value is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Navigation')
expect(obj.$attrs.hide
Navigation
Bar).assertTrue()
expect(obj.$attrs.hide
Navigation
BackButton).assertTrue()
expect(obj.$attrs.hide
Title
Bar).assertTrue()
expect(obj.$attrs.hideBackButton).assertTrue()
console.info('testNavigation020 End');
done();
});
...
...
ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextAreaJsunit.test.ets
浏览文件 @
5a5d2891
...
...
@@ -68,7 +68,7 @@ export default function textAreaJsunit() {
let strJson = getInspectorByKey('textArea1');
let obj = JSON.parse(strJson);
console.info("[textArea1] get inspector value is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Text
a
rea')
expect(obj.$type).assertEqual('Text
A
rea')
expect(obj.$attrs.placeholderColor).assertEqual('#FFC0C0C0')
expect(obj.$attrs.textAlign).assertEqual('TextAlign.Start')
expect(obj.$attrs.caretColor).assertEqual('#FF000000')
...
...
@@ -91,7 +91,7 @@ export default function textAreaJsunit() {
let strJson = getInspectorByKey('textArea2');
let obj = JSON.parse(strJson);
console.info("[textArea2] get inspector value is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Text
a
rea')
expect(obj.$type).assertEqual('Text
A
rea')
expect(obj.$attrs.textAlign).assertEqual('TextAlign.Center')
console.info('testTextArea020 End');
done();
...
...
@@ -107,7 +107,7 @@ export default function textAreaJsunit() {
let strJson = getInspectorByKey('textArea3');
let obj = JSON.parse(strJson);
console.info("[textArea3] get inspector value is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Text
a
rea')
expect(obj.$type).assertEqual('Text
A
rea')
expect(obj.$attrs.textAlign).assertEqual('TextAlign.End')
console.info('testTextArea030 End');
done();
...
...
ace/ace_ets_third_test/entry/src/main/ets/MainAbility/test/TextInputJsunit.test.ets
浏览文件 @
5a5d2891
...
...
@@ -88,7 +88,7 @@ export default function textInputJsunit() {
expect(obj.$attrs.fontStyle).assertEqual('FontStyle.Italic')
expect(obj.$attrs.fontSize).assertEqual('40.000000fp')
expect(obj.$attrs.height).assertEqual('60.000000vp')
expect(obj.$attrs.
heigh
t).assertContain('FontStyle.Normal')
expect(obj.$attrs.
placeholderFon
t).assertContain('FontStyle.Normal')
console.info('testTextInput010 End');
done();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录