Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e0390045
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看板
未验证
提交
e0390045
编写于
6月 01, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 01, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8868 删除Toggle默认色校验&适配UI测试套
Merge pull request !8868 from 王旭鹏/master
上级
9c02abf3
1197d1c9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
61 deletion
+17
-61
arkui/ace_ets_component_three/entry/src/main/ets/test/ToggleJsunit.test.ets
...onent_three/entry/src/main/ets/test/ToggleJsunit.test.ets
+0
-53
arkui/ace_ets_component_ui/entry/src/main/ets/test/SearchJsunit.test.ets
...omponent_ui/entry/src/main/ets/test/SearchJsunit.test.ets
+17
-6
arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets
...onent_ui/entry/src/main/ets/test/TextInputJsunit.test.ets
+0
-2
未找到文件。
arkui/ace_ets_component_three/entry/src/main/ets/test/ToggleJsunit.test.ets
浏览文件 @
e0390045
...
...
@@ -132,59 +132,6 @@ export default function ToggleJsunit() {
done();
});
it('testToggle06', 0, async function (done) {
console.info('testToggle06 START');
try {
let eventData = {
data: {
"selectedColor": '-a',
}
}
let indexEvent = {
eventId: 1033,
priority: events_emitter.EventPriority.LOW
}
console.info("testToggle06 start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("testToggle06 change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJsonNew = getInspectorByKey('toggle');
let objNew = JSON.parse(strJsonNew);
console.info("testToggle06 component objNew is: " + JSON.stringify(objNew));
// 非法入参默认初始值
expect(objNew.$attrs.selectedColor).assertEqual('#33007DFF');
console.info('testToggle06 END');
done();
});
it('testToggle07', 0, async function (done) {
console.info('testToggle07 START');
try {
let eventData = {
data: {
"selectedColor": '-0.1',
}
}
let indexEvent = {
eventId: 1034,
priority: events_emitter.EventPriority.LOW
}
console.info("testToggle07 start to publish emit");
events_emitter.emit(indexEvent, eventData);
} catch (err) {
console.log("testToggle07 change component data error: " + err.message);
}
await Utils.sleep(4000);
let strJsonNew = getInspectorByKey('toggle');
let objNew = JSON.parse(strJsonNew);
console.info("testToggle07 component objNew is: " + JSON.stringify(objNew));
expect(objNew.$attrs.selectedColor).assertEqual('#33007DFF');
console.info('testToggle07 END');
done();
});
it('testToggle08', 0, async function (done) {
console.info('testToggle04 START');
try {
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/SearchJsunit.test.ets
浏览文件 @
e0390045
...
...
@@ -78,7 +78,7 @@ export default function SearchJsunit() {
await CommonFunc.sleep(500);
globalThis.value.message.notify({name:'icon',value:'./resources/base/media/star_3.png'})
await CommonFunc.sleep(500);
globalThis.value.message.notify({name:'searchButton',value:'
CLICK_SEARCH
'})
globalThis.value.message.notify({name:'searchButton',value:'
search
'})
await CommonFunc.sleep(500);
globalThis.value.message.notify({name:'placeholderColor',value:Color.Green})
await CommonFunc.sleep(500);
...
...
@@ -111,7 +111,7 @@ export default function SearchJsunit() {
console.info("[SearchJsunit_0200] textAlign: " + JSON.stringify(obj.$attrs.textAlign));
console.info("[SearchJsunit_0200] copyOption: " + JSON.stringify(obj.$attrs.copyOption));
//expect(obj.$attrs.icon).assertEqual('./resources/base/media/star_3.png');
expect(obj.$attrs.searchButton).assertEqual('
CLICK_SEARCH
');
expect(obj.$attrs.searchButton).assertEqual('
search
');
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":"400","fontFamily":"HarmonyOS Sans"}');
...
...
@@ -141,35 +141,42 @@ export default function SearchJsunit() {
await CommonFunc.sleep(1000);
// Verify the onSubmit function of the Search component
let textComponent2 = await driver.findComponent(BY.text('
CLICK_SEARCH
'));
let textComponent2 = await driver.findComponent(BY.text('
search
'));
await textComponent2.click()
await CommonFunc.sleep(1000);
console.info("[SearchJsunit_0300] CLICK_SEARCH succ ");
let strJson2 = getInspectorByKey('submit');
let obj2 = JSON.parse(strJson2);
console.info("[SearchJsunit_0300] obj2: " + JSON.stringify(obj2));
expect(obj2.$attrs.content).assertEqual('onSubmit:hello');
// Verify the onCopy function of the Search component
await textComponent1.click()
await textComponent1.longClick()
await CommonFunc.sleep(1000);
console.info("[SearchJsunit_0300] first longClick succ ");
let textComponent3 = await driver.findComponent(BY.text('全选'));
await textComponent3.click()
let textComponent4 = await driver.findComponent(BY.text('复制'));
await textComponent4.click()
await CommonFunc.sleep(1000);
console.info("[SearchJsunit_0300] click copy succ ");
let strJson3 = getInspectorByKey('copy');
let obj3 = JSON.parse(strJson3);
console.info("[SearchJsunit_0300] obj3: " + JSON.stringify(obj3));
expect(obj3.$attrs.content).assertEqual('onCopy:hello');
// Verify the onCut function of the Search component
await textComponent1.click()
await textComponent1.longClick()
await CommonFunc.sleep(1000);
console.info("[SearchJsunit_0300] secand longClick succ ");
let textComponent5 = await driver.findComponent(BY.text('全选'));
await textComponent5.click()
let textComponent6 = await driver.findComponent(BY.text('剪切'));
await textComponent6.click()
await CommonFunc.sleep(1000);
console.info("[SearchJsunit_0300] click cut succ ");
let strJson4 = getInspectorByKey('cut');
let obj4 = JSON.parse(strJson4);
console.info("[SearchJsunit_0300] obj4: " + JSON.stringify(obj4));
...
...
@@ -181,6 +188,7 @@ export default function SearchJsunit() {
let textComponent8 = await driver.findComponent(BY.text('粘贴'));
await textComponent8.click()
await CommonFunc.sleep(1000);
console.info("[SearchJsunit_0300] click paste succ ");
let strJson5 = getInspectorByKey('paste');
let obj5 = JSON.parse(strJson5);
console.info("[SearchJsunit_0300] obj5: " + JSON.stringify(obj5));
...
...
@@ -190,8 +198,11 @@ export default function SearchJsunit() {
let textComponent7 = await driver.findComponent(BY.key('button'));
await textComponent7.click();
await CommonFunc.sleep(1000);
let text = await textComponent7.getText();
expect(text).assertEqual('Set caretPosition 2');
console.info("[SearchJsunit_0300] click button succ ");
let strJson6 = getInspectorByKey('button');
let obj6 = JSON.parse(strJson6);
console.info("[SearchJsunit_0300] obj6: " + JSON.stringify(obj6));
expect(obj6.$attrs.label).assertEqual('Set caretPosition 2');
console.info('[SearchJsunit_0300] END');
done();
});
...
...
@@ -233,7 +244,7 @@ export default function SearchJsunit() {
console.info("[SearchJsunit_0400] copyOption: " + JSON.stringify(obj.$attrs.copyOption));
console.info("[SearchJsunit_0400] placeholder: " + JSON.stringify(obj.$attrs.placeholder));
expect(obj.$attrs.icon).assertEqual('resource:///ohos_search.svg');
expect(obj.$attrs.searchButton).assertEqual('
CLICK_SEARCH
');
expect(obj.$attrs.searchButton).assertEqual('
search
');
expect(obj.$attrs.placeholderColor).assertEqual('#FF00000A');
expect(obj.$attrs.value).assertEqual('');
expect(obj.$attrs.placeholderFont).assertEqual('{"style":"FontStyle.Normal","size":"14.00fp","weight":"400","fontFamily":"sans-serif"}');
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/test/TextInputJsunit.test.ets
浏览文件 @
e0390045
...
...
@@ -96,10 +96,8 @@ export default function TextInputJsunit() {
console.info("[TextInputJsunit_0200] textAlign: " + JSON.stringify(obj.$attrs.textAlign));
expect(obj.$attrs.placeholder).assertEqual('inline style');
expect(obj.$attrs.type).assertEqual('InputType.Normal');
expect(obj.$attrs.placeholderColor).assertEqual('#FF182431');
expect(obj.$attrs.placeholderFont).assertEqual('{"style":"FontStyle.Normal","size":"16.00fp","weight":"400","fontFamily":"sans-serif"}');
expect(obj.$attrs.enterKeyType).assertEqual('EnterKeyType.Done');
expect(obj.$attrs.caretColor).assertEqual('#FF007DFF');
expect(obj.$attrs.maxLength).assertEqual('INF');
expect(obj.$attrs.textAlign).assertEqual('TextAlign.Start');
expect(obj.$attrs.showPasswordIcon).assertEqual(true);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录