Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
977b23db
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看板
未验证
提交
977b23db
编写于
8月 24, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5139 【XTS】【元能力】XTS测试套优化用例并删除release接口相关用例
Merge pull request !5139 from chengxingzhen/master
上级
754a45f7
6ce581f5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
147 deletion
+5
-147
ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/src/main/js/test/DataAbilityHelperJsSt.test.js
...cessortest/src/main/js/test/DataAbilityHelperJsSt.test.js
+4
-146
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets
...xtensioninfotest/entry/src/main/ets/test/Ability.test.ets
+1
-1
未找到文件。
ability/ability_runtime/actsfwkdataaccessortest/actsfwkdataaccessortest/src/main/js/test/DataAbilityHelperJsSt.test.js
浏览文件 @
977b23db
...
...
@@ -59,13 +59,13 @@ describe('ActsDataAbilityHelperTest', function () {
console
.
log
(
'
ACTS_AcquireDataAbilityHelper_0100====<begin
'
);
console
.
debug
(
"
=ACTS_AcquireDataAbilityHelper_0100 dataAbilityUri====>
"
+
dataAbilityUri
)
try
{
var
abilityHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
)
console
.
log
(
'
ACTS_AcquireDataAbilityHelper_0100 abilityHelper ====>:
'
+
abilityHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
abilityHelper
))
if
(
DAHelper
==
null
){
var
abilityHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
)
console
.
log
(
'
ACTS_AcquireDataAbilityHelper_0100 abilityHelper ====>:
'
+
abilityHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
abilityHelper
))
DAHelper
=
abilityHelper
;
}
expect
(
typeof
(
ability
Helper
)).
assertEqual
(
"
object
"
);
expect
(
typeof
(
DA
Helper
)).
assertEqual
(
"
object
"
);
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_GetDataAbilityHelper_0100 acquireDataAbilityHelper catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
...
...
@@ -8317,146 +8317,4 @@ describe('ActsDataAbilityHelperTest', function () {
done
();
}
})
/*
* @tc.number: ACTS_Release_0100
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by promise)
*/
it
(
'
ACTS_Release_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0100====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
().
then
((
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0100 then data====>
"
+
(
"
json data 【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,
"
+
data
);
expect
(
data
).
assertEqual
(
true
);
console
.
log
(
'
ACTS_Release_0100====<end
'
);
done
();
}).
catch
(
err
=>
{
console
.
debug
(
"
=ACTS_Release_0100 catch err ====>
"
+
(
"
json err 【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
));
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0100====<end .catch
'
);
done
();
});
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0100 release promise catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0100====<end catch(err)
'
);
done
();
}
})
/*
* @tc.number: ACTS_Release_0200
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_Release_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0200====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
((
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0200 err,data=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】;
"
));
console
.
log
(
'
featureAbility getDataAbilityHelper ACTS_Release_0200 data:
'
+
data
)
expect
(
data
).
assertEqual
(
true
);
console
.
log
(
'
ACTS_Release_0200====<end
'
);
done
();
},
);
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0200 release AsyncCallback catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0200====<end catch
'
);
done
();
}
})
/*
* @tc.number: ACTS_Release_0300
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by promise)
*/
it
(
'
ACTS_Release_0300
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0300====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
().
then
((
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0300 then data====>
"
+
(
"
json data 【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,
"
+
data
);
expect
(
data
).
assertEqual
(
true
);
rDAHelper
.
release
().
then
((
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0300 then data====>
"
+
(
"
json data 【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
+
"
,
"
+
data
);
expect
(
data
).
assertEqual
(
false
);
console
.
log
(
'
ACTS_Release_0300====<end
'
);
done
();
}).
catch
(
err
=>
{
console
.
debug
(
"
=ACTS_Release_0300 catch err ====>
"
+
(
"
json err 【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
));
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0300====<end .catch
'
);
done
();
});
}).
catch
(
err
=>
{
console
.
debug
(
"
=ACTS_Release_0300 catch err ====>
"
+
(
"
json err 【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】
"
));
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0300====<end .catch
'
);
done
();
});
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0300 release promise catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0300====<end catch(err)
'
);
done
();
}
})
/*
* @tc.number: ACTS_Release_0400
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_Release_0400
'
,
0
,
async
function
(
done
)
{
console
.
log
(
'
ACTS_Release_0400====<begin
'
);
var
rDAHelper
try
{
rDAHelper
=
featureAbility
.
acquireDataAbilityHelper
(
dataAbilityUri
);
console
.
debug
(
'
ACTS_beforeAll rDAHelper ====>:
'
+
rDAHelper
+
"
,JSON.
"
+
JSON
.
stringify
(
rDAHelper
));
expect
(
typeof
(
rDAHelper
)).
assertEqual
(
"
object
"
);
rDAHelper
.
release
((
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0400 err,data=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
】json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】;
"
));
console
.
log
(
'
featureAbility getDataAbilityHelper ACTS_Release_0400 data:
'
+
data
)
expect
(
data
).
assertEqual
(
true
);
rDAHelper
.
release
((
err
,
data
)
=>
{
console
.
debug
(
"
=ACTS_Release_0400 err,data=======>
"
+
(
"
json err【
"
)
+
JSON
.
stringify
(
err
)
+
(
"
,
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】;
"
));
console
.
log
(
'
featureAbility getDataAbilityHelper ACTS_Release_0400 data:
'
+
data
)
expect
(
data
).
assertEqual
(
false
);
console
.
log
(
'
ACTS_Release_0400====<end
'
);
done
();
},
);
},
);
}
catch
(
err
)
{
console
.
error
(
'
=ACTS_Release_0400 release AsyncCallback catch(err)====>:
'
+
err
);
expect
(
false
).
assertTrue
();
console
.
log
(
'
ACTS_Release_0400====<end catch
'
);
done
();
}
})
})}
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
977b23db
...
...
@@ -376,7 +376,7 @@ export default function abilityTest() {
expect(data.labelId.length).assertLarger(0);
expect(data.icon).assertEqual("$media:icon");
expect(data.iconId.length).assertLarger(0);
expect(data.process).assertEqual("com.example.staticextensioninfo");
expect(data.process).assertEqual("com.example.staticextensioninfo
test
");
expect(data.supportedModes).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" +
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录