未验证 提交 3d37f6c6 编写于 作者: O openharmony_ci 提交者: Gitee

!7307 xts-删除ohShow-相关用例适配

Merge pull request !7307 from chengxingzhen/monthly_20221018
...@@ -105,10 +105,6 @@ export default { ...@@ -105,10 +105,6 @@ export default {
onInit() { onInit() {
this.title = "AbilityMultiInstanceAppE"; this.title = "AbilityMultiInstanceAppE";
callBackSeq += "onInit"; callBackSeq += "onInit";
},
onShow() {
console.log('AbilityMultiInstanceAppE onShow start');
callBackSeq += "onShow";
onShowProcess(); onShowProcess();
}, },
onStart() { onStart() {
......
...@@ -775,7 +775,6 @@ export default function abilityTest(abilityContext) { ...@@ -775,7 +775,6 @@ export default function abilityTest(abilityContext) {
console.log('ACTS_AbilityMultiInstance_Single_1300====<begin'); console.log('ACTS_AbilityMultiInstance_Single_1300====<begin');
let subscriber; let subscriber;
let id; let id;
let result;
let checkEventResults = ["AppB:onCreateonForeground", "AppB:onCreateonForeground"]; let checkEventResults = ["AppB:onCreateonForeground", "AppB:onCreateonForeground"];
let checkIndex = 0; let checkIndex = 0;
...@@ -834,8 +833,7 @@ export default function abilityTest(abilityContext) { ...@@ -834,8 +833,7 @@ export default function abilityTest(abilityContext) {
console.log('ACTS_AbilityMultiInstance_Single_1400====<begin'); console.log('ACTS_AbilityMultiInstance_Single_1400====<begin');
let subscriber; let subscriber;
let id; let id;
let result; let checkEventResults = ["AppE:onInit", "AppA:onForegroundonAcceptWantCalledId1"];
let checkEventResults = ["AppE:onInitonShow", "AppA:onForegroundonAcceptWantCalledId1"];
let checkIndex = 0; let checkIndex = 0;
function subscribeCallBack(err, data) { function subscribeCallBack(err, data) {
...@@ -894,7 +892,7 @@ export default function abilityTest(abilityContext) { ...@@ -894,7 +892,7 @@ export default function abilityTest(abilityContext) {
let subscriber; let subscriber;
let id; let id;
let result; let result;
let checkEventResults = ["AppA:onForegroundonAcceptWantCalledId2", "AppE:onInitonShow"]; let checkEventResults = ["AppA:onForegroundonAcceptWantCalledId2", "AppE:onInit"];
let checkIndex = 0; let checkIndex = 0;
function subscribeCallBack(err, data) { function subscribeCallBack(err, data) {
......
...@@ -12,9 +12,18 @@ ...@@ -12,9 +12,18 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
let abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments();
console.info('start run testcase!!!');
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite);
}, },
onDestroy() { onDestroy() {
console.info('AceApplication onDestroy'); console.info('AceApplication onDestroy');
......
...@@ -12,11 +12,6 @@ ...@@ -12,11 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import file from '@system.file'
import app from '@system.app'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from '@ohos/hypium'
import testsuite from '../../../test/List.test'
export default { export default {
data: { data: {
...@@ -25,13 +20,6 @@ export default { ...@@ -25,13 +20,6 @@ export default {
onInit() { onInit() {
this.title = this.$t('strings.world'); this.title = this.$t('strings.world');
}, },
onShow() {
console.info('====onShow finish====<')
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
},
onReady() { onReady() {
}, },
} }
\ No newline at end of file
...@@ -180,84 +180,6 @@ export default function OnAndOffScreenTest() { ...@@ -180,84 +180,6 @@ export default function OnAndOffScreenTest() {
}) })
}) })
/*
* @tc.number : SUB_AA_OpenHarmony_OnAndOffScreen_0200
* @tc.name : Verify the life cycle of on / off screen ability
* @tc.desc : FA model is applied in the foreground, the device locks the screen, and then unlocks.
*/
it('SUB_AA_OpenHarmony_OnAndOffScreen_0200', 0, async function (done) {
TAG = 'SUB_AA_OpenHarmony_OnAndOffScreen_0200 == ';
console.log(TAG + "begin");
let status1 = undefined;
let lifeList = [];
let listCheck = ["onCreate", "onActive", "onInactive", "onHide", "onShow"];
let onActive = "FaOnAndOffScreen_MainAbility_onActive";
let onHide = "FaOnAndOffScreen_MainAbility_onHide";
let onShow = "FaOnAndOffScreen_MainAbility_onShow";
var subscriber;
var subscribeInfo = {
events: [onActive, onHide, onShow]
}
await commonEvent.createSubscriber(subscribeInfo).then(async (data) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(data));
subscriber = data;
commonEvent.subscribe(subscriber, async (err, data) => {
console.log(TAG + "SubscribeInfoCallback : " + JSON.stringify(data));
if (data.event == onActive) {
let cmd = "uinput -K -d 18 -u 18";
await executeShellCommand(cmd, TAG);
}
if (data.event == onHide) {
let cmd = "uinput -K -d 18 -u 18";
await executeShellCommand(cmd, TAG);
await slideScreen(TAG);
}
if (data.event == onShow) {
lifeList = data.parameters.lifeList;
setTimeout(async () => {
commonEvent.unsubscribe(subscriber, async (err, data) => {
console.log(TAG + "UnSubscribeInfoCallback : " + JSON.stringify(data));
expect(JSON.stringify(lifeList)).assertEqual(JSON.stringify(listCheck));
expect(status1).assertTrue();
done();
});
}, sleepTimeOne);
}
});
}).catch((error) => {
console.log(TAG + "createSubscriber data : " + JSON.stringify(error));
expect().assertFail();
done();
})
await power.isScreenOn().then((data) => {
console.log(TAG + "isScreenOn status1 data = " + JSON.stringify(data));
status1 = data;
}).catch((error) => {
console.log(TAG + "isScreenOn status1 error = " + JSON.stringify(error));
expect().assertFail();
done();
})
let wantNum = {
bundleName: "ohos.acts.aafwk.test.faonandoffscreen",
abilityName: "ohos.acts.aafwk.test.faonandoffscreen.MainAbility"
}
await globalThis.abilityTestContext.startAbility(wantNum).then((data) => {
console.log(TAG + "startAbility data = " + JSON.stringify(data));
}).catch((error) => {
console.log(TAG + "startAbility error = " + JSON.stringify(error));
expect().assertFail();
done();
})
})
/* /*
* @tc.number : SUB_AA_OpenHarmony_OnAndOffScreen_0300 * @tc.number : SUB_AA_OpenHarmony_OnAndOffScreen_0300
* @tc.name : Verify the life cycle of on / off screen ability * @tc.name : Verify the life cycle of on / off screen ability
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import ability_featureAbility from '@ohos.ability.featureAbility';
import commonEvent from '@ohos.commonEvent'; import commonEvent from '@ohos.commonEvent';
var TAG1 = "Fa:FaOnAndOffScreen:MainAbility:"; var TAG1 = "Fa:FaOnAndOffScreen:MainAbility:";
...@@ -38,19 +37,6 @@ export default { ...@@ -38,19 +37,6 @@ export default {
console.log(TAG1 + 'onInactive'); console.log(TAG1 + 'onInactive');
lifeList.push('onInactive'); lifeList.push('onInactive');
}, },
onShow() {
console.log(TAG1 + 'onShow');
lifeList.push('onShow');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onShow", options, (err) => {
console.log(TAG1 + listPush1 + "onShow");
});
},
onHide() { onHide() {
console.log(TAG1 + 'onHide'); console.log(TAG1 + 'onHide');
lifeList.push('onHide'); lifeList.push('onHide');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册