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 17// @ts-ignore 18import {LitCheckGroup} from "../../../dist/base-ui/checkbox/LitCheckGroup.js"; 19 20describe('LitCheckGroup Test', ()=>{ 21 22 it('LitCheckGroupTest01', function () { 23 let litCheckGroup = new LitCheckGroup(); 24 expect(litCheckGroup).not.toBeUndefined() 25 expect(litCheckGroup).not.toBeNull() 26 }); 27 28 29 it('LitCheckGroupTest02', function () { 30 let litCheckGroup = new LitCheckGroup(); 31 expect(litCheckGroup.direction).toBeNull(); 32 }); 33 34 it('LitCheckGroupTest03', function () { 35 let litCheckGroup = new LitCheckGroup(); 36 expect(litCheckGroup.value).toEqual([]); 37 }); 38 39 it('LitCheckGroupTest03', function () { 40 let litCheckGroup = new LitCheckGroup(); 41 expect(litCheckGroup.initHtml()).toMatchInlineSnapshot(` 42" 43 <style> 44 :host { 45 display: -webkit-flex; 46 display: flex; 47 flex-direction: column; 48 } 49 :host([direction]) { 50 flex-direction: null; 51 } 52 :host(:not([direction])) { 53 flex-direction: column; 54 } 55 56 :host([layout=\\"compact\\"]) { 57 gap:5px; 58 } 59 :host([layout=\\"dispersion\\"]) { 60 gap:10px; 61 } 62 63 </style> 64 <slot class=\\"check-group\\"></slot>" 65`); 66 }); 67 68})