Tests: removes jest duplicate manual mock warning (#107459)

* Tests: removes jest duplicate manual mock warning

* Trigger build

* Trigger build
pull/107293/head^2
Hugo Häggmark 3 weeks ago committed by GitHub
parent 8760d280f7
commit bfd33467fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 247
      .betterer.results
  2. 2
      packages/grafana-prometheus/src/components/metrics-browser/MetricsBrowserContext.test.tsx
  3. 2
      packages/grafana-prometheus/src/components/metrics-browser/useMetricsLabelsValues.test.ts
  4. 2
      packages/grafana-prometheus/src/components/monaco-query-field/monaco-completion-provider/completions.test.ts
  5. 2
      packages/grafana-prometheus/src/configuration/AlertingSettingsOverhaul.test.tsx
  6. 2
      packages/grafana-prometheus/src/configuration/PromSettings.test.tsx
  7. 2
      packages/grafana-prometheus/src/datasource.test.ts
  8. 2
      packages/grafana-prometheus/src/querybuilder/components/MetricCombobox.test.tsx
  9. 2
      packages/grafana-prometheus/src/querybuilder/components/metrics-modal/MetricsModal.test.tsx
  10. 2
      packages/grafana-prometheus/src/querybuilder/shared/OperationList.test.tsx
  11. 0
      packages/grafana-prometheus/src/test/mocks/datasource.ts
  12. 2
      public/app/core/components/ForgottenPassword/ChangePasswordPage.test.tsx
  13. 2
      public/app/core/components/Signup/SignupPage.test.tsx
  14. 0
      public/app/core/navigation/mocks/routeProps.ts
  15. 2
      public/app/core/services/FetchQueue.test.ts
  16. 2
      public/app/core/services/ResponseQueue.test.ts
  17. 0
      public/app/core/services/mocks/search_srv.ts
  18. 0
      public/app/core/services/mocks/subscribeTester.ts
  19. 2
      public/app/core/utils/shortLinks.test.ts
  20. 2
      public/app/features/admin/Users/OrgUsersTable.test.tsx
  21. 2
      public/app/features/alerting/unified/Receivers.test.tsx
  22. 4
      public/app/features/alerting/unified/Settings.test.tsx
  23. 6
      public/app/features/alerting/unified/components/contact-points/ContactPoints.test.tsx
  24. 0
      public/app/features/alerting/unified/components/contact-points/mocks/alertmanager.mimir.config.mock.json
  25. 0
      public/app/features/alerting/unified/components/contact-points/mocks/alertmanager.vanilla.mock.json
  26. 0
      public/app/features/alerting/unified/components/contact-points/mocks/mimirFlavoredServer.ts
  27. 0
      public/app/features/alerting/unified/components/contact-points/mocks/receivers.mock.json
  28. 0
      public/app/features/alerting/unified/components/contact-points/mocks/vanillaAlertmanagerServer.ts
  29. 2
      public/app/features/alerting/unified/components/settings/AlertmanagerConfig.test.tsx
  30. 0
      public/app/features/alerting/unified/components/settings/mocks/api/alertmanager/grafana/config/api/v1/alerts.json
  31. 0
      public/app/features/alerting/unified/components/settings/mocks/api/alertmanager/grafana/config/history.json
  32. 0
      public/app/features/alerting/unified/components/settings/mocks/api/alertmanager/provisioned/config/api/v1/alerts.json
  33. 0
      public/app/features/alerting/unified/components/settings/mocks/api/alertmanager/vanilla prometheus/api/v2/status.json
  34. 0
      public/app/features/alerting/unified/components/settings/mocks/api/datasources.json
  35. 0
      public/app/features/alerting/unified/components/settings/mocks/api/v1/ngalert/admin_config.json
  36. 0
      public/app/features/alerting/unified/components/settings/mocks/api/v1/ngalert/alertmanagers.json
  37. 0
      public/app/features/alerting/unified/components/settings/mocks/server.ts
  38. 2
      public/app/features/alerting/unified/mocks/server/handlers/alertmanagers.ts
  39. 2
      public/app/features/alerting/unified/state/AlertingQueryRunner.test.ts
  40. 2
      public/app/features/annotations/executeAnnotationQuery.test.ts
  41. 6
      public/app/features/connections/Connections.test.tsx
  42. 0
      public/app/features/connections/mocks/store.navIndex.mock.ts
  43. 2
      public/app/features/connections/tabs/ConnectData/ConnectData.test.tsx
  44. 2
      public/app/features/correlations/CorrelationsPage.test.tsx
  45. 0
      public/app/features/correlations/mocks/useCorrelations.mocks.ts
  46. 2
      public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx
  47. 2
      public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx
  48. 2
      public/app/features/dashboard-scene/settings/version-history/HistorySrv.test.ts
  49. 0
      public/app/features/dashboard-scene/settings/version-history/mocks/dashboardHistoryMocks.ts
  50. 2
      public/app/features/dashboard/components/DashboardSettings/VersionsSettings.test.tsx
  51. 0
      public/app/features/dashboard/components/DashboardSettings/mocks/versions.ts
  52. 2
      public/app/features/dashboard/containers/DashboardPage.test.tsx
  53. 2
      public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
  54. 2
      public/app/features/dashboard/containers/SoloPanelPage.test.tsx
  55. 2
      public/app/features/datasources/__mocks__/index.ts
  56. 2
      public/app/features/datasources/components/DataSourceDashboards.test.tsx
  57. 2
      public/app/features/datasources/components/DataSourceTestingStatus.test.tsx
  58. 2
      public/app/features/datasources/components/DataSourcesList.test.tsx
  59. 2
      public/app/features/datasources/components/EditDataSource.test.tsx
  60. 0
      public/app/features/datasources/mocks/dataSourcesMocks.ts
  61. 0
      public/app/features/datasources/mocks/store.navIndex.mock.ts
  62. 2
      public/app/features/datasources/state/actions.test.ts
  63. 2
      public/app/features/datasources/state/reducers.test.ts
  64. 2
      public/app/features/explore/Logs/LiveLogs.test.tsx
  65. 2
      public/app/features/explore/Logs/PopoverMenu.test.tsx
  66. 0
      public/app/features/explore/mocks/data.ts
  67. 0
      public/app/features/explore/mocks/makeLogs.ts
  68. 0
      public/app/features/explore/mocks/mockData.ts
  69. 2
      public/app/features/explore/state/query.test.ts
  70. 2
      public/app/features/explore/utils/supplementaryQueries.test.ts
  71. 2
      public/app/features/explore/utils/supplementaryQueries_legacy.test.ts
  72. 2
      public/app/features/invites/InviteesTable.test.tsx
  73. 2
      public/app/features/invites/state/reducers.test.ts
  74. 2
      public/app/features/logs/components/InfiniteScroll.test.tsx
  75. 2
      public/app/features/logs/components/LogDetails.test.tsx
  76. 2
      public/app/features/logs/components/LogDetailsRow.test.tsx
  77. 2
      public/app/features/logs/components/LogRow.test.tsx
  78. 2
      public/app/features/logs/components/LogRowMessage.test.tsx
  79. 2
      public/app/features/logs/components/LogRowMessageDisplayedFields.test.tsx
  80. 2
      public/app/features/logs/components/LogRows.test.tsx
  81. 2
      public/app/features/logs/components/logParser.test.ts
  82. 0
      public/app/features/logs/components/mocks/logRow.ts
  83. 2
      public/app/features/logs/components/panel/LogLine.test.tsx
  84. 2
      public/app/features/logs/components/panel/LogLineMenu.test.tsx
  85. 2
      public/app/features/logs/components/panel/LogList.test.tsx
  86. 2
      public/app/features/logs/components/panel/LogListContext.test.tsx
  87. 2
      public/app/features/logs/components/panel/LogListControls.test.tsx
  88. 2
      public/app/features/logs/components/panel/grammar.test.ts
  89. 2
      public/app/features/logs/components/panel/processing.test.ts
  90. 2
      public/app/features/logs/components/panel/virtualization.test.ts
  91. 2
      public/app/features/logs/logsModel.test.ts
  92. 2
      public/app/features/logs/utils.test.ts
  93. 3
      public/app/features/plugins/admin/__mocks__/index.ts
  94. 4
      public/app/features/plugins/admin/components/ConnectionsTab.test.tsx
  95. 2
      public/app/features/plugins/admin/components/InstallControls/InstallControlsButton.test.tsx
  96. 2
      public/app/features/plugins/admin/components/PluginDetailsBody.test.tsx
  97. 2
      public/app/features/plugins/admin/helpers.test.ts
  98. 0
      public/app/features/plugins/admin/mocks/catalogPlugin.mock.ts
  99. 0
      public/app/features/plugins/admin/mocks/localPlugin.mock.ts
  100. 0
      public/app/features/plugins/admin/mocks/mockHelpers.ts
  101. Some files were not shown because too many files have changed in this diff Show More

@ -489,6 +489,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
],
"packages/grafana-prometheus/src/test/mocks/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"packages/grafana-prometheus/src/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -958,6 +961,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not re-export imported variable (\`profiler\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`updateLegendValues\`)", "7"]
],
"public/app/core/navigation/mocks/routeProps.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/core/navigation/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@ -1566,6 +1572,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/correlations/mocks/useCorrelations.mocks.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/correlations/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
@ -2223,10 +2232,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/datasources/__mocks__/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"]
],
"public/app/features/datasources/components/DataSourceTypeCard.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Card components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "1"]
@ -2597,11 +2602,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "2"]
],
"public/app/features/plugins/admin/__mocks__/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./localPlugin.mock\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./remotePlugin.mock\`)", "1"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"]
],
"public/app/features/plugins/admin/components/Badges/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./PluginDeprecatedBadge\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./PluginDisabledBadge\`)", "1"],
@ -2622,6 +2622,16 @@ exports[`better eslint`] = {
"public/app/features/plugins/admin/components/PluginDetailsPage.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/plugins/admin/mocks/catalogPlugin.mock.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/features/plugins/admin/mocks/localPlugin.mock.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/plugins/admin/mocks/remotePlugin.mock.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/plugins/admin/pages/Browse.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
@ -2972,6 +2982,12 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Do not use any type assertions.", "3"]
],
"public/app/features/users/mocks/userMocks.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Do not use any type assertions.", "3"]
],
"public/app/features/variables/adapters.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -3196,6 +3212,21 @@ exports[`better eslint`] = {
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "5"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "6"]
],
"public/app/plugins/datasource/azuremonitor/mocks/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/azuremonitor/mocks/panelData.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"]
],
"public/app/plugins/datasource/azuremonitor/mocks/utils.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/datasource/azuremonitor/mocks/variables.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/azuremonitor/types/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
@ -3260,6 +3291,14 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/datasource/cloud-monitoring/mocks/cloudMonitoringDatasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"]
],
"public/app/plugins/datasource/cloud-monitoring/mocks/cloudMonitoringInstanceSettings.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloud-monitoring/types/query.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`../dataquery.gen\`)", "1"],
@ -3271,35 +3310,6 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloud-monitoring/webpack.config.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`config\`)", "0"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/cloudwatch-logs-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./commentOnlyQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./empty\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./filterQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./newCommandQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`./sortQuery\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`./whitespaceQuery\`)", "7"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/cloudwatch-sql-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineIncompleteQueryWithoutNamespace\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineTwoQueries\`)", "4"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/dynamic-label-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./afterLabelValue\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./insideLabelValue\`)", "1"]
],
"public/app/plugins/datasource/cloudwatch/__mocks__/metric-math-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./afterFunctionQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgAfterSearchQuery\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./thirdArgAfterSearchQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./withinStringQuery\`)", "5"]
],
"public/app/plugins/datasource/cloudwatch/components/ConfigEditor/ConfigEditor.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"],
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "1"],
@ -3337,6 +3347,153 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/plugins/datasource/cloudwatch/mocks/CloudWatchVariables.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-sql-test-data/commentOnlyQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-sql-test-data/multiLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-sql-test-data/multiLineFullQueryWithCaseClause.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-sql-test-data/partialQueryWithFunction.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-sql-test-data/partialQueryWithSubquery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-sql-test-data/singleLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-sql-test-data/whitespaceQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/commentOnlyQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/filterQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./commentOnlyQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./empty\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./filterQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./newCommandQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "5"],
[0, 0, 0, "Do not re-export imported variable (\`./sortQuery\`)", "6"],
[0, 0, 0, "Do not re-export imported variable (\`./whitespaceQuery\`)", "7"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/multiLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/newCommandQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/singleLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/sortQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-logs-test-data/whitespaceQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-ppl-test-data/multilineQueries.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-ppl-test-data/newCommandQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-ppl-test-data/singleLineQueries.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Do not use any type assertions.", "3"],
[0, 0, 0, "Do not use any type assertions.", "4"],
[0, 0, 0, "Do not use any type assertions.", "5"],
[0, 0, 0, "Do not use any type assertions.", "6"],
[0, 0, 0, "Do not use any type assertions.", "7"],
[0, 0, 0, "Do not use any type assertions.", "8"],
[0, 0, 0, "Do not use any type assertions.", "9"],
[0, 0, 0, "Do not use any type assertions.", "10"],
[0, 0, 0, "Do not use any type assertions.", "11"],
[0, 0, 0, "Do not use any type assertions.", "12"],
[0, 0, 0, "Do not use any type assertions.", "13"],
[0, 0, 0, "Do not use any type assertions.", "14"],
[0, 0, 0, "Do not use any type assertions.", "15"],
[0, 0, 0, "Do not use any type assertions.", "16"],
[0, 0, 0, "Do not use any type assertions.", "17"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./multiLineFullQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./multiLineIncompleteQueryWithoutNamespace\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineFullQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineTwoQueries\`)", "4"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/multiLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/multiLineIncompleteQueryWithoutNamespace.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/singleLineEmptyQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/singleLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/cloudwatch-sql-test-data/singleLineTwoQueries.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/dashboardOnLoadedEvent.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/dynamic-label-test-data/afterLabelValue.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/dynamic-label-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./afterLabelValue\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./insideLabelValue\`)", "1"]
],
"public/app/plugins/datasource/cloudwatch/mocks/dynamic-label-test-data/insideLabelValue.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/afterFunctionQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./afterFunctionQuery\`)", "0"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgAfterSearchQuery\`)", "1"],
[0, 0, 0, "Do not re-export imported variable (\`./secondArgQuery\`)", "2"],
[0, 0, 0, "Do not re-export imported variable (\`./singleLineEmptyQuery\`)", "3"],
[0, 0, 0, "Do not re-export imported variable (\`./thirdArgAfterSearchQuery\`)", "4"],
[0, 0, 0, "Do not re-export imported variable (\`./withinStringQuery\`)", "5"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/secondArgAfterSearchQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/secondArgQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/singleLineEmptyQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/thirdArgAfterSearchQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/metric-math-test-data/withinStringQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/cloudwatch/mocks/monarch/Monaco.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/datasource/cloudwatch/types.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -3409,6 +3566,9 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/elasticsearch/components/QueryEditor/MetricAggregationsEditor/state/reducer.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/elasticsearch/configuration/mocks/configOptions.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/elasticsearch/datasource.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -3628,6 +3788,10 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
],
"public/app/plugins/datasource/influxdb/mocks/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/datasource/influxdb/query_part.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@ -3695,6 +3859,13 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/datasource/loki/mocks/datasource.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/plugins/datasource/loki/mocks/metadataRequest.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilder.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],

@ -7,7 +7,7 @@ import { TimeRange } from '@grafana/data';
import { DEFAULT_SERIES_LIMIT, LAST_USED_LABELS_KEY, METRIC_LABEL } from '../../constants';
import { PrometheusDatasource } from '../../datasource';
import { PrometheusLanguageProviderInterface } from '../../language_provider';
import { getMockTimeRange } from '../../test/__mocks__/datasource';
import { getMockTimeRange } from '../../test/mocks/datasource';
import { MetricsBrowserProvider, useMetricsBrowser } from './MetricsBrowserContext';

@ -5,7 +5,7 @@ import { TimeRange } from '@grafana/data';
import { DEFAULT_SERIES_LIMIT, EMPTY_SELECTOR, LAST_USED_LABELS_KEY, METRIC_LABEL } from '../../constants';
import { PrometheusDatasource } from '../../datasource';
import { PrometheusLanguageProvider, PrometheusLanguageProviderInterface } from '../../language_provider';
import { getMockTimeRange } from '../../test/__mocks__/datasource';
import { getMockTimeRange } from '../../test/mocks/datasource';
import * as selectorBuilderModule from './selectorBuilder';
import { useMetricsLabelsValues } from './useMetricsLabelsValues';

@ -2,7 +2,7 @@ import { config } from '@grafana/runtime';
import { SUGGESTIONS_LIMIT } from '../../../constants';
import { FUNCTIONS } from '../../../promql';
import { getMockTimeRange } from '../../../test/__mocks__/datasource';
import { getMockTimeRange } from '../../../test/mocks/datasource';
import { filterMetricNames, getCompletions } from './completions';
import { DataProvider, type DataProviderParams } from './data_provider';

@ -3,7 +3,7 @@ import { render } from '@testing-library/react';
import { selectors } from '@grafana/e2e-selectors';
import { config } from '@grafana/runtime';
import { createDefaultConfigOptions } from '../test/__mocks__/datasource';
import { createDefaultConfigOptions } from '../test/mocks/datasource';
import { AlertingSettingsOverhaul } from './AlertingSettingsOverhaul';

@ -7,7 +7,7 @@ import { selectors } from '@grafana/e2e-selectors';
import { config } from '@grafana/runtime';
import { countError } from '../constants';
import { createDefaultConfigOptions } from '../test/__mocks__/datasource';
import { createDefaultConfigOptions } from '../test/mocks/datasource';
import { getValueFromEventItem, PromSettings } from './PromSettings';

@ -24,7 +24,7 @@ import {
createDefaultPromResponse,
fetchMockCalledWith,
getMockTimeRange,
} from './test/__mocks__/datasource';
} from './test/mocks/datasource';
import {
PromApplication,
PrometheusCacheLevel,

@ -8,7 +8,7 @@ import { DataSourceInstanceSettings } from '@grafana/data';
import { PrometheusDatasource } from '../../datasource';
import { PrometheusLanguageProviderInterface } from '../../language_provider';
import { EmptyLanguageProviderMock } from '../../language_provider.mock';
import { getMockTimeRange } from '../../test/__mocks__/datasource';
import { getMockTimeRange } from '../../test/mocks/datasource';
import { PromOptions } from '../../types';
import { MetricCombobox, MetricComboboxProps } from './MetricCombobox';

@ -7,7 +7,7 @@ import { DataSourceInstanceSettings, DataSourcePluginMeta } from '@grafana/data'
import { PrometheusDatasource } from '../../../datasource';
import { PrometheusLanguageProviderInterface } from '../../../language_provider';
import { EmptyLanguageProviderMock } from '../../../language_provider.mock';
import { getMockTimeRange } from '../../../test/__mocks__/datasource';
import { getMockTimeRange } from '../../../test/mocks/datasource';
import { PromOptions } from '../../../types';
import { PromVisualQuery } from '../../types';

@ -7,7 +7,7 @@ import { DataSourceApi, DataSourceInstanceSettings } from '@grafana/data';
import { PrometheusDatasource } from '../../datasource';
import { PrometheusLanguageProviderInterface } from '../../language_provider';
import { EmptyLanguageProviderMock } from '../../language_provider.mock';
import { getMockTimeRange } from '../../test/__mocks__/datasource';
import { getMockTimeRange } from '../../test/mocks/datasource';
import { PromOptions } from '../../types';
import { addOperationInQueryBuilder } from '../testUtils';
import { PromVisualQuery } from '../types';

@ -1,7 +1,7 @@
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps';
import { getRouteComponentProps } from 'app/core/navigation/mocks/routeProps';
import { ChangePasswordPage, Props } from './ChangePasswordPage';

@ -1,6 +1,6 @@
import { render, fireEvent, screen, waitFor, userEvent } from 'test/test-utils';
import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps';
import { getRouteComponentProps } from 'app/core/navigation/mocks/routeProps';
import { SignupPage } from './SignupPage';

@ -3,7 +3,7 @@ import { take } from 'rxjs/operators';
import { BackendSrvRequest } from '@grafana/runtime';
import { FetchQueue, FetchQueueUpdate, FetchStatus } from './FetchQueue';
import { subscribeTester } from './__mocks__/subscribeTester';
import { subscribeTester } from './mocks/subscribeTester';
describe('FetchQueue', () => {
describe('add', () => {

@ -5,7 +5,7 @@ import { BackendSrvRequest } from '@grafana/runtime';
import { FetchQueue, FetchQueueUpdate } from './FetchQueue';
import { ResponseQueue } from './ResponseQueue';
import { subscribeTester } from './__mocks__/subscribeTester';
import { subscribeTester } from './mocks/subscribeTester';
const getTestContext = () => {
const id = 'id';

@ -1,6 +1,6 @@
import { LogRowModel } from '@grafana/data';
import { config } from '@grafana/runtime';
import { createLogRow } from 'app/features/logs/components/__mocks__/logRow';
import { createLogRow } from 'app/features/logs/components/mocks/logRow';
import { createShortLink, createAndCopyShortLink, getLogsPermalinkRange } from './shortLinks';

@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { OrgUser } from '../../../types';
import { getMockUsers } from '../../users/__mocks__/userMocks';
import { getMockUsers } from '../../users/mocks/userMocks';
import { OrgUsersTable, Props } from './OrgUsersTable';

@ -6,7 +6,7 @@ import {
PROVISIONED_MIMIR_ALERTMANAGER_UID,
mockDataSources,
setupVanillaAlertmanagerServer,
} from 'app/features/alerting/unified/components/settings/__mocks__/server';
} from 'app/features/alerting/unified/components/settings/mocks/server';
import { setupMswServer } from 'app/features/alerting/unified/mockApi';
import { grantUserPermissions } from 'app/features/alerting/unified/mocks';
import { setupDataSources } from 'app/features/alerting/unified/testSetup/datasources';

@ -3,8 +3,8 @@ import { render } from 'test/test-utils';
import { byRole, byTestId, byText } from 'testing-library-selector';
import SettingsPage from './Settings';
import DataSourcesResponse from './components/settings/__mocks__/api/datasources.json';
import { setupGrafanaManagedServer, withExternalOnlySetting } from './components/settings/__mocks__/server';
import DataSourcesResponse from './components/settings/mocks/api/datasources.json';
import { setupGrafanaManagedServer, withExternalOnlySetting } from './components/settings/mocks/server';
import { setupMswServer } from './mockApi';
import { grantUserRole } from './mocks';

@ -17,11 +17,11 @@ import { DataSourceType, GRAFANA_RULES_SOURCE_NAME } from '../../utils/datasourc
import { ContactPoint } from './ContactPoint';
import { ContactPointsPageContents } from './ContactPoints';
import setupMimirFlavoredServer from './__mocks__/mimirFlavoredServer';
import { RECEIVER_META_KEY } from './constants';
import setupMimirFlavoredServer from './mocks/mimirFlavoredServer';
import setupVanillaAlertmanagerFlavoredServer, {
VANILLA_ALERTMANAGER_DATASOURCE_UID,
} from './__mocks__/vanillaAlertmanagerServer';
import { RECEIVER_META_KEY } from './constants';
} from './mocks/vanillaAlertmanagerServer';
import { ContactPointWithMetadata, ReceiverConfigWithMetadata, RouteReference } from './utils';
/**

@ -16,7 +16,7 @@ import {
PROVISIONED_MIMIR_ALERTMANAGER_UID,
mockDataSources,
setupVanillaAlertmanagerServer,
} from './__mocks__/server';
} from './mocks/server';
const renderConfiguration = (
alertManagerSourceName: string,

@ -1,7 +1,7 @@
import { HttpResponse, JsonBodyType, StrictResponse, http } from 'msw';
import { TemplatesTestPayload } from 'app/features/alerting/unified/api/templateApi';
import receiversMock from 'app/features/alerting/unified/components/contact-points/__mocks__/receivers.mock.json';
import receiversMock from 'app/features/alerting/unified/components/contact-points/mocks/receivers.mock.json';
import { MOCK_SILENCE_ID_EXISTING, mockAlertmanagerAlert } from 'app/features/alerting/unified/mocks';
import { defaultGrafanaAlertingConfigurationStatusResponse } from 'app/features/alerting/unified/mocks/alertmanagerApi';
import {

@ -20,7 +20,7 @@ import { BackendSrv } from 'app/core/services/backend_srv';
import {
EXTERNAL_VANILLA_ALERTMANAGER_UID,
mockDataSources,
} from 'app/features/alerting/unified/components/settings/__mocks__/server';
} from 'app/features/alerting/unified/components/settings/mocks/server';
import { setupMswServer } from 'app/features/alerting/unified/mockApi';
import { setupDataSources } from 'app/features/alerting/unified/testSetup/datasources';
import { ExpressionQuery, ExpressionQueryType } from 'app/features/expressions/types';

@ -2,7 +2,7 @@ import { DataSourceApi, dateTime, DataQuery } from '@grafana/data';
import { PanelModel } from '../dashboard/state/PanelModel';
import { createDashboardModelFixture } from '../dashboard/state/__fixtures__/dashboardFixtures';
import { TestQuery, getMockDataSource } from '../query/state/__mocks__/mockDataSource';
import { TestQuery, getMockDataSource } from '../query/state/mocks/mockDataSource';
import { executeAnnotationQuery } from './executeAnnotationQuery';
import { AnnotationQueryOptions } from './types';

@ -3,15 +3,15 @@ import { Route, Routes } from 'react-router-dom-v5-compat';
import { render } from 'test/test-utils';
import { contextSrv } from 'app/core/services/context_srv';
import { getMockDataSources } from 'app/features/datasources/__mocks__';
import * as api from 'app/features/datasources/api';
import { getMockDataSources } from 'app/features/datasources/mocks/dataSourcesMocks';
import { configureStore } from 'app/store/configureStore';
import { getPluginsStateMock } from '../plugins/admin/__mocks__';
import { getPluginsStateMock } from '../plugins/admin/mocks/mockHelpers';
import Connections from './Connections';
import { navIndex } from './__mocks__/store.navIndex.mock';
import { ROUTES } from './constants';
import { navIndex } from './mocks/store.navIndex.mock';
jest.mock('app/core/services/context_srv');
jest.mock('app/features/datasources/api');

@ -5,7 +5,7 @@ import { TestProvider } from 'test/helpers/TestProvider';
import { PluginType } from '@grafana/data';
import { locationService } from '@grafana/runtime';
import { contextSrv } from 'app/core/core';
import { getCatalogPluginMock, getPluginsStateMock } from 'app/features/plugins/admin/__mocks__';
import { getCatalogPluginMock, getPluginsStateMock } from 'app/features/plugins/admin/mocks/mockHelpers';
import { CatalogPlugin } from 'app/features/plugins/admin/types';
import { AccessControlAction } from 'app/types';

@ -31,7 +31,7 @@ import {
createRemoveCorrelationResponse,
createUpdateCorrelationResponse,
MockDataSourceSrv,
} from './__mocks__/useCorrelations.mocks';
} from './mocks/useCorrelations.mocks';
import { Correlation, CreateCorrelationParams, OmitUnion } from './types';
// Set app events up, otherwise plugin modules will fail to load

@ -11,7 +11,7 @@ import { selectors } from '@grafana/e2e-selectors';
import { LocationServiceProvider, config, locationService, setPluginImportUtils } from '@grafana/runtime';
import { VizPanel } from '@grafana/scenes';
import { Dashboard } from '@grafana/schema';
import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps';
import { getRouteComponentProps } from 'app/core/navigation/mocks/routeProps';
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
import store from 'app/core/store';
import { DashboardLoaderSrv, setDashboardLoaderSrv } from 'app/features/dashboard/services/DashboardLoaderSrv';

@ -8,7 +8,7 @@ import { getPanelPlugin } from '@grafana/data/test';
import { selectors as e2eSelectors } from '@grafana/e2e-selectors';
import { config, setPluginImportUtils, setRunRequest } from '@grafana/runtime';
import { Dashboard } from '@grafana/schema';
import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps';
import { getRouteComponentProps } from 'app/core/navigation/mocks/routeProps';
import { DashboardRoutes } from 'app/types/dashboard';
import { setupLoadDashboardMock, setupLoadDashboardMockReject } from '../utils/test-utils';

@ -1,7 +1,7 @@
import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures';
import { HistorySrv } from './HistorySrv';
import { restore, versions } from './__mocks__/dashboardHistoryMocks';
import { restore, versions } from './mocks/dashboardHistoryMocks';
const getMock = jest.fn().mockResolvedValue({});
const postMock = jest.fn().mockResolvedValue({});

@ -8,7 +8,7 @@ import { historySrv } from 'app/features/dashboard-scene/settings/version-histor
import { createDashboardModelFixture } from '../../state/__fixtures__/dashboardFixtures';
import { VersionsSettings, VERSIONS_FETCH_LIMIT } from './VersionsSettings';
import { versions, diffs } from './__mocks__/versions';
import { versions, diffs } from './mocks/versions';
jest.mock('app/features/dashboard-scene/settings/version-history/HistorySrv');

@ -11,7 +11,7 @@ import { config, setDataSourceSrv } from '@grafana/runtime';
import { Dashboard } from '@grafana/schema';
import { notifyApp } from 'app/core/actions';
import { AppChrome } from 'app/core/components/AppChrome/AppChrome';
import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps';
import { getRouteComponentProps } from 'app/core/navigation/mocks/routeProps';
import { RouteDescriptor } from 'app/core/navigation/types';
import { HOME_NAV_ID } from 'app/core/reducers/navModel';
import { DashboardInitPhase, DashboardMeta, DashboardRoutes } from 'app/types';

@ -7,7 +7,7 @@ import { render } from 'test/test-utils';
import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src';
import { Dashboard, DashboardCursorSync, FieldConfigSource, Panel, ThresholdsMode } from '@grafana/schema/src';
import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps';
import { getRouteComponentProps } from 'app/core/navigation/mocks/routeProps';
import * as appTypes from 'app/types';
import { DashboardInitPhase, DashboardMeta, DashboardRoutes } from 'app/types';

@ -7,7 +7,7 @@ import { GrafanaContext } from 'app/core/context/GrafanaContext';
import { RouteDescriptor } from 'app/core/navigation/types';
import { DashboardMeta, DashboardRoutes } from 'app/types';
import { getRouteComponentProps } from '../../../core/navigation/__mocks__/routeProps';
import { getRouteComponentProps } from '../../../core/navigation/mocks/routeProps';
import { Props as DashboardPanelProps } from '../dashgrid/DashboardPanel';
import { DashboardModel } from '../state/DashboardModel';
import { createDashboardModelFixture } from '../state/__fixtures__/dashboardFixtures';

@ -1,2 +0,0 @@
export * from './dataSourcesMocks';
export * from './store.navIndex.mock';

@ -3,7 +3,7 @@ import { Provider } from 'react-redux';
import { configureStore } from 'app/store/configureStore';
import { getMockDashboard } from '../__mocks__';
import { getMockDashboard } from '../mocks/dataSourcesMocks';
import { DataSourceDashboardsView, ViewProps } from './DataSourceDashboards';

@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react';
import { getMockDataSource } from '../__mocks__';
import { getMockDataSource } from '../mocks/dataSourcesMocks';
import { DataSourceTestingStatus, Props } from './DataSourceTestingStatus';

@ -1,7 +1,7 @@
import { screen } from '@testing-library/react';
import { render } from 'test/test-utils';
import { getMockDataSources } from '../__mocks__';
import { getMockDataSources } from '../mocks/dataSourcesMocks';
import { DataSourcesListView } from './DataSourcesList';

@ -7,7 +7,7 @@ import { setPluginComponentsHook } from '@grafana/runtime';
import { createComponentWithMeta } from 'app/features/plugins/extensions/usePluginComponents';
import { configureStore } from 'app/store/configureStore';
import { getMockDataSource, getMockDataSourceMeta, getMockDataSourceSettingsState } from '../__mocks__';
import { getMockDataSource, getMockDataSourceMeta, getMockDataSourceSettingsState } from '../mocks/dataSourcesMocks';
import { missingRightsMessage } from './DataSourceMissingRightsMessage';
import { readOnlyMessage } from './DataSourceReadOnlyMessage';

@ -6,9 +6,9 @@ import { appEvents } from 'app/core/core';
import { getBackendSrv } from 'app/core/services/backend_srv';
import { ThunkResult, ThunkDispatch } from 'app/types';
import { getMockDataSource } from '../__mocks__';
import * as api from '../api';
import { DATASOURCES_ROUTES } from '../constants';
import { getMockDataSource } from '../mocks/dataSourcesMocks';
import { trackDataSourceCreated, trackDataSourceTested } from '../tracking';
import { GenericDataSourcePlugin } from '../types';

@ -3,7 +3,7 @@ import { reducerTester } from 'test/core/redux/reducerTester';
import { PluginMeta, PluginMetaInfo, PluginType, LayoutModes } from '@grafana/data';
import { DataSourceSettingsState, DataSourcesState } from 'app/types';
import { getMockDataSource, getMockDataSources } from '../__mocks__';
import { getMockDataSource, getMockDataSources } from '../mocks/dataSourcesMocks';
import { GenericDataSourcePlugin } from '../types';
import {

@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
import { LogRowModel } from '@grafana/data';
import { makeLogs } from '../__mocks__/makeLogs';
import { makeLogs } from '../mocks/makeLogs';
import { LiveLogsWithTheme } from './LiveLogs';

@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { createLogRow } from '../../logs/components/__mocks__/logRow';
import { createLogRow } from '../../logs/components/mocks/logRow';
import { PopoverMenu } from './PopoverMenu';

@ -24,7 +24,7 @@ import { reducerTester } from '../../../../test/core/redux/reducerTester';
import * as richHistory from '../../../core/utils/richHistory';
import { configureStore } from '../../../store/configureStore';
import { setTimeSrv, TimeSrv } from '../../dashboard/services/TimeSrv';
import { makeLogs } from '../__mocks__/makeLogs';
import { makeLogs } from '../mocks/makeLogs';
import { supplementaryQueryTypes } from '../utils/supplementaryQueries';
import { saveCorrelationsAction } from './explorePane';

@ -21,7 +21,7 @@ import { DataQuery } from '@grafana/schema';
import { MockDataSourceApi } from '../../../../test/mocks/datasource_srv';
import { MockDataQueryRequest, MockQuery } from '../../../../test/mocks/query';
import { ExplorePanelData } from '../../../types';
import { mockExplorePanelData } from '../__mocks__/data';
import { mockExplorePanelData } from '../mocks/data';
import { getSupplementaryQueryProvider } from './supplementaryQueries';

@ -26,7 +26,7 @@ import { DataQuery } from '@grafana/schema';
import { MockDataSourceApi } from '../../../../test/mocks/datasource_srv';
import { MockDataQueryRequest, MockQuery } from '../../../../test/mocks/query';
import { ExplorePanelData } from '../../../types';
import { mockExplorePanelData } from '../__mocks__/data';
import { mockExplorePanelData } from '../mocks/data';
import { getSupplementaryQueryProvider } from './supplementaryQueries';

@ -3,7 +3,7 @@ import { Provider } from 'react-redux';
import { configureStore } from 'app/store/configureStore';
import { getMockInvitees } from '../users/__mocks__/userMocks';
import { getMockInvitees } from '../users/mocks/userMocks';
import InviteesTable from './InviteesTable';

@ -1,6 +1,6 @@
import { keyBy } from 'lodash';
import { getMockInvitees } from 'app/features/users/__mocks__/userMocks';
import { getMockInvitees } from 'app/features/users/mocks/userMocks';
import { reducerTester } from '../../../../test/core/redux/reducerTester';

@ -7,7 +7,7 @@ import { config } from '@grafana/runtime';
import { LogsSortOrder } from '@grafana/schema';
import { InfiniteScroll, Props, SCROLLING_THRESHOLD } from './InfiniteScroll';
import { createLogRow } from './__mocks__/logRow';
import { createLogRow } from './mocks/logRow';
const defaultTz = 'browser';

@ -17,8 +17,8 @@ import { setPluginLinksHook } from '@grafana/runtime';
import { LogDetails, Props } from './LogDetails';
import { LOG_LINE_BODY_FIELD_NAME } from './LogDetailsBody';
import { createLogRow } from './__mocks__/logRow';
import { getLogRowStyles } from './getLogRowStyles';
import { createLogRow } from './mocks/logRow';
jest.mock('@grafana/runtime', () => {
return {

@ -4,7 +4,7 @@ import { ComponentProps } from 'react';
import { Field, CoreApp, FieldType, LinkModel } from '@grafana/data';
import { LogDetailsRow } from './LogDetailsRow';
import { createLogRow } from './__mocks__/logRow';
import { createLogRow } from './mocks/logRow';
type Props = ComponentProps<typeof LogDetailsRow>;

@ -6,8 +6,8 @@ import tinycolor from 'tinycolor2';
import { CoreApp, createTheme, LogLevel, LogRowModel } from '@grafana/data';
import { LogRow } from './LogRow';
import { createLogRow } from './__mocks__/logRow';
import { getLogRowStyles } from './getLogRowStyles';
import { createLogRow } from './mocks/logRow';
const reportInteraction = jest.fn();
jest.mock('@grafana/runtime', () => ({

@ -6,8 +6,8 @@ import { CoreApp, createTheme, LogLevel, LogRowModel } from '@grafana/data';
import { IconButton } from '@grafana/ui';
import { LogRowMessage, MAX_CHARACTERS } from './LogRowMessage';
import { createLogRow } from './__mocks__/logRow';
import { getLogRowStyles } from './getLogRowStyles';
import { createLogRow } from './mocks/logRow';
const setup = (propOverrides?: Partial<ComponentProps<typeof LogRowMessage>>, rowOverrides?: Partial<LogRowModel>) => {
const theme = createTheme();

@ -6,8 +6,8 @@ import { IconButton } from '@grafana/ui';
import { LOG_LINE_BODY_FIELD_NAME } from './LogDetailsBody';
import { LogRowMessageDisplayedFields, Props } from './LogRowMessageDisplayedFields';
import { createLogRow } from './__mocks__/logRow';
import { getLogRowStyles } from './getLogRowStyles';
import { createLogRow } from './mocks/logRow';
const setup = (propOverrides: Partial<Props> = {}, detectedFields = ['place', 'planet']) => {
const theme = createTheme();

@ -6,7 +6,7 @@ import { LogRowModel, LogsDedupStrategy, LogsSortOrder } from '@grafana/data';
import { disablePopoverMenu, enablePopoverMenu, isPopoverMenuDisabled } from '../utils';
import { LogRows, Props } from './LogRows';
import { createLogRow } from './__mocks__/logRow';
import { createLogRow } from './mocks/logRow';
jest.mock('../utils', () => ({
...jest.requireActual('../utils'),

@ -3,8 +3,8 @@ import { mockTimeRange } from '@grafana/plugin-ui';
import { ExploreFieldLinkModel, getFieldLinksForExplore } from 'app/features/explore/utils/links';
import { GetFieldLinksFn } from 'app/plugins/panel/logs/types';
import { createLogRow } from './__mocks__/logRow';
import { getAllFields, createLogLineLinks, FieldDef, getDataframeFields } from './logParser';
import { createLogRow } from './mocks/logRow';
describe('logParser', () => {
describe('getAllFields', () => {

@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event';
import { CoreApp, createTheme, LogsDedupStrategy, LogsSortOrder } from '@grafana/data';
import { LOG_LINE_BODY_FIELD_NAME } from '../LogDetailsBody';
import { createLogLine } from '../__mocks__/logRow';
import { createLogLine } from '../mocks/logRow';
import { getGridTemplateColumns, getStyles, LogLine, Props } from './LogLine';
import { LogListFontSize } from './LogList';

@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event';
import { CoreApp, createTheme, LogsDedupStrategy, LogsSortOrder } from '@grafana/data';
import { createLogLine } from '../__mocks__/logRow';
import { createLogLine } from '../mocks/logRow';
import { getStyles } from './LogLine';
import { LogLineMenu, LogLineMenuCustomItem } from './LogLineMenu';

@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event';
import { CoreApp, getDefaultTimeRange, LogRowModel, LogsDedupStrategy, LogsSortOrder } from '@grafana/data';
import { disablePopoverMenu, enablePopoverMenu, isPopoverMenuDisabled } from '../../utils';
import { createLogRow } from '../__mocks__/logRow';
import { createLogRow } from '../mocks/logRow';
import { LogList, Props } from './LogList';

@ -1,7 +1,7 @@
import { renderHook } from '@testing-library/react';
import { ReactNode } from 'react';
import { createLogLine } from '../__mocks__/logRow';
import { createLogLine } from '../mocks/logRow';
import {
useLogListContextData,

@ -5,7 +5,7 @@ import { CoreApp, EventBusSrv, LogLevel, LogsDedupStrategy, LogsSortOrder } from
import { config } from '@grafana/runtime';
import { downloadLogs } from '../../utils';
import { createLogRow } from '../__mocks__/logRow';
import { createLogRow } from '../mocks/logRow';
import { LogListFontSize } from './LogList';
import { LogListContextProvider } from './LogListContext';

@ -1,6 +1,6 @@
import Prism, { Token } from 'prismjs';
import { createLogLine } from '../__mocks__/logRow';
import { createLogLine } from '../mocks/logRow';
import { generateLogGrammar } from './grammar';

@ -1,7 +1,7 @@
import { createTheme, Field, FieldType, LogLevel, LogRowModel, LogsSortOrder, toDataFrame } from '@grafana/data';
import { LOG_LINE_BODY_FIELD_NAME } from '../LogDetailsBody';
import { createLogLine, createLogRow } from '../__mocks__/logRow';
import { createLogLine, createLogRow } from '../mocks/logRow';
import { LogListFontSize } from './LogList';
import { LogListModel, preProcessLogs } from './processing';

@ -1,7 +1,7 @@
import { createTheme, LogsSortOrder } from '@grafana/data';
import { LOG_LINE_BODY_FIELD_NAME } from '../LogDetailsBody';
import { createLogLine } from '../__mocks__/logRow';
import { createLogLine } from '../mocks/logRow';
import { LogListModel, PreProcessOptions } from './processing';
import { LogLineVirtualization, getLogLineSize, DisplayOptions } from './virtualization';

@ -22,8 +22,8 @@ import {
toDataFrame,
} from '@grafana/data';
import { config } from '@grafana/runtime';
import { getMockFrames } from 'app/plugins/datasource/loki/__mocks__/frames';
import { LokiQueryDirection } from 'app/plugins/datasource/loki/dataquery.gen';
import { getMockFrames } from 'app/plugins/datasource/loki/mocks/frames';
import { MockObservableDataSourceApi } from '../../../test/mocks/datasource_srv';

@ -9,7 +9,7 @@ import {
MutableDataFrame,
DataFrame,
} from '@grafana/data';
import { getMockFrames } from 'app/plugins/datasource/loki/__mocks__/frames';
import { getMockFrames } from 'app/plugins/datasource/loki/mocks/frames';
import { logSeriesToLogsModel } from './logsModel';
import {

@ -1,3 +0,0 @@
export { default as remotePluginMock } from './remotePlugin.mock';
export { default as localPluginMock } from './localPlugin.mock';
export * from './mockHelpers';

@ -4,10 +4,10 @@ import { render } from 'test/test-utils';
import { DataSourceSettings } from '@grafana/data';
import { config } from '@grafana/runtime';
import { ContextSrv, setContextSrv } from 'app/core/services/context_srv';
import { getMockDataSources } from 'app/features/datasources/__mocks__';
import { getMockDataSources } from 'app/features/datasources/mocks/dataSourcesMocks';
import { AccessControlAction } from 'app/types';
import { datasourcePlugin } from '../__mocks__/catalogPlugin.mock';
import { datasourcePlugin } from '../mocks/catalogPlugin.mock';
import ConnectionsTab, { ConnectionsList } from './ConnectionsTab';

@ -5,7 +5,7 @@ import { PluginSignatureStatus } from '@grafana/data';
import { config } from '@grafana/runtime';
import { configureStore } from 'app/store/configureStore';
import { getPluginsStateMock } from '../../__mocks__';
import { getPluginsStateMock } from '../../mocks/mockHelpers';
import { CatalogPlugin, PluginStatus } from '../../types';
import { InstallControlsButton } from './InstallControlsButton';

@ -5,7 +5,7 @@ import { PluginType } from '@grafana/data';
import { config } from '@grafana/runtime';
import { configureStore } from 'app/store/configureStore';
import { getCatalogPluginMock } from '../__mocks__';
import { getCatalogPluginMock } from '../mocks/mockHelpers';
import { PluginTabIds } from '../types';
import { PluginDetailsBody } from './PluginDetailsBody';

@ -1,7 +1,6 @@
import { PluginErrorCode, PluginSignatureStatus, PluginSignatureType, PluginType } from '@grafana/data';
import { config } from '@grafana/runtime';
import { getLocalPluginMock, getRemotePluginMock, getCatalogPluginMock } from './__mocks__';
import {
mapToCatalogPlugin,
mapRemoteToCatalog,
@ -15,6 +14,7 @@ import {
isNonAngularVersion,
isDisabledAngularPlugin,
} from './helpers';
import { getLocalPluginMock, getRemotePluginMock, getCatalogPluginMock } from './mocks/mockHelpers';
import { RemotePlugin, LocalPlugin, RemotePluginStatus, Version, CatalogPlugin } from './types';
describe('Plugins/Helpers', () => {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save