1 /* 2 * Copyright (c) 2020-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef GRAPHIC_LITE_TEST_APP_H 17 #define GRAPHIC_LITE_TEST_APP_H 18 19 #include "components/root_view.h" 20 #include "components/ui_label.h" 21 #include "components/ui_label_button.h" 22 #include "components/ui_list.h" 23 #include "test_case_list_adapter.h" 24 25 namespace OHOS { 26 namespace { 27 constexpr char* UI_TEST_MAIN_LIST_ID = "main_list"; 28 constexpr char* UI_TEST_BACK_BUTTON_ID = "back_button"; 29 } 30 class UITestApp { 31 public: 32 static UITestApp* GetInstance(); 33 void Start(); 34 35 private: UITestApp()36 UITestApp() {} 37 ~UITestApp(); 38 39 UITestApp(const UITestApp&) = delete; 40 UITestApp& operator=(const UITestApp&) = delete; 41 UITestApp(UITestApp&&) = delete; 42 UITestApp& operator=(UITestApp&&) = delete; 43 44 void Init(); 45 void InitAutoTestBtn(); 46 void InitMainMenu(); 47 void InitBackBtn(); 48 void InitTestLabel(); 49 RootView* rootView_ = nullptr; 50 UIList* mainList_ = nullptr; 51 TestCaseListAdapter* adapter_ = nullptr; 52 UILabelButton* backBtn_ = nullptr; 53 UILabel* testCaseLabel_ = nullptr; 54 UILabel* testLabel_ = nullptr; 55 UILabelButton* autoTestBtn_ = nullptr; 56 UIViewGroup* mainMenu_ = nullptr; 57 }; 58 } // namespace OHOS 59 #endif // GRAPHIC_LITE_TEST_APP_H 60