diff --git a/.vscode/settings.json b/.vscode/settings.json index 63e5500..895c89f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,5 +26,8 @@ "test/**/__snapshots__": true, "yarn.lock": true, "*.{css,sass,scss}.d.ts": true + }, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true } } diff --git a/app/client/src/components/ConnectingIndicator/LoadingSharingIcon.spec.tsx b/app/client/src/components/ConnectingIndicator/LoadingSharingIcon.spec.tsx deleted file mode 100644 index d68cb0f..0000000 --- a/app/client/src/components/ConnectingIndicator/LoadingSharingIcon.spec.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import LoadingSharingIcon from './LoadingSharingIcon'; - -jest.useFakeTimers(); - -it('should match exact snapshot', () => { - const subject = renderer.create( - <> - - - ); - - expect(subject).toMatchSnapshot(); -}); diff --git a/app/client/src/components/ConnectingIndicator/__snapshots__/LoadingSharingIcon.spec.tsx.snap b/app/client/src/components/ConnectingIndicator/__snapshots__/LoadingSharingIcon.spec.tsx.snap deleted file mode 100644 index 3b04745..0000000 --- a/app/client/src/components/ConnectingIndicator/__snapshots__/LoadingSharingIcon.spec.tsx.snap +++ /dev/null @@ -1,93 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should match exact snapshot 1`] = ` -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - desktop - - - - -
-
-
-
-
-`; diff --git a/app/client/src/components/PlayerControlPanel/__snapshots__/index.spec.tsx.snap b/app/client/src/components/PlayerControlPanel/__snapshots__/index.spec.tsx.snap deleted file mode 100644 index 003f207..0000000 --- a/app/client/src/components/PlayerControlPanel/__snapshots__/index.spec.tsx.snap +++ /dev/null @@ -1,396 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should match exact snapshot 1`] = ` -
-
-
- - - - - - - - - - -
-
-
-
-
- -
- - - - - - - - - -
- - - - - -
-
-
-
-
-
-
- -
-
-
-
-
-`; diff --git a/app/client/src/components/PlayerControlPanel/index.spec.tsx b/app/client/src/components/PlayerControlPanel/index.spec.tsx deleted file mode 100644 index f418a3f..0000000 --- a/app/client/src/components/PlayerControlPanel/index.spec.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import PlayerControlPanel from '.'; -import ScreenSharingSource from '../../features/PeerConnection/ScreenSharingSourceEnum'; -import { VideoQuality } from '../../features/VideoAutoQualityOptimizer/VideoQualityEnum'; - -jest.useFakeTimers(); - -it('should match exact snapshot', () => { - const subject = renderer.create( - <> - {}} - isPlaying - isDefaultPlayerTurnedOn - handleClickFullscreen={() => {}} - handleClickPlayPause={() => {}} - setVideoQuality={() => {}} - selectedVideoQuality={VideoQuality.Q_100_PERCENT} - screenSharingSourceType={ScreenSharingSource.SCREEN} - toaster={undefined} - /> - - ); - expect(subject).toMatchSnapshot(); -}); diff --git a/app/client/src/containers/ConnectionPrompts/__snapshots__/index.spec.tsx.snap b/app/client/src/containers/ConnectionPrompts/__snapshots__/index.spec.tsx.snap deleted file mode 100644 index d2354c4..0000000 --- a/app/client/src/containers/ConnectionPrompts/__snapshots__/index.spec.tsx.snap +++ /dev/null @@ -1,953 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`when getPromptContent is called should match exact snapshot on each step 1`] = ` -
-
-
-
-
-
-

- Deskreen Screen Viewer -

-
-
-
-
-

- My Device Info: -

-
-
- Device Type: -
- - -
-
- Device IP: -
-
-
-
-
- Device Browser: -
-
- Device OS: -
-
-
- These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running -
-
-
-
-
-

- Error occurred :( -

-
-
-
-
-
-
-
- Error occurred :( -
-
-
-`; - -exports[`when getPromptContent is called should match exact snapshot on each step 2`] = ` -
-
-
-
-
-
-

- Deskreen Screen Viewer -

-
-
-
-
-

- My Device Info: -

-
-
- Device Type: -
- - -
-
- Device IP: -
-
-
-
-
- Device Browser: -
-
- Device OS: -
-
-
- These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running -
-
-
-
-
-

- Waiting for user to click ALLOW button on screen sharing device... -

-
-
-
-
-
-
-
-
-
-
- - - - feed - - - - -
-
-
-
-
-`; - -exports[`when getPromptContent is called should match exact snapshot on each step 3`] = ` -
-
-
-
-
-
-

- Deskreen Screen Viewer -

-
-
-
-
-

- My Device Info: -

-
-
- Device Type: -
- - -
-
- Device IP: -
-
-
-
-
- Device Browser: -
-
- Device OS: -
-
-
- These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running -
-
-
-
-
-

- Connected! -

-
-
-
-
-
-
-
-
-
- - - - feed - - - - -
-
-
-
-
-`; - -exports[`when getPromptContent is called should match exact snapshot on each step 4`] = ` -
-
-
-
-
-
-

- Deskreen Screen Viewer -

-
-
-
-
-

- My Device Info: -

-
-
- Device Type: -
- - -
-
- Device IP: -
-
-
-
-
- Device Browser: -
-
- Device OS: -
-
-
- These details should match with the ones that you see in alert popup on computer screen, where Deskreen is running -
-
-
-
-
-

- Waiting for user to select source to share from screen sharing device... -

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - application - - - - -
-
-
-
-
-
-
-`; diff --git a/app/client/src/containers/ConnectionPrompts/index.spec.tsx b/app/client/src/containers/ConnectionPrompts/index.spec.tsx deleted file mode 100644 index e19b62f..0000000 --- a/app/client/src/containers/ConnectionPrompts/index.spec.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import ConnectionPrompts from '.'; - -jest.useFakeTimers(); - -const TEST_DEVICE_DETAILS = { - myIP: '', - myOS: '', - myDeviceType: '', - myBrowser: '', -}; -describe('when getPromptContent is called', () => { - it('should match exact snapshot on each step', () => { - for (let i = 0; i < 4; ++i) { - const subject = renderer.create( - <> - - - ); - expect(subject).toMatchSnapshot(); - } - }); -}); diff --git a/app/client/src/containers/MainView/__snapshots__/index.spec.tsx.snap b/app/client/src/containers/MainView/__snapshots__/index.spec.tsx.snap deleted file mode 100644 index 31df2f8..0000000 --- a/app/client/src/containers/MainView/__snapshots__/index.spec.tsx.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should match exact snapshot 1`] = `ShallowWrapper {}`; diff --git a/app/client/src/containers/MainView/index.spec.tsx b/app/client/src/containers/MainView/index.spec.tsx deleted file mode 100644 index 8b25b83..0000000 --- a/app/client/src/containers/MainView/index.spec.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React, { Suspense } from 'react'; - -import Enzyme, { shallow } from 'enzyme'; - -import Adapter from 'enzyme-adapter-react-16'; -import MainView from '.'; -import { I18nextProvider } from 'react-i18next'; - -import i18n from 'i18next'; -import { initReactI18next } from 'react-i18next'; - -// Mock react-i18next -i18n.use(initReactI18next).init({ - lng: 'en', - fallbackLng: 'en', - ns: ['common'], - defaultNS: 'common', - resources: { - en: { - common: {}, - }, - }, - debug: false, -}); - -Enzyme.configure({ adapter: new Adapter() }); -jest.useFakeTimers(); - -it('should match exact snapshot', () => { - const subject = shallow( - loading
}> - - - - - ); - expect(subject).toMatchSnapshot(); -}); diff --git a/app/client/src/containers/PlayerView/__snapshots__/index.spec.tsx.snap b/app/client/src/containers/PlayerView/__snapshots__/index.spec.tsx.snap deleted file mode 100644 index 718b71d..0000000 --- a/app/client/src/containers/PlayerView/__snapshots__/index.spec.tsx.snap +++ /dev/null @@ -1,451 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should match exact snapshot 1`] = ` -
-
-
-
- - - - - - - - - - -
-
-
-
-
- -
- - - - - - - - - -
- - - - - -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-`; diff --git a/app/client/src/containers/PlayerView/index.spec.tsx b/app/client/src/containers/PlayerView/index.spec.tsx deleted file mode 100644 index e546c01..0000000 --- a/app/client/src/containers/PlayerView/index.spec.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import PlayerView from '.'; -import ScreenSharingSource from '../../features/PeerConnection/ScreenSharingSourceEnum'; -import { VideoQuality } from '../../features/VideoAutoQualityOptimizer/VideoQualityEnum'; - -jest.useFakeTimers(); - -it('should match exact snapshot', () => { - const subject = renderer.create( - <> - {}} - isFullScreenOn={false} - setIsFullScreenOn={() => {}} - handlePlayPause={() => {}} - isPlaying={false} - setVideoQuality={() => {}} - videoQuality={VideoQuality.Q_100_PERCENT} - screenSharingSourceType={ScreenSharingSource.SCREEN} - streamUrl={undefined} - /> - - ); - expect(subject).toMatchSnapshot(); -}); diff --git a/app/client/src/providers/AppContextProvider/__snapshots__/index.spec.tsx.snap b/app/client/src/providers/AppContextProvider/__snapshots__/index.spec.tsx.snap deleted file mode 100644 index cbdccae..0000000 --- a/app/client/src/providers/AppContextProvider/__snapshots__/index.spec.tsx.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should match exact snapshot 1`] = `null`; diff --git a/app/client/src/providers/AppContextProvider/index.spec.tsx b/app/client/src/providers/AppContextProvider/index.spec.tsx deleted file mode 100644 index fcc3cd7..0000000 --- a/app/client/src/providers/AppContextProvider/index.spec.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import { AppContextProvider } from '.'; - -jest.useFakeTimers(); - -it('should match exact snapshot', () => { - const subject = renderer.create( - <> - - - ); - expect(subject).toMatchSnapshot(); -}); diff --git a/app/components/AllowConnectionForDeviceAlert.spec.tsx b/app/components/AllowConnectionForDeviceAlert.spec.tsx deleted file mode 100644 index 4998671..0000000 --- a/app/components/AllowConnectionForDeviceAlert.spec.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import Enzyme, { mount } from 'enzyme'; -import EnzymeToJson from 'enzyme-to-json'; -import Adapter from 'enzyme-adapter-react-16'; -import { BrowserRouter as Router } from 'react-router-dom'; -import AllowConnectionForDeviceAlert from './AllowConnectionForDeviceAlert'; - -Enzyme.configure({ adapter: new Adapter() }); -jest.useFakeTimers(); - -it('should match exact snapshot', () => { - const subject = mount( - <> - - {}} - onConfirm={() => {}} - /> - - - ); - expect(EnzymeToJson(subject)).toMatchSnapshot(); -}); diff --git a/app/components/ConnectedDevicesListDrawer.spec.tsx b/app/components/ConnectedDevicesListDrawer.spec.tsx deleted file mode 100644 index 55da37b..0000000 --- a/app/components/ConnectedDevicesListDrawer.spec.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import Enzyme, { mount } from 'enzyme'; -import EnzymeToJson from 'enzyme-to-json'; -import Adapter from 'enzyme-adapter-react-16'; -import { BrowserRouter as Router } from 'react-router-dom'; -import ConnectedDevicesListDrawer from './ConnectedDevicesListDrawer'; - -Enzyme.configure({ adapter: new Adapter() }); -jest.useFakeTimers(); - -jest.mock('electron', () => { - return { - remote: { - getGlobal: (globalName: string) => { - if (globalName === 'connectedDevicesService') { - return { - getDevices: () => [], - }; - } - return {}; - }, - }, - }; -}); - -it('should match exact snapshot', () => { - const subject = mount( - <> - - {}} - stepperRef={null} - /> - - - ); - expect(EnzymeToJson(subject)).toMatchSnapshot(); -}); diff --git a/app/components/SettingsOverlay/SettingsOverlay.spec.tsx b/app/components/SettingsOverlay/SettingsOverlay.spec.tsx deleted file mode 100644 index 0048e80..0000000 --- a/app/components/SettingsOverlay/SettingsOverlay.spec.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React, { Suspense } from 'react'; -import Enzyme, { mount } from 'enzyme'; -import EnzymeToJson from 'enzyme-to-json'; -import Adapter from 'enzyme-adapter-react-16'; -import { BrowserRouter as Router } from 'react-router-dom'; -import SettingsOverlay from './SettingsOverlay'; -import { SettingsProvider } from '../../containers/SettingsProvider'; - -Enzyme.configure({ adapter: new Adapter() }); -jest.useFakeTimers(); - -it('should match exact snapshot', () => { - const subject = mount( - <> - Loading...
}> - - - {}} /> - - - - - ); - expect(EnzymeToJson(subject)).toMatchSnapshot(); -}); diff --git a/app/components/SettingsOverlay/__snapshots__/SettingsOverlay.spec.tsx.snap b/app/components/SettingsOverlay/__snapshots__/SettingsOverlay.spec.tsx.snap deleted file mode 100644 index b7fd4a7..0000000 --- a/app/components/SettingsOverlay/__snapshots__/SettingsOverlay.spec.tsx.snap +++ /dev/null @@ -1,2056 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should match exact snapshot 1`] = ` - - Loading... -
- } -> - - - - - - -
-
-
-
-
- -
-
-
-
-
- - - } - > - -
-
-
-
- -
-
-
-
-
- - } - > - -
- - -
- - - - -
- - -
- - - - - - -
-
-
-
-
- } - parentId="TabsExample" - selected={true} - title="" - > -