1/*
2 * Copyright (C) 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
16import { LitCheckBoxWithText } from '../../../src/base-ui/checkbox/LitCheckBoxWithText';
17
18describe('checkBoxWithText Test', () => {
19  it('checkBoxWithTextTest01', function () {
20    let litCheckBoxWithText = new LitCheckBoxWithText();
21    expect(litCheckBoxWithText).not.toBeUndefined();
22    expect(litCheckBoxWithText).not.toBeNull();
23  });
24
25  it('checkBoxWithTextTest02', function () {
26    let litCheckBoxWithText = new LitCheckBoxWithText();
27    expect(litCheckBoxWithText.checked).toBeFalsy();
28  });
29
30  it('checkBoxWithTextTest03', function () {
31    let litCheckBoxWithText = new LitCheckBoxWithText();
32    litCheckBoxWithText.checked = true;
33    expect(litCheckBoxWithText.checked).toBeTruthy();
34  });
35
36  it('checkBoxWithTextTest03', function () {
37    let litCheckBoxWithText = new LitCheckBoxWithText();
38    litCheckBoxWithText.checked = false;
39    expect(litCheckBoxWithText.checked).toBeFalsy();
40  });
41
42  it('checkBoxWithTextTest04', function () {
43    let litCheckBoxWithText = new LitCheckBoxWithText();
44    expect(litCheckBoxWithText.text).toEqual('');
45  });
46
47  it('checkBoxWithTextTest05', function () {
48    let litCheckBoxWithText = new LitCheckBoxWithText();
49    litCheckBoxWithText.text = 'test';
50    expect(litCheckBoxWithText.text).toEqual('test');
51  });
52
53  it('checkBoxWithTextTest05', function () {
54    let litCheckBoxWithText = new LitCheckBoxWithText();
55    expect(litCheckBoxWithText.lowerLimit).toEqual('0');
56  });
57
58  it('checkBoxWithTextTest05', function () {
59    let litCheckBoxWithText = new LitCheckBoxWithText();
60    litCheckBoxWithText.lowerLimit = '111';
61    expect(litCheckBoxWithText.lowerLimit).toEqual('111');
62  });
63
64  it('checkBoxWithTextTest05', function () {
65    let litCheckBoxWithText = new LitCheckBoxWithText();
66    litCheckBoxWithText.upLimit = '111';
67    expect(litCheckBoxWithText.upLimit).toEqual('111');
68  });
69
70  it('checkBoxWithTextTest06', function () {
71    let litCheckBoxWithText = new LitCheckBoxWithText();
72    expect(litCheckBoxWithText.attributeChangedCallback('checked')).toBeUndefined();
73  });
74
75  it('checkBoxWithTextTest07', function () {
76    let litCheckBoxWithText = new LitCheckBoxWithText();
77    expect(litCheckBoxWithText.attributeChangedCallback('text')).toBeUndefined();
78  });
79
80  it('checkBoxWithTextTest08', function () {
81    let litCheckBoxWithText = new LitCheckBoxWithText();
82    expect(litCheckBoxWithText.attributeChangedCallback('lowerLimit')).toBeUndefined();
83  });
84
85  it('checkBoxWithTextTest09', function () {
86    let litCheckBoxWithText = new LitCheckBoxWithText();
87    expect(litCheckBoxWithText.attributeChangedCallback('upLimit')).toBeUndefined();
88  });
89});
90