1 /* 2 * Copyright (c) 2020-2021 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 UI_TEST_CIRCLE_PROGRESS_H 17 #define UI_TEST_CIRCLE_PROGRESS_H 18 19 #include "components/ui_circle_progress.h" 20 #include "components/ui_label_button.h" 21 #include "components/ui_scroll_view.h" 22 #include "ui_test.h" 23 24 namespace OHOS { 25 class UITestCircleProgress : public UITest, public UIView::OnClickListener { 26 public: UITestCircleProgress()27 UITestCircleProgress() {} ~UITestCircleProgress()28 ~UITestCircleProgress() {} 29 void SetUp() override; 30 void TearDown() override; 31 const UIView* GetTestView() override; 32 33 void SetUpButton(UILabelButton* btn, const char* title, int16_t x, int16_t y); 34 void SetUpLabel(const char* title, int16_t x, int16_t y) const; 35 36 bool OnClick(UIView& view, const ClickEvent& event) override; 37 38 void UIKit_CircleProgress_Test_UICircleProgress_001(); 39 void UIKit_CircleProgress_Test_SetValue_002(); 40 void UIKit_CircleProgress_Test_SetImage_003(); 41 void UIKit_CircleProgress_Test_SetStyle_004(); 42 void UIKit_CircleProgress_Test_GetStyle_005(); 43 void UIKit_CircleProgress_Test_SetCapType_006(); 44 void UIKit_CircleProgress_Test_SetStep_007(); 45 void UIKit_CircleProgress_Test_SetRange_008(); 46 void UIKit_CircleProgress_Test_EnableBackground_009(); 47 void UIKit_CircleProgress_Test_SetCenter_010(); 48 void UIKit_CircleProgress_Test_SetRadius_011(); 49 void UIKit_CircleProgress_Test_SetLineWidth_012(); 50 void UIKit_CircleProgress_Test_SetImagePosition_013(); 51 void UIKit_CircleProgress_Test_SetLineColor_014(); 52 void UIKit_CircleProgress_Test_SetAngle_015(); 53 54 private: 55 UIScrollView* container_ = nullptr; 56 UIScrollView* scroll_ = nullptr; 57 UICircleProgress* circleProgress_ = nullptr; 58 UIViewGroup* uiViewGroupFrame_ = nullptr; 59 60 UILabelButton* resetBtn_ = nullptr; 61 UILabelButton* incProgressBtn_ = nullptr; 62 UILabelButton* decProgressBtn_ = nullptr; 63 UILabelButton* incMinProgressBtn_ = nullptr; 64 UILabelButton* decMinProgressBtn_ = nullptr; 65 UILabelButton* incMaxProgressBtn_ = nullptr; 66 UILabelButton* decMaxProgressBtn_ = nullptr; 67 UILabelButton* centerXBtn_ = nullptr; 68 UILabelButton* centerYBtn_ = nullptr; 69 UILabelButton* incRadiusBtn_ = nullptr; 70 UILabelButton* decRadiusBtn_ = nullptr; 71 UILabelButton* incWidthBtn_ = nullptr; 72 UILabelButton* decWidthBtn_ = nullptr; 73 UILabelButton* incStartAngleBtn_ = nullptr; 74 UILabelButton* decStartAngleBtn_ = nullptr; 75 UILabelButton* incEndAngleBtn_ = nullptr; 76 UILabelButton* decEndAngleBtn_ = nullptr; 77 UILabelButton* swapAngleBtn_ = nullptr; 78 UILabelButton* stepBtn_ = nullptr; 79 UILabelButton* imageBtn_ = nullptr; 80 UILabelButton* noImageBtn_ = nullptr; 81 UILabelButton* setStyleBtn_ = nullptr; 82 UILabelButton* getStyleBtn_ = nullptr; 83 UILabelButton* roundCapBtn_ = nullptr; 84 UILabelButton* noneCapBtn_ = nullptr; 85 UILabelButton* enableBgBtn_ = nullptr; 86 UILabelButton* disableBgBtn_ = nullptr; 87 UILabelButton* imgPosXBtn_ = nullptr; 88 UILabelButton* imgPosYBtn_ = nullptr; 89 UILabelButton* lineColorBtn_ = nullptr; 90 }; 91 } // namespace OHOS 92 #endif // UI_TEST_CIRCLE_PROGRESS_H 93