From 97edc7aec6f942f4a76cf2214bf0f648d799f85b Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Thu, 31 Oct 2019 15:39:57 -0700 Subject: [PATCH] test(js): remove snapshots (#15705) * test(js): remove snapshots * test: disallow snapshots and only * fix: stray variable --- ui/.eslintrc.js | 5 +- ui/package.json | 2 +- .../components/ViewTokenOverlay.test.tsx | 1 - .../ViewTokenOverlay.test.tsx.snap | 281 ------------------ .../components/SaveAsButton.test.tsx | 1 - .../__snapshots__/SaveAsButton.test.tsx.snap | 3 - .../configure/PluginsSideBar.test.tsx | 1 - .../PluginsSideBar.test.tsx.snap | 25 -- .../configure/LineProtocol.test.tsx | 2 - .../configure/LineProtocolTabs.test.tsx | 2 - .../__snapshots__/LineProtocol.test.tsx.snap | 59 ---- .../LineProtocolTabs.test.tsx.snap | 42 --- .../verify/StatusIndicator.test.tsx | 2 - .../StatusIndicator.test.tsx.snap | 25 -- .../components/side_bar/SideBar.test.tsx | 17 +- .../side_bar/SideBarButton.test.tsx | 1 - .../components/side_bar/SideBarTab.test.tsx | 14 +- .../__snapshots__/SideBar.test.tsx.snap | 76 ----- .../__snapshots__/SideBarButton.test.tsx.snap | 12 - .../__snapshots__/SideBarTab.test.tsx.snap | 13 - .../verifyStep/ConnectionInformation.test.tsx | 24 -- .../verifyStep/TelegrafInstructions.test.tsx | 7 - .../ConnectionInformation.test.tsx.snap | 53 ---- .../TelegrafInstructions.test.tsx.snap | 44 --- .../__snapshots__/pluginConfigs.test.ts.snap | 3 - .../dataLoaders/utils/pluginConfigs.test.ts | 3 +- .../me/components/account/Settings.test.tsx | 1 - .../__snapshots__/Settings.test.tsx.snap | 212 ------------- ui/src/members/components/Members.test.tsx | 1 - .../__snapshots__/Members.test.tsx.snap | 65 ---- .../onboarding/components/AdminStep.test.tsx | 1 - .../components/CompletionStep.test.tsx | 1 - .../__snapshots__/AdminStep.test.tsx.snap | 153 ---------- .../CompletionStep.test.tsx.snap | 117 -------- ui/src/scrapers/components/Scrapers.test.tsx | 1 - .../__snapshots__/Scrapers.test.tsx.snap | 63 ---- ui/src/shared/components/VersionInfo.test.tsx | 2 - .../__snapshots__/VersionInfo.test.tsx.snap | 30 -- ui/src/tasks/components/TaskForm.test.tsx | 1 - ui/src/tasks/components/TasksList.test.tsx | 1 - .../__snapshots__/TaskForm.test.tsx.snap | 64 ---- .../__snapshots__/TasksList.test.tsx.snap | 103 ------- .../telegrafs/components/Collectors.test.tsx | 1 - .../__snapshots__/Collectors.test.tsx.snap | 52 ---- .../components/VariableForm.test.tsx | 2 +- .../variables/components/Variables.test.tsx | 1 - .../__snapshots__/VariableForm.test.tsx.snap | 191 ------------ .../__snapshots__/Variables.test.tsx.snap | 42 --- ui/yarn.lock | 51 +--- 49 files changed, 34 insertions(+), 1840 deletions(-) delete mode 100644 ui/src/authorizations/components/__snapshots__/ViewTokenOverlay.test.tsx.snap delete mode 100644 ui/src/dataExplorer/components/__snapshots__/SaveAsButton.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/collectorsWizard/configure/__snapshots__/PluginsSideBar.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocol.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocolTabs.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/lineProtocolWizard/verify/__snapshots__/StatusIndicator.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/side_bar/__snapshots__/SideBar.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/side_bar/__snapshots__/SideBarButton.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/side_bar/__snapshots__/SideBarTab.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/verifyStep/__snapshots__/ConnectionInformation.test.tsx.snap delete mode 100644 ui/src/dataLoaders/components/verifyStep/__snapshots__/TelegrafInstructions.test.tsx.snap delete mode 100644 ui/src/dataLoaders/utils/__snapshots__/pluginConfigs.test.ts.snap delete mode 100644 ui/src/me/components/account/__snapshots__/Settings.test.tsx.snap delete mode 100644 ui/src/members/components/__snapshots__/Members.test.tsx.snap delete mode 100644 ui/src/onboarding/components/__snapshots__/AdminStep.test.tsx.snap delete mode 100644 ui/src/onboarding/components/__snapshots__/CompletionStep.test.tsx.snap delete mode 100644 ui/src/scrapers/components/__snapshots__/Scrapers.test.tsx.snap delete mode 100644 ui/src/shared/components/__snapshots__/VersionInfo.test.tsx.snap delete mode 100644 ui/src/tasks/components/__snapshots__/TaskForm.test.tsx.snap delete mode 100644 ui/src/tasks/components/__snapshots__/TasksList.test.tsx.snap delete mode 100644 ui/src/telegrafs/components/__snapshots__/Collectors.test.tsx.snap delete mode 100644 ui/src/variables/components/__snapshots__/VariableForm.test.tsx.snap delete mode 100644 ui/src/variables/components/__snapshots__/Variables.test.tsx.snap diff --git a/ui/.eslintrc.js b/ui/.eslintrc.js index 8651e44ae4..a0335b4084 100644 --- a/ui/.eslintrc.js +++ b/ui/.eslintrc.js @@ -7,7 +7,7 @@ module.exports = { jsx: true, }, }, - plugins: ['@typescript-eslint', 'react', 'no-only-tests'], + plugins: ['@typescript-eslint', 'react', 'jest'], env: { browser: true, es6: true, @@ -33,7 +33,6 @@ module.exports = { 'getter-return': 'off', 'no-extra-boolean-cast': 'off', 'no-case-declarations': 'off', - 'no-only-tests/no-only-tests': 'error', 'no-useless-escape': 'off', 'no-undef': 'off', 'no-fallthrough': 'off', @@ -67,5 +66,7 @@ module.exports = { 'react/no-unescaped-entities': 'off', 'react/prop-types': 'off', 'react/no-find-dom-node': 'off', + 'jest/no-large-snapshots': ['error', {maxSize: 0}], // no shapshots please + 'jest/no-focused-tests': ['error'], }, } diff --git a/ui/package.json b/ui/package.json index fb3291c02c..38f6c97512 100644 --- a/ui/package.json +++ b/ui/package.json @@ -91,7 +91,7 @@ "enzyme-to-json": "^3.3.4", "eslint": "^6.6.0", "eslint-config-prettier": "^6.5.0", - "eslint-plugin-no-only-tests": "^2.3.1", + "eslint-plugin-jest": "^23.0.2", "eslint-plugin-react": "^7.16.0", "express": "^4.14.0", "file-loader": "^4.1.0", diff --git a/ui/src/authorizations/components/ViewTokenOverlay.test.tsx b/ui/src/authorizations/components/ViewTokenOverlay.test.tsx index 36db2fcf41..1f1652cf85 100644 --- a/ui/src/authorizations/components/ViewTokenOverlay.test.tsx +++ b/ui/src/authorizations/components/ViewTokenOverlay.test.tsx @@ -24,7 +24,6 @@ describe('Account', () => { const wrapper = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) diff --git a/ui/src/authorizations/components/__snapshots__/ViewTokenOverlay.test.tsx.snap b/ui/src/authorizations/components/__snapshots__/ViewTokenOverlay.test.tsx.snap deleted file mode 100644 index 83d370678e..0000000000 --- a/ui/src/authorizations/components/__snapshots__/ViewTokenOverlay.test.tsx.snap +++ /dev/null @@ -1,281 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Account rendering renders! 1`] = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; diff --git a/ui/src/dataExplorer/components/SaveAsButton.test.tsx b/ui/src/dataExplorer/components/SaveAsButton.test.tsx index dec9efe34c..cfe1a2e104 100644 --- a/ui/src/dataExplorer/components/SaveAsButton.test.tsx +++ b/ui/src/dataExplorer/components/SaveAsButton.test.tsx @@ -16,7 +16,6 @@ describe('SaveAsButton', () => { describe('rendering', () => { it('renders', () => { expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/dataExplorer/components/__snapshots__/SaveAsButton.test.tsx.snap b/ui/src/dataExplorer/components/__snapshots__/SaveAsButton.test.tsx.snap deleted file mode 100644 index b36ea7a381..0000000000 --- a/ui/src/dataExplorer/components/__snapshots__/SaveAsButton.test.tsx.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`SaveAsButton rendering renders 1`] = ``; diff --git a/ui/src/dataLoaders/components/collectorsWizard/configure/PluginsSideBar.test.tsx b/ui/src/dataLoaders/components/collectorsWizard/configure/PluginsSideBar.test.tsx index dca7b8964e..685955ed13 100644 --- a/ui/src/dataLoaders/components/collectorsWizard/configure/PluginsSideBar.test.tsx +++ b/ui/src/dataLoaders/components/collectorsWizard/configure/PluginsSideBar.test.tsx @@ -33,7 +33,6 @@ describe('PluginsSideBar', () => { }) expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) diff --git a/ui/src/dataLoaders/components/collectorsWizard/configure/__snapshots__/PluginsSideBar.test.tsx.snap b/ui/src/dataLoaders/components/collectorsWizard/configure/__snapshots__/PluginsSideBar.test.tsx.snap deleted file mode 100644 index 7822ceb49e..0000000000 --- a/ui/src/dataLoaders/components/collectorsWizard/configure/__snapshots__/PluginsSideBar.test.tsx.snap +++ /dev/null @@ -1,25 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`PluginsSideBar rendering renders! wee! 1`] = ` - - - - -`; diff --git a/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocol.test.tsx b/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocol.test.tsx index 644830b097..a5962bce30 100644 --- a/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocol.test.tsx +++ b/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocol.test.tsx @@ -32,8 +32,6 @@ describe('LineProtocol', () => { it('renders!', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocolTabs.test.tsx b/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocolTabs.test.tsx index 27f0cc877f..d2dbbac41f 100644 --- a/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocolTabs.test.tsx +++ b/ui/src/dataLoaders/components/lineProtocolWizard/configure/LineProtocolTabs.test.tsx @@ -29,8 +29,6 @@ describe('LineProtocolTabs', () => { it('renders!', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocol.test.tsx.snap b/ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocol.test.tsx.snap deleted file mode 100644 index e630409836..0000000000 --- a/ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocol.test.tsx.snap +++ /dev/null @@ -1,59 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`LineProtocol rendering renders! 1`] = ` -
-
- -
-

- Add Data via Line Protocol -

-
- Need help writing InfluxDB Line Protocol? - - - See Documentation - -
- -
-
- - -
-`; diff --git a/ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocolTabs.test.tsx.snap b/ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocolTabs.test.tsx.snap deleted file mode 100644 index 90e1b29dbb..0000000000 --- a/ui/src/dataLoaders/components/lineProtocolWizard/configure/__snapshots__/LineProtocolTabs.test.tsx.snap +++ /dev/null @@ -1,42 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`LineProtocolTabs rendering renders! 1`] = ` -
- - - - -
-
- - -
-
-
-
-
-
-`; diff --git a/ui/src/dataLoaders/components/lineProtocolWizard/verify/StatusIndicator.test.tsx b/ui/src/dataLoaders/components/lineProtocolWizard/verify/StatusIndicator.test.tsx index 382749404e..324019881a 100644 --- a/ui/src/dataLoaders/components/lineProtocolWizard/verify/StatusIndicator.test.tsx +++ b/ui/src/dataLoaders/components/lineProtocolWizard/verify/StatusIndicator.test.tsx @@ -24,8 +24,6 @@ describe('StatusIndicator', () => { it('renders!', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/dataLoaders/components/lineProtocolWizard/verify/__snapshots__/StatusIndicator.test.tsx.snap b/ui/src/dataLoaders/components/lineProtocolWizard/verify/__snapshots__/StatusIndicator.test.tsx.snap deleted file mode 100644 index fbb5cb40d7..0000000000 --- a/ui/src/dataLoaders/components/lineProtocolWizard/verify/__snapshots__/StatusIndicator.test.tsx.snap +++ /dev/null @@ -1,25 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`StatusIndicator rendering renders! 1`] = ` - -
-
- -
-
-
-
-
-
- -`; diff --git a/ui/src/dataLoaders/components/side_bar/SideBar.test.tsx b/ui/src/dataLoaders/components/side_bar/SideBar.test.tsx index 835c3f482e..e2fc1096f4 100644 --- a/ui/src/dataLoaders/components/side_bar/SideBar.test.tsx +++ b/ui/src/dataLoaders/components/side_bar/SideBar.test.tsx @@ -46,14 +46,13 @@ describe('SideBar', () => { it('renders with no children', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() - }), - it('renders with children, and renders its children', () => { - const {wrapper} = setup(null, childrenArray) - expect(wrapper.exists()).toBe(true) - expect(wrapper.contains(childrenArray[0])).toBe(true) - expect(wrapper.find(SideBar.Tab)).toHaveLength(2) - expect(wrapper).toMatchSnapshot() - }) + }) + + it('renders with children, and renders its children', () => { + const {wrapper} = setup(null, childrenArray) + expect(wrapper.exists()).toBe(true) + expect(wrapper.contains(childrenArray[0])).toBe(true) + expect(wrapper.find(SideBar.Tab)).toHaveLength(2) + }) }) }) diff --git a/ui/src/dataLoaders/components/side_bar/SideBarButton.test.tsx b/ui/src/dataLoaders/components/side_bar/SideBarButton.test.tsx index 5f529cb766..e1b2f93786 100644 --- a/ui/src/dataLoaders/components/side_bar/SideBarButton.test.tsx +++ b/ui/src/dataLoaders/components/side_bar/SideBarButton.test.tsx @@ -28,7 +28,6 @@ describe('SideBarButton', () => { it('renders! wee!', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/dataLoaders/components/side_bar/SideBarTab.test.tsx b/ui/src/dataLoaders/components/side_bar/SideBarTab.test.tsx index 0658287556..eb864cd15e 100644 --- a/ui/src/dataLoaders/components/side_bar/SideBarTab.test.tsx +++ b/ui/src/dataLoaders/components/side_bar/SideBarTab.test.tsx @@ -34,12 +34,12 @@ describe('SideBarTab', () => { it('renders! wee!', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() - }), - it('renders a checkmark if status success', () => { - const {wrapper} = setup({status: TabStatus.Success}) - expect(wrapper.exists()).toBe(true) - expect(wrapper.find(`.${IconFont.Checkmark}`)).toHaveLength(1) - }) + }) + + it('renders a checkmark if status success', () => { + const {wrapper} = setup({status: TabStatus.Success}) + expect(wrapper.exists()).toBe(true) + expect(wrapper.find(`.${IconFont.Checkmark}`)).toHaveLength(1) + }) }) }) diff --git a/ui/src/dataLoaders/components/side_bar/__snapshots__/SideBar.test.tsx.snap b/ui/src/dataLoaders/components/side_bar/__snapshots__/SideBar.test.tsx.snap deleted file mode 100644 index a09bdb69fa..0000000000 --- a/ui/src/dataLoaders/components/side_bar/__snapshots__/SideBar.test.tsx.snap +++ /dev/null @@ -1,76 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`SideBar rendering renders with children, and renders its children 1`] = ` -
-
-

- titleString -

- -
- - -
-
-
-
-`; - -exports[`SideBar rendering renders with no children 1`] = ` -
-
-

- titleString -

- -
- -
-
-`; diff --git a/ui/src/dataLoaders/components/side_bar/__snapshots__/SideBarButton.test.tsx.snap b/ui/src/dataLoaders/components/side_bar/__snapshots__/SideBarButton.test.tsx.snap deleted file mode 100644 index cf09c1f9f2..0000000000 --- a/ui/src/dataLoaders/components/side_bar/__snapshots__/SideBarButton.test.tsx.snap +++ /dev/null @@ -1,12 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`SideBarButton rendering renders! wee! 1`] = ` - - - -
- - -
- - -
-
- - - -
- - - - -
- -
-
-
- - -
- -
- - - - -
- -
- - - - - - - - - - -`; diff --git a/ui/src/members/components/Members.test.tsx b/ui/src/members/components/Members.test.tsx index b7315cd57c..49b8b74b23 100644 --- a/ui/src/members/components/Members.test.tsx +++ b/ui/src/members/components/Members.test.tsx @@ -25,7 +25,6 @@ describe('MemberList', () => { it('renders', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/members/components/__snapshots__/Members.test.tsx.snap b/ui/src/members/components/__snapshots__/Members.test.tsx.snap deleted file mode 100644 index 05bf0167a6..0000000000 --- a/ui/src/members/components/__snapshots__/Members.test.tsx.snap +++ /dev/null @@ -1,65 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`MemberList rendering renders 1`] = ` - - - - - - } - > - - - - - -`; diff --git a/ui/src/onboarding/components/AdminStep.test.tsx b/ui/src/onboarding/components/AdminStep.test.tsx index c4c1ba7bf3..6f92de4bfd 100644 --- a/ui/src/onboarding/components/AdminStep.test.tsx +++ b/ui/src/onboarding/components/AdminStep.test.tsx @@ -23,6 +23,5 @@ describe('Onboarding.Components.AdminStep', () => { const wrapper = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) diff --git a/ui/src/onboarding/components/CompletionStep.test.tsx b/ui/src/onboarding/components/CompletionStep.test.tsx index 6451525a82..57039512fd 100644 --- a/ui/src/onboarding/components/CompletionStep.test.tsx +++ b/ui/src/onboarding/components/CompletionStep.test.tsx @@ -24,6 +24,5 @@ describe('Onboarding.Components.CompletionStep', () => { const wrapper = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) diff --git a/ui/src/onboarding/components/__snapshots__/AdminStep.test.tsx.snap b/ui/src/onboarding/components/__snapshots__/AdminStep.test.tsx.snap deleted file mode 100644 index b1a0925bd8..0000000000 --- a/ui/src/onboarding/components/__snapshots__/AdminStep.test.tsx.snap +++ /dev/null @@ -1,153 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Onboarding.Components.AdminStep renders 1`] = ` -
-
-
-
-

- Setup Initial User -

-
- You will be able to create additional Users, Buckets and Organizations later -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-`; diff --git a/ui/src/onboarding/components/__snapshots__/CompletionStep.test.tsx.snap b/ui/src/onboarding/components/__snapshots__/CompletionStep.test.tsx.snap deleted file mode 100644 index ef1f22c178..0000000000 --- a/ui/src/onboarding/components/__snapshots__/CompletionStep.test.tsx.snap +++ /dev/null @@ -1,117 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Onboarding.Components.CompletionStep renders 1`] = ` -
-
- -
-

