Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a73d4f00
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a73d4f00
编写于
5月 11, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
XTS系统api下库
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
e7ea82c1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
2 addition
and
190 deletion
+2
-190
aafwk/aafwk_standard/actsabilitydelegatorcase/entry/src/main/js/test/ActsAbilityDelegatorCaseTest.test.js
...try/src/main/js/test/ActsAbilityDelegatorCaseTest.test.js
+0
-95
aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/startFULL.test.js
...fa/fa_state_test/entry/src/main/js/test/startFULL.test.js
+1
-61
aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js
...etwantalltesthap/src/main/js/default/pages/index/index.js
+1
-34
未找到文件。
aafwk/aafwk_standard/actsabilitydelegatorcase/entry/src/main/js/test/ActsAbilityDelegatorCaseTest.test.js
浏览文件 @
a73d4f00
...
...
@@ -85,45 +85,6 @@ describe('ActsStServiceAbilityTest', function () {
})
/**
* @tc.number: ACTS_AExecuteShellCommand_0200
* @tc.name: Execute a shell command with arguments (AsyncCallback).
* @tc.desc: Verify that the interface executes the Shell command successfully.
*/
it
(
'
ACTS_AExecuteShellCommand_Callback_0200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
ACTS_AExecuteShellCommand_Callback_0200 --- start
"
)
var
currentAlertTimeout
=
0
;
try
{
currentAlertTimeout
=
setTimeout
(
mySetTimeout
,
gSetTimeout
);
function
mySetTimeout
()
{
console
.
log
(
'
ACTS_AExecuteShellCommand_Callback_0200====<end mySetTimeout
'
)
done
();
}
var
cmd
=
'
aa start -d 0 -a com.example.actskillProcessWithAccountclosetest.MainAbility
'
+
'
-b com.example.actskillProcessWithAccountclosetest
'
var
AbilityDelegator
=
abilityDelegatorRegistry
.
getAbilityDelegator
()
AbilityDelegator
.
executeShellCommand
(
cmd
,
1000
,
(
err
,
data
)
=>
{
clearTimeout
(
currentAlertTimeout
);
console
.
log
(
'
ACTS_AExecuteShellCommand_Callback_0200 - executeShellCommand: start
'
)
console
.
log
(
'
ACTS_AExecuteShellCommand_Callback_0200 stdResult =
'
+
data
.
stdResult
)
var
i
=
data
.
stdResult
.
indexOf
(
'
start ability successfully.
'
);
console
.
log
(
'
ACTS_AExecuteShellCommand_Callback_0200 query string i =
'
+
i
);
expect
(
i
==
-
1
).
assertEqual
(
false
);
console
.
log
(
'
ACTS_AExecuteShellCommand_Callback_0200 exitCode =
'
+
data
.
exitCode
)
expect
(
data
.
exitCode
).
assertEqual
(
0
);
done
()
})
}
catch
(
error
)
{
clearTimeout
(
currentAlertTimeout
);
console
.
log
(
"
ACTS_AExecuteShellCommand_Callback_0200 : error =
"
+
error
);
console
.
debug
(
'
ACTS_AExecuteShellCommand_Callback_0200====<end catch (error)
'
);
done
();
}
})
/**
* @tc.number: ACTS_AExecuteShellCommand_Promise_0100
* @tc.name: Execute a shell command without arguments (Promise).
...
...
@@ -161,62 +122,6 @@ describe('ActsStServiceAbilityTest', function () {
}
})
/**
* @tc.number: ACTS_AAACommand_0100
* @tc.name: Hide this for inner system use.
* @tc.desc: VHide this for inner system use successfully.
*/
it
(
'
ACTS_AAACommand_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
ACTS_AAACommand_0100 --- start
"
)
var
currentAlertTimeout
=
0
;
try
{
currentAlertTimeout
=
setTimeout
(
mySetTimeout
,
gSetTimeout
);
function
mySetTimeout
()
{
console
.
log
(
'
ACTS_AAACommand_0100====<end mySetTimeout
'
)
done
();
}
var
AbilityDelegator
=
abilityDelegatorRegistry
.
getAbilityDelegator
()
var
msg
=
'
测试日志!@#$%^&*()_+QWE{}|?><Fafq3146
'
AbilityDelegator
.
finishTest
(
msg
,
1
,
()
=>
{
console
.
log
(
"
ACTS_AAACommand_0100 finishTest test end ========> callback
"
)
done
()
})
}
catch
(
error
)
{
clearTimeout
(
currentAlertTimeout
);
console
.
log
(
"
ACTS_AAACommand_0100 : error =
"
+
error
);
console
.
debug
(
'
ACTS_AAACommand_0100====<end catch (error)
'
);
done
();
}
})
/**
* @tc.number: ACTS_AAACommand_1200
* @tc.name: Hide this for inner system use.
* @tc.desc: VHide this for inner system use successfully.
*/
it
(
'
ACTS_AAACommand_1200
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
ACTS_AAACommand_1200 --- start
"
)
var
currentAlertTimeout
=
0
;
try
{
currentAlertTimeout
=
setTimeout
(
mySetTimeout
,
gSetTimeout
);
function
mySetTimeout
()
{
console
.
log
(
'
ACTS_AAACommand_1200====<end mySetTimeout
'
)
done
();
}
var
AbilityDelegator
=
abilityDelegatorRegistry
.
getAbilityDelegator
()
var
msg
=
'
测试日志!@#$%^&*()_+QWE{}|?><Fafq3146
'
AbilityDelegator
.
finishTest
(
msg
,
Number
.
MAX_VALUE
).
then
(()
=>
{
console
.
log
(
"
ACTS_AAACommand_1200 finishTest test end ========> callback
"
)
done
()
})
}
catch
(
error
)
{
clearTimeout
(
currentAlertTimeout
);
console
.
log
(
"
ACTS_AAACommand_1200 : error =
"
+
error
);
console
.
debug
(
'
ACTS_AAACommand_1200====<end catch (error)
'
);
done
();
}
})
/**
* @tc.number: ACTS_AGetDisplayOrientation_0100
* @tc.name: GetDisplayOrientation
...
...
aafwk/aafwk_standard/fa/fa_state_test/entry/src/main/js/test/startFULL.test.js
浏览文件 @
a73d4f00
...
...
@@ -12,70 +12,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
appManager
from
'
@ohos.application.appManager
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
"
deccjsunit/index
"
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
abilityfeatureAbility
from
'
@ohos.ability.featureAbility
'
;
var
appbefore
var
appafter
describe
(
"
appManagerTest
"
,
function
()
{
console
.
log
(
"
---appManagerTest-- starting---
"
);
function
sleep
(
time
)
{
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
))
}
/**
* @tc.number: SUB_AA_OpenHarmony_StateListener_0300
* @tc.name: Find all foreground application validations
* @tc.desc: Function test
* @tc.level 0
*/
it
(
"
SUB_AA_OpenHarmony_StateListener_0300
"
,
0
,
async
function
(
done
)
{
await
appManager
.
getForegroundApplications
().
then
((
data
)
=>
{
console
.
log
(
"
---appM- starting---
"
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
bundleName
==
"
com.example.statelistener
"
)
{
appbefore
=
data
[
i
]
}
}
checkAppBefore
(
appbefore
)
}).
catch
(()
=>
{
expect
().
assertFail
()
})
var
want
=
{
"
bundleName
"
:
"
com.example.fzgc
"
,
"
abilityName
"
:
"
com.example.fzgc.MainAbility
"
}
await
featureAbility
.
startAbility
({
want
}).
then
().
catch
();
await
sleep
(
1000
)
await
appManager
.
getForegroundApplications
().
then
((
data
)
=>
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
bundleName
==
"
com.example.fzgc
"
)
{
appafter
=
data
[
i
]
}
}
checkAppAfter
(
appafter
)
}).
catch
(()
=>
{
expect
().
assertFail
()
})
await
sleep
(
2000
)
done
();
})
function
checkAppAfter
(
app
)
{
expect
(
app
.
state
==
2
).
assertTrue
();
expect
(
app
.
uid
>
0
).
assertTrue
();
expect
(
app
.
bundleName
).
assertEqual
(
'
com.example.fzgc
'
);
}
function
checkAppBefore
(
app
)
{
expect
(
app
.
state
==
2
).
assertTrue
();
expect
(
app
.
uid
>
0
).
assertTrue
();
expect
(
app
.
bundleName
).
assertEqual
(
'
com.example.statelistener
'
);
}
})
})
\ No newline at end of file
aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js
浏览文件 @
a73d4f00
...
...
@@ -23,41 +23,8 @@ export default {
},
onShow
()
{
console
.
info
(
'
============Start Ability onShow finish
'
);
featureAbility
.
getWant
(
(
err
,
data
)
=>
{
data
=
data
;
console
.
debug
(
"
==========data=
"
+
JSON
.
stringify
(
data
));
if
(
data
.
parameters
.
mykey5
[
1
]
==
'
test123
'
){
featureAbility
.
getWant
().
then
((
data
)
=>
{
data
=
data
setTimeout
(
function
(){
console
.
debug
(
"
==========data2 bundleName is===========
"
+
JSON
.
stringify
(
data
.
bundleName
));
featureAbility
.
terminateSelfWithResult
(
{
resultCode
:
1
,
want
:
data
}
);
},
1000
);
})
}
else
{
setTimeout
(
function
(){
console
.
debug
(
"
==========data1 bundleName is===========
"
+
JSON
.
stringify
(
data
.
bundleName
));
featureAbility
.
terminateSelfWithResult
(
{
resultCode
:
1
,
want
:
data
}
);
},
1000
);
}
}
)
},
onReady
()
{
console
.
info
(
'
onReady
'
);
},
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录