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// @ts-ignore 16import {SpText} from "../../../dist/trace/component/Sptext.js" 17 18describe('Sptext Test', () => { 19 20 let sptext = new SpText(); 21 22 it('SptextTest01', function () { 23 expect(sptext.initElements()).toBeUndefined() 24 }); 25 26 it('SptextTest01', function () { 27 expect(sptext.initHtml()).toMatchInlineSnapshot(` 28" 29 <style> 30 :host{ 31 } 32 .root{ 33 display: flex; 34 flex-direction: column; 35 } 36 .trace-menu{ 37 grid-area: m; 38 } 39 .trace-content{ 40 grid-area: b; 41 width: 100%; 42 height: 2000px; 43 overflow: auto; 44 } 45 </style> 46 <div class=\\"root\\"> 47 <div id=\\"trace-content\\" class=\\"trace-content\\"> 48 <img src=\\"img/pic.png\\"> 49 <lit-popover direction=\\"topleft\\" type=\\"multiple-text\\" title=\\"\\"> 50 <button>test</button> 51 </lit-popover> 52 </div> 53 </div> 54 " 55`) 56 }); 57})