- You are ready to go! -

-
- Your InfluxDB 2.0 has 1 organization, 1 user, and 1 bucket. -
-
-

- Let’s start collecting data! -

-
- - - -
- - - -
- Timing is everything! -
-
- This will set up local metric collection and allow you to explore the features of InfluxDB 2.0 quickly. -
-
-
- -
- - - -
- Whoa looks like you’re an expert! -
-
- This allows you to set up Telegraf, scrapers, and much more. -
-
-
- -
-
-
-
-
-
-
-
- -
-
-`; diff --git a/ui/src/scrapers/components/Scrapers.test.tsx b/ui/src/scrapers/components/Scrapers.test.tsx index c073abfec0..d33308f5f0 100644 --- a/ui/src/scrapers/components/Scrapers.test.tsx +++ b/ui/src/scrapers/components/Scrapers.test.tsx @@ -27,7 +27,6 @@ describe('ScraperList', () => { it('renders', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/scrapers/components/__snapshots__/Scrapers.test.tsx.snap b/ui/src/scrapers/components/__snapshots__/Scrapers.test.tsx.snap deleted file mode 100644 index 7c192239bb..0000000000 --- a/ui/src/scrapers/components/__snapshots__/Scrapers.test.tsx.snap +++ /dev/null @@ -1,63 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ScraperList rendering renders 1`] = ` - - - - - - - - } - > - - - - - -`; diff --git a/ui/src/shared/components/VersionInfo.test.tsx b/ui/src/shared/components/VersionInfo.test.tsx index 89a6f23c86..f5d99c8e1a 100644 --- a/ui/src/shared/components/VersionInfo.test.tsx +++ b/ui/src/shared/components/VersionInfo.test.tsx @@ -20,7 +20,6 @@ describe('VersionInfo', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) describe('when width is specified', () => { @@ -28,7 +27,6 @@ describe('VersionInfo', () => { const {wrapper} = setup({widthPixels: 300}) expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/shared/components/__snapshots__/VersionInfo.test.tsx.snap b/ui/src/shared/components/__snapshots__/VersionInfo.test.tsx.snap deleted file mode 100644 index 32814915bd..0000000000 --- a/ui/src/shared/components/__snapshots__/VersionInfo.test.tsx.snap +++ /dev/null @@ -1,30 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`VersionInfo renders correctly 1`] = ` -
-

- Version - 2.0.0 - -

-
-`; - -exports[`VersionInfo when width is specified renders corectly 1`] = ` -
-

- Version - 2.0.0 - -

-
-`; diff --git a/ui/src/tasks/components/TaskForm.test.tsx b/ui/src/tasks/components/TaskForm.test.tsx index 2d85a2ab7e..d6f1c0d227 100644 --- a/ui/src/tasks/components/TaskForm.test.tsx +++ b/ui/src/tasks/components/TaskForm.test.tsx @@ -35,7 +35,6 @@ describe('TaskForm', () => { expect(wrapper.exists()).toBe(true) expect(form.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/tasks/components/TasksList.test.tsx b/ui/src/tasks/components/TasksList.test.tsx index 47bf24e156..246760ca66 100644 --- a/ui/src/tasks/components/TasksList.test.tsx +++ b/ui/src/tasks/components/TasksList.test.tsx @@ -43,7 +43,6 @@ describe('TasksList', () => { it('renders', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/tasks/components/__snapshots__/TaskForm.test.tsx.snap b/ui/src/tasks/components/__snapshots__/TaskForm.test.tsx.snap deleted file mode 100644 index 27a466682f..0000000000 --- a/ui/src/tasks/components/__snapshots__/TaskForm.test.tsx.snap +++ /dev/null @@ -1,64 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TaskForm rendering renders 1`] = ` -
- - - - - - - - - - - - - Every - - - Cron - - - - - - - - -
-`; diff --git a/ui/src/tasks/components/__snapshots__/TasksList.test.tsx.snap b/ui/src/tasks/components/__snapshots__/TasksList.test.tsx.snap deleted file mode 100644 index cf1b66d5ec..0000000000 --- a/ui/src/tasks/components/__snapshots__/TasksList.test.tsx.snap +++ /dev/null @@ -1,103 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TasksList rendering renders 1`] = ` - - - - - - - - - - } - > - range(start: -1h)", - "id": "02ef9deff2141000", - "labels": Array [], - "name": "pasdlak", - "org": "default", - "orgID": "02ee9e2a29d73000", - "status": "active", - } - } - /> - range(start: -task.every)", - "id": "02f12c50dba72000", - "labels": Array [ - Object { - "id": "0001", - "name": "Trogdor", - "properties": Object { - "color": "#44ffcc", - "description": "Burninating the countryside", - }, - }, - Object { - "id": "0002", - "name": "Strawberry", - "properties": Object { - "color": "#ff0054", - "description": "It is a great fruit", - }, - }, - ], - "name": "somename", - "org": "default", - "orgID": "02ee9e2a29d73000", - "status": "active", - } - } - /> - - - -`; diff --git a/ui/src/telegrafs/components/Collectors.test.tsx b/ui/src/telegrafs/components/Collectors.test.tsx index 59f3851c78..294a8c5cd0 100644 --- a/ui/src/telegrafs/components/Collectors.test.tsx +++ b/ui/src/telegrafs/components/Collectors.test.tsx @@ -29,7 +29,6 @@ describe('CollectorList', () => { it('renders', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/telegrafs/components/__snapshots__/Collectors.test.tsx.snap b/ui/src/telegrafs/components/__snapshots__/Collectors.test.tsx.snap deleted file mode 100644 index e6d97f3ba2..0000000000 --- a/ui/src/telegrafs/components/__snapshots__/Collectors.test.tsx.snap +++ /dev/null @@ -1,52 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`CollectorList rendering renders 1`] = ` - - - - - - - } - > - - - - - -`; diff --git a/ui/src/variables/components/VariableForm.test.tsx b/ui/src/variables/components/VariableForm.test.tsx index e296119067..5bf8f5967c 100644 --- a/ui/src/variables/components/VariableForm.test.tsx +++ b/ui/src/variables/components/VariableForm.test.tsx @@ -59,7 +59,7 @@ describe('Variables.Components.VariableForm', () => { const {getByTestId} = wrapper const root = getByTestId('variable-form--root') - expect(root).toMatchSnapshot() + expect(root).toBeTruthy() }) }) diff --git a/ui/src/variables/components/Variables.test.tsx b/ui/src/variables/components/Variables.test.tsx index a0d32b4322..4bae858d29 100644 --- a/ui/src/variables/components/Variables.test.tsx +++ b/ui/src/variables/components/Variables.test.tsx @@ -26,7 +26,6 @@ describe('VariableList', () => { it('renders', () => { const {wrapper} = setup() expect(wrapper.exists()).toBe(true) - expect(wrapper).toMatchSnapshot() }) }) }) diff --git a/ui/src/variables/components/__snapshots__/VariableForm.test.tsx.snap b/ui/src/variables/components/__snapshots__/VariableForm.test.tsx.snap deleted file mode 100644 index 44ad15973c..0000000000 --- a/ui/src/variables/components/__snapshots__/VariableForm.test.tsx.snap +++ /dev/null @@ -1,191 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Variables.Components.VariableForm rendering renders 1`] = ` -
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
- -`; diff --git a/ui/src/variables/components/__snapshots__/Variables.test.tsx.snap b/ui/src/variables/components/__snapshots__/Variables.test.tsx.snap deleted file mode 100644 index aeda3ceb28..0000000000 --- a/ui/src/variables/components/__snapshots__/Variables.test.tsx.snap +++ /dev/null @@ -1,42 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`VariableList rendering renders 1`] = ` - - - - - - - } - > - - - - -`; diff --git a/ui/yarn.lock b/ui/yarn.lock index 12cc1add7c..ba266f5839 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -908,13 +908,6 @@ dependencies: regenerator-runtime "^0.12.0" -"@babel/runtime@^7.3.1": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.3.tgz#935122c74c73d2240cafd32ddb5fc2a6cd35cf1f" - integrity sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA== - dependencies: - regenerator-runtime "^0.13.2" - "@babel/template@^7.1.0", "@babel/template@^7.2.2", "@babel/template@^7.4.0", "@babel/template@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" @@ -1011,14 +1004,10 @@ debug "^3.1.0" lodash.once "^4.1.1" -"@influxdata/clockface@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@influxdata/clockface/-/clockface-1.0.3.tgz#a24e5476f9d31c005bf1c2924220723e77e4c597" - integrity sha512-LxCUZ/1E7CZSLFxK/qO/L0m6T6GTCzEO9DoMgLAfGE4vdFpjxs7yMQNkfWxFYpXAUv+DBp/OFPKTqLtaB5bK0w== - dependencies: - "@types/d3-ease" "^1.0.8" - d3-ease "^1.0.5" - react-spring "^8.0.27" +"@influxdata/clockface@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@influxdata/clockface/-/clockface-1.0.4.tgz#ec454ba11c9006a5248d716853d8d27dcc4789e8" + integrity sha512-V0RVLVlKenVSHrTaAfijqcipbSMyQ+7AYsx82Q889K+SDdjnu8W8wpWJIERjJFzJiAWBCjfJoY//r2PfmUB/Cw== "@influxdata/flux-parser@^0.3.0": version "0.3.0" @@ -1279,11 +1268,6 @@ resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-1.2.1.tgz#26141c3c554e320edd40726b793570a3ae57397e" integrity sha512-xwb1tqvYNWllbHuhMFhiXk63Imf+QNq/dJdmbXmr2wQVnwGenCuj3/0IWJ9hdIFQIqzvhT7T37cvx93jtAsDbQ== -"@types/d3-ease@^1.0.8": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@types/d3-ease/-/d3-ease-1.0.9.tgz#1dd849bd7edef6426e915e220ed9970db5ea4e04" - integrity sha512-U5ADevQ+W6fy32FVZZC9EXallcV/Mi12A5Tkd0My5MrC7T8soMQEhlDAg88XUWm0zoCQlB4XV0en/24LvuDB4Q== - "@types/d3-scale@^2.0.1": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.0.2.tgz#61145948aa1a52ab31384766cd013308699112b3" @@ -1550,7 +1534,7 @@ regexpp "^2.0.1" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.6.0": +"@typescript-eslint/experimental-utils@2.6.0", "@typescript-eslint/experimental-utils@^2.5.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.0.tgz#ed70bef72822bff54031ff0615fc888b9e2b6e8a" integrity sha512-34BAFpNOwHXeqT+AvdalLxOvcPYnCxA5JGmBAFL64RGMdP0u65rXjii7l/nwpgk5aLEE1LaqF+SsCU0/Cb64xA== @@ -3733,11 +3717,6 @@ d3-color@1: resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.2.3.tgz#6c67bb2af6df3cc8d79efcc4d3a3e83e28c8048f" integrity sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw== -d3-ease@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.5.tgz#8ce59276d81241b1b72042d6af2d40e76d936ffb" - integrity sha512-Ct1O//ly5y5lFM9YTdu+ygq7LleSgSE4oj7vUt9tPLHUi8VCV7QoizGpdWRWAwCO9LdYzIrQDg97+hGVdsSGPQ== - d3-format@1, d3-format@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.3.2.tgz#6a96b5e31bcb98122a30863f7d92365c00603562" @@ -4395,6 +4374,13 @@ eslint-config-prettier@^6.5.0: dependencies: get-stdin "^6.0.0" +eslint-plugin-jest@^23.0.2: + version "23.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.0.2.tgz#54a59bfe77245186afe13711a297067aefefff0a" + integrity sha512-fkxcvOJm0hC/jbJqYJjtuC9mvpTJqXd0Nixx7joVQvJoBQuXk/ws3+MtRYzD/4TcKSgvr21uuSLdwSxKJKC2cg== + dependencies: + "@typescript-eslint/experimental-utils" "^2.5.0" + eslint-plugin-no-only-tests@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.3.1.tgz#7b24a4df55b818d0838410aa96b24a5a4a072262" @@ -9511,14 +9497,6 @@ react-scrollbars-custom@^4.0.0-alpha.8: cnbuilder "^1.0.8" react-draggable "^3.2.1" -react-spring@^8.0.27: - version "8.0.27" - resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-8.0.27.tgz#97d4dee677f41e0b2adcb696f3839680a3aa356a" - integrity sha512-nDpWBe3ZVezukNRandTeLSPcwwTMjNVu1IDq9qA/AMiUqHuRN4BeSWvKr3eIxxg1vtiYiOLy4FqdfCP5IoP77g== - dependencies: - "@babel/runtime" "^7.3.1" - prop-types "^15.5.8" - react-test-renderer@^16.0.0-0: version "16.5.2" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.5.2.tgz#92e9d2c6f763b9821b2e0b22f994ee675068b5ae" @@ -9695,11 +9673,6 @@ regenerator-runtime@^0.12.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== -regenerator-runtime@^0.13.2: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" - integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== - regenerator-transform@^0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb"