Skip to content

Commit

Permalink
update sqlpage snapshot
Browse files Browse the repository at this point in the history
Signed-off-by: Shenoy Pratik <[email protected]>
  • Loading branch information
ps48 committed Oct 2, 2023
1 parent 25449ef commit 835e6b4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
30 changes: 12 additions & 18 deletions public/components/SQLPage/SQLPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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("<SQLPage /> spec", () => {

it("renders the component", () => {
describe('<SQLPage /> spec', () => {
it('renders the component', () => {
render(
<SQLPage
onRun={() => { }}
onTranslate={() => { }}
onClear={() => { }}
updateSQLQueries={() => { }}
onRun={() => {}}
onTranslate={() => {}}
onClear={() => {}}
updateSQLQueries={() => {}}
sqlTranslations={[]}
sqlQuery={''}
selectedDatasource={''}
/>
);
expect(document.body.children[0]).toMatchSnapshot();
Expand All @@ -40,6 +38,7 @@ describe("<SQLPage /> spec", () => {
updateSQLQueries={updateSQLQueries}
sqlTranslations={[]}
sqlQuery={''}
selectedDatasource={'S3'}
/>
);

Expand All @@ -53,10 +52,5 @@ describe("<SQLPage /> spec", () => {

fireEvent.click(getByText('Explain'));
expect(onTranslate).toHaveBeenCalledTimes(1);

});

});



18 changes: 18 additions & 0 deletions public/components/SQLPage/__snapshots__/SQLPage.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,24 @@ exports[`<SQLPage /> spec tests the action buttons 1`] = `
</div>
</div>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButton euiButton--primary euiButton--fill sql-accelerate-button"
type="button"
>
<span
class="euiButtonContent euiButton__content"
>
<span
class="euiButton__text"
>
Accelerate Table
</span>
</span>
</button>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 835e6b4

Please sign in to comment.