diff --git a/public/components/SQLPage/SQLPage.test.tsx b/public/components/SQLPage/SQLPage.test.tsx index 7b08b5d8..d1e7ccc3 100644 --- a/public/components/SQLPage/SQLPage.test.tsx +++ b/public/components/SQLPage/SQLPage.test.tsx @@ -3,24 +3,22 @@ * SPDX-License-Identifier: Apache-2.0 */ +import '@testing-library/jest-dom/extend-expect'; +import { fireEvent, render } from '@testing-library/react'; +import React from 'react'; +import { SQLPage } from './SQLPage'; -import React from "react"; -import "@testing-library/jest-dom/extend-expect"; -import { render, fireEvent } from "@testing-library/react"; -import { SQLPage } from "./SQLPage"; - - -describe(" spec", () => { - - it("renders the component", () => { +describe(' spec', () => { + it('renders the component', () => { render( { }} - onTranslate={() => { }} - onClear={() => { }} - updateSQLQueries={() => { }} + onRun={() => {}} + onTranslate={() => {}} + onClear={() => {}} + updateSQLQueries={() => {}} sqlTranslations={[]} sqlQuery={''} + selectedDatasource={''} /> ); expect(document.body.children[0]).toMatchSnapshot(); @@ -40,6 +38,7 @@ describe(" spec", () => { updateSQLQueries={updateSQLQueries} sqlTranslations={[]} sqlQuery={''} + selectedDatasource={'S3'} /> ); @@ -53,10 +52,5 @@ describe(" spec", () => { fireEvent.click(getByText('Explain')); expect(onTranslate).toHaveBeenCalledTimes(1); - }); - }); - - - diff --git a/public/components/SQLPage/__snapshots__/SQLPage.test.tsx.snap b/public/components/SQLPage/__snapshots__/SQLPage.test.tsx.snap index 4db824cc..96850ed5 100644 --- a/public/components/SQLPage/__snapshots__/SQLPage.test.tsx.snap +++ b/public/components/SQLPage/__snapshots__/SQLPage.test.tsx.snap @@ -381,6 +381,24 @@ exports[` spec tests the action buttons 1`] = ` +
+ +