Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
874ba95b
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看板
提交
874ba95b
编写于
2月 22, 2023
作者:
W
wang-xupeng2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify rating and search
Signed-off-by:
N
wang-xupeng2
<
wangxupeng2@huawei.com
>
上级
a8f8b83f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
10 deletion
+11
-10
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/RatingPage.ets
...nt_ui/entry/src/main/ets/MainAbility/pages/RatingPage.ets
+1
-1
arkui/ace_ets_component_ui/entry/src/main/ets/test/RatingJsunit.test.ets
...omponent_ui/entry/src/main/ets/test/RatingJsunit.test.ets
+3
-2
arkui/ace_ets_component_ui/entry/src/main/ets/test/SearchJsunit.test.ets
...omponent_ui/entry/src/main/ets/test/SearchJsunit.test.ets
+7
-7
未找到文件。
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/RatingPage.ets
浏览文件 @
874ba95b
...
...
@@ -18,7 +18,7 @@ import {MessageManager,Callback} from '../utils/MessageManager';
@Component
struct RatingPage {
@State rating: number = 3.5
@State indicator : boolean =
fals
e
@State indicator : boolean =
tru
e
@State stars: number = 5
@State stepSize: number = 0.5
@State text: string = 'no change'
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/RatingJsunit.test.ets
浏览文件 @
874ba95b
...
...
@@ -51,7 +51,7 @@ export default function RatingJsunit() {
console.info("[RatingJsunit_0100] component obj is: " + JSON.stringify(obj));
await CommonFunc.sleep(1000);
expect(obj.$attrs.rating).assertEqual('3.500000');
expect(obj.$attrs.indicator).assertEqual('
fals
e');
expect(obj.$attrs.indicator).assertEqual('
tru
e');
expect(obj.$attrs.stars).assertEqual('5');
expect(obj.$attrs.stepSize).assertEqual('0.500000');
expect(obj.$attrs.starStyle).assertEqual('{"backgroundUri":"resources/base/media/star_1.png","foregroundUri":"resources/base/media/star_2.png","secondaryUri":"resources/base/media/star_3.png"}');
...
...
@@ -134,7 +134,8 @@ export default function RatingJsunit() {
console.info('[RatingJsunit_0600] START');
await CommonFunc.sleep(1000);
// Modify the indicator value of the Rating component
globalThis.value.message.notify({name:'indicator',value:false})
globalThis.value.message.notify({name:'rating',value:1})
await CommonFunc.sleep(1000);
let driver = await UiDriver.create()
let textComponent1 = await driver.findComponent(BY.key('text'));
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/SearchJsunit.test.ets
浏览文件 @
874ba95b
...
...
@@ -63,8 +63,8 @@ export default function SearchJsunit() {
expect(obj.$attrs.searchButton).assertEqual('SEARCH');
expect(obj.$attrs.placeholderColor).assertEqual('#FF808080');
expect(obj.$attrs.value).assertEqual('');
expect(obj.$attrs.placeholderFont).assertEqual('{
"style": "FontStyle.Normal", "size": "14.00fp", "weight": "400", "fontFamily ": "sans-serif"
}');
expect(obj.$attrs.textFont).assertEqual('{
"fontSize":"14.00fp","fontStyle":"FontStyle.Normal","fontWeight":"FontWeight.400","fontFamily":"HarmonyOS Sans"}');
expect(obj.$attrs.placeholderFont).assertEqual('{
"style":"FontStyle.Normal","size":"14.00fp","weight":"400","fontFamily":"sans-serif"
}');
expect(obj.$attrs.textFont).assertEqual('{"fontSize":"14.00fp","fontStyle":"FontStyle.Normal","fontWeight":"FontWeight.400","fontFamily":"HarmonyOS Sans"}');
expect(obj.$attrs.textAlign).assertEqual('TextAlign.Start');
expect(obj.$attrs.copyOption).assertEqual('CopyOptions.InApp');
expect(obj.$attrs.placeholder).assertEqual('Type to search...');
...
...
@@ -113,8 +113,8 @@ export default function SearchJsunit() {
expect(obj.$attrs.icon).assertEqual('./resources/base/media/star_3.png');
expect(obj.$attrs.searchButton).assertEqual('CLICK_SEARCH');
expect(obj.$attrs.value).assertEqual('hello');
expect(obj.$attrs.placeholderFont).assertEqual('{
"style": "FontStyle.Normal", "size": "20.00fp", "weight": "500", "fontFamily ": "sans-serif"
}');
expect(obj.$attrs.textFont).assertEqual('{
"fontSize":"20.00fp","fontStyle":"FontStyle.Normal","fontWeight":"FontWeight.500","fontFamily":"HarmonyOS Sans"}');
expect(obj.$attrs.placeholderFont).assertEqual('{
"style":"FontStyle.Normal","size":"20.00fp","weight":"500","fontFamily":"sans-serif"
}');
expect(obj.$attrs.textFont).assertEqual('{"fontSize":"20.00fp","fontStyle":"FontStyle.Normal","fontWeight":"FontWeight.500","fontFamily":"HarmonyOS Sans"}');
expect(obj.$attrs.textAlign).assertEqual('TextAlign.Center');
expect(obj.$attrs.copyOption).assertEqual('CopyOptions.LocalDevice');
expect(obj.$attrs.placeholderColor).assertEqual('#FF008000');
...
...
@@ -156,7 +156,7 @@ export default function SearchJsunit() {
await textComponent4.click()
let copy = await driver.findComponent(BY.key('copy'));
let text3 = await copy.getText();
expect(text3).assertEqual('onCopy:');
expect(text3).assertEqual('onCopy:
hello
');
// Verify the onCut function of the Search component
await textComponent1.longClick()
...
...
@@ -226,8 +226,8 @@ export default function SearchJsunit() {
expect(obj.$attrs.searchButton).assertEqual('10');
expect(obj.$attrs.placeholderColor).assertEqual('#FF00000A');
expect(obj.$attrs.value).assertEqual('hello');
expect(obj.$attrs.placeholderFont).assertEqual('{
"style": "FontStyle.Normal", "size": "14.00fp", "weight": "400", "fontFamily ": "sans-serif"
}');
expect(obj.$attrs.textFont).assertEqual('{
"fontSize":"14.00fp","fontStyle":"FontStyle.Normal","fontWeight":"FontWeight.400","fontFamily":"HarmonyOS Sans"}');
expect(obj.$attrs.placeholderFont).assertEqual('{
"style":"FontStyle.Normal","size":"14.00fp","weight":"400","fontFamily":"sans-serif"
}');
expect(obj.$attrs.textFont).assertEqual('{"fontSize":"14.00fp","fontStyle":"FontStyle.Normal","fontWeight":"FontWeight.400","fontFamily":"HarmonyOS Sans"}');
expect(obj.$attrs.textAlign).assertEqual('TextAlign.Start');
expect(obj.$attrs.copyOption).assertEqual('');
expect(obj.$attrs.placeholder).assertEqual('Click to search...');
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录