@@ -2,9 +2,7 @@ import React from 'react';
22import { render , screen , fireEvent , waitFor } from '@testing-library/react' ;
33import userEvent from '@testing-library/user-event' ;
44import { ConfigEditor } from './ConfigEditor' ;
5- import { DataSourceSettings } from '@grafana/data' ;
6- import { GoogleSheetsSecureJSONData } from '../types' ;
7- import { GoogleAuthType , DataSourceOptions } from '@grafana/google-sdk' ;
5+ import { GoogleAuthType } from '@grafana/google-sdk' ;
86
97jest . mock ( '@grafana/plugin-ui' , ( ) => ( {
108 DataSourceDescription : ( ) => < div data-testid = "data-source-description" /> ,
@@ -21,15 +19,15 @@ jest.mock('@grafana/runtime', () => ({
2119 } ) ,
2220} ) ) ;
2321
24- const dataSourceSettings : DataSourceSettings < DataSourceOptions , GoogleSheetsSecureJSONData > = {
22+ const dataSourceSettings = {
2523 jsonData : {
2624 authenticationType : GoogleAuthType . JWT ,
2725 } ,
2826 secureJsonFields : {
2927 jwt : true ,
3028 } ,
3129 uid : 'test-uid' ,
32- } as DataSourceSettings < DataSourceOptions , GoogleSheetsSecureJSONData > ;
30+ } as any ;
3331
3432
3533describe ( 'ConfigEditor' , ( ) => {
@@ -110,11 +108,11 @@ describe('ConfigEditor', () => {
110108
111109 const selectEl = screen . getByText ( 'Select Spreadsheet ID' ) ;
112110 expect ( selectEl ) . toBeInTheDocument ( ) ;
113-
111+
114112 await userEvent . click ( selectEl ) ;
115113 const spreadsheetOption = await screen . findByText ( 'label1' , { } , { timeout : 3000 } ) ;
116114 await userEvent . click ( spreadsheetOption ) ;
117-
115+
118116 await waitFor ( ( ) => {
119117 expect ( onOptionsChange ) . toHaveBeenCalledWith (
120118 expect . objectContaining ( {
0 commit comments