/* * Copyright (C) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // @ts-ignore import {SpQuerySQL} from "../../../dist/trace/component/SpQuerySQL.js" describe('SpQuerySQL Test', () => { let spQuerySQL= new SpQuerySQL(); it('SpQuerySQLTest01', function () { expect(spQuerySQL.checkSupportSqlAbility()).toBeFalsy() }); it('SpQuerySQLTest02', function () { expect(spQuerySQL.checkSafetySelectSql()).toBeTruthy() }); it('SpQuerySQLTest03', function () { expect(spQuerySQL.getSelectSqlField()).toBe("") }); it('SpQuerySQLTest04', function () { expect(spQuerySQL.getSelectSqlTableName()).not.toBeUndefined() }); it('SpQuerySQLTest05', function () { expect(spQuerySQL.initDataElement()).toBeUndefined() }); it('SpQuerySQLTest06', function () { spQuerySQL.statDataArray.length = 1 expect(spQuerySQL.initData()).toBeUndefined() }); it('SpQuerySQLTest07', function () { expect(spQuerySQL.attributeChangedCallback()).toBeUndefined() }); it('SpQuerySQLTest08', function () { expect(spQuerySQL.initHtml()).toMatchInlineSnapshot(` "

Enter query and press cmd/ctrl + Enter

Query result - 0 counts

" `); }); it('SpQuerySQLTest09', function () { expect(spQuerySQL.initDataTableStyle({children:[{length:3,style:{backgroundColor:'var(--dark-background5,#F6F6F6)'}}]})).toBeUndefined() }); it('SpQuerySQLTest010', function () { expect(spQuerySQL.freshTableHeadResizeStyle()).toBeUndefined(); }); it('SpQuerySQLTest011', function () { expect(spQuerySQL.reset()).toBeUndefined(); }); it('SpQuerySQLTest012', function () { let spQuerySQL =new SpQuerySQL(); expect(spQuerySQL.initDataTableStyle({children: [{length:1,style:{backgroundColor:'var(--dark-background5,#F6F6F6)'}}] })).toBeUndefined() }); it('SpQuerySQLTest013', function () { expect(spQuerySQL.initDataElement()).toBeUndefined(); }); it('SpQuerySQLTest014', function () { expect(spQuerySQL.connectedCallback()).toBeUndefined(); }); it('SpQuerySQLTest015', function () { expect(spQuerySQL.disconnectedCallback()).toBeUndefined(); }); it('SpQuerySQLTest016', function () { expect(spQuerySQL.initData()).toBeUndefined(); }); it('SpQuerySQLTest017', function () { expect(spQuerySQL.attributeChangedCallback('','','')).toBeUndefined(); }); })