未验证 提交 708dba04 编写于 作者: O openharmony_ci 提交者: Gitee

!5398 【窗口子系统】修改用例重复执行问题

Merge pull request !5398 from hekun/OpenHarmony-3.1-Release
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
"js": [ "js": [
{ {
"pages": [ "pages": [
"pages/index/index" "pages/index/index",
"pages/two/two"
], ],
"name": "default", "name": "default",
"window": { "window": {
......
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default {
data: {
title: ""
},
onInit() {
this.title = this.$t('strings.world');
}
}
...@@ -2915,7 +2915,7 @@ describe('window_test', function () { ...@@ -2915,7 +2915,7 @@ describe('window_test', function () {
if (!!data) { if (!!data) {
tempWnd = data tempWnd = data
expect(!!tempWnd).assertTrue(); expect(!!tempWnd).assertTrue();
tempWnd.loadContent('pages/index', (err, data) => { tempWnd.loadContent('pages/two', (err, data) => {
console.log(msgStr + 'tempWnd.loadContent err' + JSON.stringify(err)); console.log(msgStr + 'tempWnd.loadContent err' + JSON.stringify(err));
console.log(msgStr + 'tempWnd.loadContent data' + JSON.stringify(data)); console.log(msgStr + 'tempWnd.loadContent data' + JSON.stringify(data));
console.log(msgStr + 'tempWnd.loadContent !!data' + !!data); console.log(msgStr + 'tempWnd.loadContent !!data' + !!data);
...@@ -2985,11 +2985,11 @@ describe('window_test', function () { ...@@ -2985,11 +2985,11 @@ describe('window_test', function () {
console.log(msgStr + 'window.create ' + baseWndType + ' , wnd: ' + tempWnd); console.log(msgStr + 'window.create ' + baseWndType + ' , wnd: ' + tempWnd);
expect(!!tempWnd).assertTrue(); expect(!!tempWnd).assertTrue();
console.log(msgStr + 'tempWnd.loadContent start'); console.log(msgStr + 'tempWnd.loadContent start');
let load = await tempWnd.loadContent('pages/index/index').catch((err) => { let load = await tempWnd.loadContent('pages/two/two').catch((err) => {
unexpectedError(err, caseName, 'tempWnd.loadContent', done); unexpectedError(err, caseName, 'tempWnd.loadContent', done);
console.log(msgStr+'tempWnd.loadContent(pages/index/index) err='+JSON.stringify(err)); console.log(msgStr+'tempWnd.loadContent(pages/two/two) err='+JSON.stringify(err));
}); });
console.log(msgStr+'tempWnd.loadContent(pages/index/index) load='+JSON.stringify(load)); console.log(msgStr+'tempWnd.loadContent(pages/two/two) load='+JSON.stringify(load));
expect(!load).assertTrue(); expect(!load).assertTrue();
done(); done();
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册