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 18// @ts-ignore 19import {LitSlicer,LitSlicerTrack} from "../../../dist/base-ui/slicer/lit-slicer.js"; 20 21describe('slicer Test', ()=>{ 22 it('slicerTest01', function () { 23 let litSlicer = new LitSlicer(); 24 expect(litSlicer).not.toBeUndefined() 25 expect(litSlicer).not.toBeNull() 26 }); 27 it('slicerTest02', function () { 28 let litSlicerTrack = new LitSlicerTrack(); 29 expect(litSlicerTrack).not.toBeUndefined() 30 expect(litSlicerTrack).not.toBeNull() 31 }); 32 it('slicerTest03', function () { 33 let litSlicerTrack = new LitSlicerTrack(); 34 expect(litSlicerTrack.rangeLeft).toBe(200) 35 36 }) 37 it('slicerTest04', function () { 38 let litSlicerTrack = new LitSlicerTrack(); 39 litSlicerTrack.rangeLeft = true 40 expect(litSlicerTrack.rangeLeft).not.toBeTruthy() 41 42 }) 43 it('slicerTest05', function () { 44 let litSlicerTrack = new LitSlicerTrack(); 45 expect(litSlicerTrack.rangeRight).toBe(300) 46 }) 47 it('slicerTest09', function () { 48 let litSlicerTrack = new LitSlicerTrack(); 49 litSlicerTrack.rangeRight = false 50 expect(litSlicerTrack.rangeRight).toBeFalsy() 51 }) 52 it('slicerTest06', function () { 53 let litSlicer = new LitSlicer(); 54 expect(litSlicer.attributeChangedCallback()).toBeUndefined() 55 }) 56 it('slicerTest07', function () { 57 let litSlicerTrack = new LitSlicerTrack(); 58 expect(litSlicerTrack.adoptedCallback()).toBeUndefined() 59 }) 60 it('slicerTest08', function () { 61 let litSlicerTrack = new LitSlicerTrack(); 62 expect(litSlicerTrack.attributeChangedCallback()).toBeUndefined() 63 }) 64 it('slicerTest10', function () { 65 let litSlicer = new LitSlicer(); 66 litSlicer.direction ="h"; 67 expect(litSlicer. connectedCallback()).toBeUndefined() 68 }) 69 it('slicerTest11', function () { 70 let litSlicer = new LitSlicer(); 71 litSlicer.direction ="v"; 72 expect(litSlicer.direction).toBeUndefined() 73 }) 74 it('slicerTest12', function () { 75 let litSlicer = new LitSlicer(); 76 litSlicer.style ="v"; 77 expect(litSlicer.style).toBeUndefined() 78 }) 79})