1fb726d48Sopenharmony_ci/* 2fb726d48Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3fb726d48Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4fb726d48Sopenharmony_ci * you may not use this file except in compliance with the License. 5fb726d48Sopenharmony_ci * You may obtain a copy of the License at 6fb726d48Sopenharmony_ci * 7fb726d48Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8fb726d48Sopenharmony_ci * 9fb726d48Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10fb726d48Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11fb726d48Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12fb726d48Sopenharmony_ci * See the License for the specific language governing permissions and 13fb726d48Sopenharmony_ci * limitations under the License. 14fb726d48Sopenharmony_ci */ 15fb726d48Sopenharmony_ci 16fb726d48Sopenharmony_ciimport { LitSelectV } from '../../../src/base-ui/select/LitSelectV'; 17fb726d48Sopenharmony_ci 18fb726d48Sopenharmony_cidescribe('LitSelectV Test', () => { 19fb726d48Sopenharmony_ci let litSelectV = new LitSelectV(); 20fb726d48Sopenharmony_ci it('LitSelectVTest01', function () { 21fb726d48Sopenharmony_ci expect(litSelectV.value).not.toBeUndefined(); 22fb726d48Sopenharmony_ci }); 23fb726d48Sopenharmony_ci it('LitSelectVTest02', function () { 24fb726d48Sopenharmony_ci litSelectV.rounded = true; 25fb726d48Sopenharmony_ci expect(litSelectV.rounded).toBeTruthy(); 26fb726d48Sopenharmony_ci }); 27fb726d48Sopenharmony_ci it('LitSelectVTest06', function () { 28fb726d48Sopenharmony_ci litSelectV.rounded = false; 29fb726d48Sopenharmony_ci expect(litSelectV.rounded).toBeFalsy(); 30fb726d48Sopenharmony_ci }); 31fb726d48Sopenharmony_ci it('LitSelectVTest03', function () { 32fb726d48Sopenharmony_ci expect(litSelectV.placement).toBe(''); 33fb726d48Sopenharmony_ci }); 34fb726d48Sopenharmony_ci it('LitSelectVTest04', function () { 35fb726d48Sopenharmony_ci litSelectV.placement = true; 36fb726d48Sopenharmony_ci expect(litSelectV.placement).toBeTruthy(); 37fb726d48Sopenharmony_ci }); 38fb726d48Sopenharmony_ci it('LitSelectVTest05', function () { 39fb726d48Sopenharmony_ci litSelectV.placement = false; 40fb726d48Sopenharmony_ci expect(litSelectV.placement).toBeFalsy(); 41fb726d48Sopenharmony_ci }); 42fb726d48Sopenharmony_ci it('LitSelectVTest07', function () { 43fb726d48Sopenharmony_ci litSelectV.boder = true; 44fb726d48Sopenharmony_ci expect(litSelectV.border).toBeTruthy(); 45fb726d48Sopenharmony_ci }); 46fb726d48Sopenharmony_ci it('LitSelectVTest08', function () { 47fb726d48Sopenharmony_ci litSelectV.border = false; 48fb726d48Sopenharmony_ci expect(litSelectV.border).toBe('false'); 49fb726d48Sopenharmony_ci }); 50fb726d48Sopenharmony_ci it('LitSelectVTest14', function () { 51fb726d48Sopenharmony_ci litSelectV.border = true; 52fb726d48Sopenharmony_ci expect(litSelectV.border).toBe('true'); 53fb726d48Sopenharmony_ci }); 54fb726d48Sopenharmony_ci it('LitSelectVTest09', function () { 55fb726d48Sopenharmony_ci litSelectV.defaultValue = 'test'; 56fb726d48Sopenharmony_ci expect(litSelectV.defaultValue).toBe('test'); 57fb726d48Sopenharmony_ci }); 58fb726d48Sopenharmony_ci it('LitSelectVTest010', function () { 59fb726d48Sopenharmony_ci litSelectV.placeholder = 'test'; 60fb726d48Sopenharmony_ci expect(litSelectV.placeholder).toBe('test'); 61fb726d48Sopenharmony_ci }); 62fb726d48Sopenharmony_ci it('LitSelectVTest011', function () { 63fb726d48Sopenharmony_ci litSelectV.all = true; 64fb726d48Sopenharmony_ci expect(litSelectV.all).toBeTruthy(); 65fb726d48Sopenharmony_ci }); 66fb726d48Sopenharmony_ci it('LitSelectVTest012', function () { 67fb726d48Sopenharmony_ci litSelectV.all = false; 68fb726d48Sopenharmony_ci expect(litSelectV.all).toBeFalsy(); 69fb726d48Sopenharmony_ci }); 70fb726d48Sopenharmony_ci it('LitSelectVTest013', function () { 71fb726d48Sopenharmony_ci let value = [ 72fb726d48Sopenharmony_ci { 73fb726d48Sopenharmony_ci length: 1, 74fb726d48Sopenharmony_ci }, 75fb726d48Sopenharmony_ci ]; 76fb726d48Sopenharmony_ci let valueStr = ''; 77fb726d48Sopenharmony_ci expect(litSelectV.dataSource(value, valueStr)).toBeUndefined(); 78fb726d48Sopenharmony_ci }); 79fb726d48Sopenharmony_ci it('LitSelectVTest014', function () { 80fb726d48Sopenharmony_ci let value = [ 81fb726d48Sopenharmony_ci { 82fb726d48Sopenharmony_ci length: 1, 83fb726d48Sopenharmony_ci }, 84fb726d48Sopenharmony_ci ]; 85fb726d48Sopenharmony_ci let valueStr = 'aa'; 86fb726d48Sopenharmony_ci expect(litSelectV.dataSource(value, valueStr)).toBeUndefined(); 87fb726d48Sopenharmony_ci }); 88fb726d48Sopenharmony_ci it('LitSelectVTest015', function () { 89fb726d48Sopenharmony_ci expect(litSelectV.connectedCallback()).toBeUndefined(); 90fb726d48Sopenharmony_ci }); 91fb726d48Sopenharmony_ci it('LitSelectVTest016', function () { 92fb726d48Sopenharmony_ci let valueStr = 'aa'; 93fb726d48Sopenharmony_ci expect(litSelectV.dataSource([], valueStr)).toBeUndefined(); 94fb726d48Sopenharmony_ci }); 95fb726d48Sopenharmony_ci it('LitSelectVTest017', function () { 96fb726d48Sopenharmony_ci let value = [ 97fb726d48Sopenharmony_ci { 98fb726d48Sopenharmony_ci length: 1, 99fb726d48Sopenharmony_ci }, 100fb726d48Sopenharmony_ci ]; 101fb726d48Sopenharmony_ci let valueStr = 'aa'; 102fb726d48Sopenharmony_ci litSelectV.all = true; 103fb726d48Sopenharmony_ci expect(litSelectV.dataSource(value, valueStr)).toBeUndefined(); 104fb726d48Sopenharmony_ci }); 105fb726d48Sopenharmony_ci it('LitSelectVTest018', function () { 106fb726d48Sopenharmony_ci let value = [ 107fb726d48Sopenharmony_ci { 108fb726d48Sopenharmony_ci length: 1, 109fb726d48Sopenharmony_ci }, 110fb726d48Sopenharmony_ci ]; 111fb726d48Sopenharmony_ci let valueStr = 'aa'; 112fb726d48Sopenharmony_ci litSelectV.title = 'Event List'; 113fb726d48Sopenharmony_ci expect(litSelectV.dataSource(value, valueStr)).toBeUndefined(); 114fb726d48Sopenharmony_ci }); 115fb726d48Sopenharmony_ci}); 116