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 {LitSelectV} from "../../../dist/base-ui/select/LitSelectV.js"; 18 19describe('LitSelectV Test', () => { 20 let litSelectV = new LitSelectV() 21 it('LitSelectVTest01', function () { 22 expect(litSelectV.value).not.toBeUndefined() 23 }) 24 it('LitSelectVTest02', function () { 25 litSelectV.rounded = true 26 expect(litSelectV.rounded).toBeTruthy() 27 }) 28 it('LitSelectVTest06', function () { 29 litSelectV.rounded = false 30 expect(litSelectV.rounded).toBeFalsy() 31 }) 32 it('LitSelectVTest03', function () { 33 expect(litSelectV.placement).toBe("") 34 35 }) 36 it('LitSelectVTest04', function () { 37 litSelectV.placement = true 38 expect(litSelectV.placement).toBeTruthy() 39 40 }) 41 it('LitSelectVTest05', function () { 42 litSelectV.placement = false 43 expect(litSelectV.placement).toBeFalsy() 44 45 }) 46 it('LitSelectVTest07', function () { 47 litSelectV.boder = true 48 expect(litSelectV.border).toBeTruthy() 49 }) 50 it('LitSelectVTest08', function () { 51 litSelectV.border = false 52 expect(litSelectV.border).toBe("false") 53 }) 54 it('LitSelectVTest14', function () { 55 litSelectV.border = true 56 expect(litSelectV.border).toBe("true") 57 }) 58 it('LitSelectVTest09', function () { 59 litSelectV.defaultValue = "test" 60 expect(litSelectV.defaultValue).toBe("test") 61 }) 62 it('LitSelectVTest010', function () { 63 litSelectV.placeholder = "test" 64 expect(litSelectV.placeholder).toBe("test") 65 }) 66 it('LitSelectVTest011', function () { 67 litSelectV.all = true 68 expect(litSelectV.all).toBeTruthy() 69 }) 70 it('LitSelectVTest012', function () { 71 litSelectV.all = false 72 expect(litSelectV.all).toBeFalsy() 73 }) 74 it('LitSelectVTest013', function () { 75 let value = [{ 76 length:1, 77 }] 78 let valueStr = "" 79 expect(litSelectV.dataSource(value,valueStr)).toBeUndefined() 80 }) 81 it('LitSelectVTest014', function () { 82 let value = [{ 83 length:1, 84 }] 85 let valueStr = "aa" 86 expect(litSelectV.dataSource(value,valueStr)).toBeUndefined() 87 }) 88 it('LitSelectVTest015', function () { 89 expect(litSelectV.connectedCallback()).toBeUndefined() 90 }) 91 it('LitSelectVTest016', function () { 92 let valueStr = "aa"; 93 expect(litSelectV.dataSource([],valueStr)).toBeUndefined(); 94 }) 95 it('LitSelectVTest017', function () { 96 let value = [{ 97 length:1, 98 }]; 99 let valueStr = "aa"; 100 litSelectV.all = true; 101 expect(litSelectV.dataSource(value,valueStr)).toBeUndefined(); 102 }) 103 it('LitSelectVTest018', function () { 104 let value = [{ 105 length:1, 106 }]; 107 let valueStr = "aa"; 108 litSelectV.title = "Event List"; 109 expect(litSelectV.dataSource(value,valueStr)).toBeUndefined(); 110 }) 111})