• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 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 */
15import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
16import { Hypium } from '@ohos/hypium';
17import hilog from '@ohos.hilog';
18import testsuite from '../../test/List.test'
19import router from '@ohos.router';
20
21@Entry
22@Component
23struct Index {
24  aboutToAppear() {
25    var abilityDelegator: any
26    abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
27    var abilityDelegatorArguments: any
28    abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
29    hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO);
30    hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
31    Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
32  }
33
34  @State message: string = 'Hello World'
35
36  build() {
37    Row() {
38      Column() {
39        Text(this.message)
40          .fontSize(50)
41          .fontWeight(FontWeight.Bold)
42        Button() {
43          Text('next page')
44            .fontSize(20)
45            .fontWeight(FontWeight.Bold)
46        }
47        .type(ButtonType.Capsule)
48        .margin({
49          top: 20
50        })
51        .backgroundColor('#0D9FFB')
52        .width('35%')
53        .height('5%')
54        .onClick(() => {
55        })
56      }
57      .width('100%')
58    }
59    .height('100%')
60  }
61}
62