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 */
15import { LitDrawer } from '../../../src/base-ui/drawer/LitDrawer';
16// @ts-ignore
17window.ResizeObserver = window.ResizeObserver || jest.fn().mockImplementation(() => ({
18    disconnect: jest.fn(),
19    observe: jest.fn(),
20    unobserve: jest.fn(),
21}));
22
23describe('LitDrawer Test', () => {
24    it('LitDrawerTest01', () => {
25        let litDrawer = new LitDrawer();
26        expect(litDrawer).not.toBeUndefined();
27    });
28    it('LitDrawerTest02', () => {
29        let litDrawer = new LitDrawer();
30        expect(litDrawer.contentWidth).toBe('400px');
31    });
32    it('LitDrawerTest03', () => {
33        let litDrawer = new LitDrawer();
34        expect(litDrawer.contentPadding).toBe('20px');
35    });
36    it('LitDrawerTest04', () => {
37        let litDrawer = new LitDrawer();
38        expect(litDrawer.placement).toBe(null);
39    });
40    it('LitDrawerTest05', () => {
41        let litDrawer = new LitDrawer();
42        expect(litDrawer.title).toBe('');
43    });
44    it('LitDrawerTest06', () => {
45        let litDrawer = new LitDrawer();
46        expect(litDrawer.visible).toBe(false);
47    });
48    it('LitDrawerTest07', () => {
49        let litDrawer = new LitDrawer();
50        litDrawer.contentWidth = 'content-width'
51        expect(litDrawer.contentWidth).toBe('content-width');
52    });
53    it('LitDrawerTest08', () => {
54        let litDrawer = new LitDrawer();
55        litDrawer.contentPadding = 'content-padding';
56        expect(litDrawer.contentPadding).toBe('content-padding');
57    });
58    it('LitDrawerTest09', () => {
59        let litDrawer = new LitDrawer();
60        litDrawer.placement = 'placement'
61        expect(litDrawer.placement).toBe('placement');
62    });
63    it('LitDrawerTest10', () => {
64        let litDrawer = new LitDrawer();
65        litDrawer.title = 'title'
66        expect(litDrawer.title).toBe('title');
67    });
68    it('LitDrawerTest11', () => {
69        let litDrawer = new LitDrawer();
70        litDrawer.visible = true;
71        expect(litDrawer.visible).toBe(true);
72    });
73    it('LitDrawerTest12', () => {
74        let litDrawer = new LitDrawer();
75        expect(litDrawer.mask).toBe(false);
76    });
77    it('LitDrawerTest13', () => {
78        let litDrawer = new LitDrawer();
79        litDrawer.mask = true;
80        expect(litDrawer.mask).toBe(true);
81    });
82    it('LitDrawerTest14', () => {
83        let litDrawer = new LitDrawer();
84        expect(litDrawer.maskCloseable).toBe(false);
85    });
86    it('LitDrawerTest15', () => {
87        let litDrawer = new LitDrawer();
88        litDrawer.maskCloseable = true;
89        expect(litDrawer.maskCloseable).toBe(true);
90    });
91    it('LitDrawerTest16', () => {
92        let litDrawer = new LitDrawer();
93        expect(litDrawer.closeable).toBe(false);
94    });
95    it('LitDrawerTest17', () => {
96        let litDrawer = new LitDrawer();
97        litDrawer.closeable = true;
98        expect(litDrawer.closeable).toBe(true);
99    });
100    it('LitDrawerTest18', () => {
101        let litDrawer = new LitDrawer();
102        expect(litDrawer.adoptedCallback()).toBeUndefined();
103    });
104})
105