From 7108e3ebdc7217371e140663d330083e7cee73cb Mon Sep 17 00:00:00 2001 From: jiadexiang Date: Tue, 19 Oct 2021 19:31:00 +0800 Subject: [PATCH] Description: add media query mst test case IssueNo: I4DSDQ Feature or Bugfix: Feature Binary Source:No Signed-off-by: jiadexiang --- .../common/test_app/ui_auto_test/config.json | 1 + .../default/pages/style/MediaQuery/index.css | 54 +++++++++++++++++++ .../default/pages/style/MediaQuery/index.hml | 23 ++++++++ .../default/pages/style/MediaQuery/index.js | 19 +++++++ 4 files changed, 97 insertions(+) create mode 100644 test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.css create mode 100644 test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.hml create mode 100644 test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.js diff --git a/test/moduletest/common/test_app/ui_auto_test/config.json b/test/moduletest/common/test_app/ui_auto_test/config.json index 9a67e29..f06137d 100755 --- a/test/moduletest/common/test_app/ui_auto_test/config.json +++ b/test/moduletest/common/test_app/ui_auto_test/config.json @@ -129,6 +129,7 @@ "pages/switch/SwitchS01/index", "pages/switch/SwitchS02/index", "pages/style/StyleBaseTest001/index", + "pages/style/MediaQuery/index", "pages/resource/resource005/index", "pages/resource/resource007/index", "pages/data-binding/01/index", diff --git a/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.css b/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.css new file mode 100644 index 0000000..3cafa35 --- /dev/null +++ b/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.css @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2021 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 { + width: 100%; + height: 200%; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + width: 200px; + font-size: 30px; + text-align: center; +} + +.box { + background-color: coral; + width: 466px; + height: 466px; + justify-content: center; + align-items: center; +} + +@media screen and (device-type: liteWearable) { + .box { + background-color: blue; + } +} + +@media screen and (device-type: smartVision) { + .box { + background-color: green; + } +} + +@media screen and (min-width: 454px) { + .container { + flex-direction: row; + height: 100%; + } +} \ No newline at end of file diff --git a/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.hml b/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.hml new file mode 100644 index 0000000..73d4f26 --- /dev/null +++ b/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.hml @@ -0,0 +1,23 @@ + + +
+
+ Panel 1 +
+
+ Panel 2 +
+
diff --git a/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.js b/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.js new file mode 100644 index 0000000..32afaa9 --- /dev/null +++ b/test/moduletest/common/test_app/ui_auto_test/src/main/js/default/pages/style/MediaQuery/index.js @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2021 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: 'World' + } +}