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