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 {LitTabpane} from "../../../dist/base-ui/tabs/lit-tabpane.js"; 18 19describe('LitTabPane Test', ()=>{ 20 let litTabPane = new LitTabpane(); 21 22 litTabPane.tab = 'tab' 23 litTabPane.disabled = null || false 24 litTabPane.disabled = !null || !false 25 litTabPane.hidden = 'hidden' 26 litTabPane.closeable = false 27 litTabPane.key = 'key' 28 29 it('LitTabPaneTest1', ()=>{ 30 expect(litTabPane.attributeChangedCallback('disabled', 'disabled', '')).toBeUndefined() 31 }) 32 33 it('LitTabPaneTest2', ()=>{ 34 expect(litTabPane.tab).toBe('tab'); 35 }) 36 37 it('LitTabPaneTest3', ()=>{ 38 expect(litTabPane.icon).toBeNull(); 39 }) 40 41 it('LitTabPaneTest4', ()=>{ 42 expect(litTabPane.disabled).toBeTruthy(); 43 }) 44 45 it('LitTabPaneTest5', ()=>{ 46 expect(litTabPane.hidden).toBeTruthy(); 47 }) 48 49 it('LitTabPaneTest6', ()=>{ 50 litTabPane.closeable = 'closeable' 51 expect(litTabPane.closeable).toBeTruthy(); 52 }) 53 54 it('LitTabPaneTest7', ()=>{ 55 expect(litTabPane.key).toBe('key'); 56 }) 57 58 it('LitTabPaneTest9 ', function () { 59 expect(litTabPane.connectedCallback()).toBeUndefined() 60 61 }); 62 63 it('LitTabPaneTest10 ', function () { 64 expect(litTabPane.disconnectedCallback()).toBeUndefined() 65 66 }); 67 68 it('LitTabPaneTest11 ', function () { 69 expect(litTabPane.adoptedCallback()).toBeUndefined() 70 71 }); 72 it('LitTabPaneTest8', ()=>{ 73 expect(litTabPane.initHtml()).toMatchInlineSnapshot(` 74" 75 <style> 76 :host(){ 77 scroll-behavior: smooth; 78 -webkit-overflow-scrolling: touch; 79 overflow: auto; 80 width: 100%; 81 } 82 </style> 83 <slot></slot> 84 " 85`); 86 }) 87}) 88