Browse Source

SONAR-22618 Get rid of aliases to sonar-wb in SR

pull/3361/head
stanislavh 3 weeks ago
parent
commit
b7469dda6b
100 changed files with 105 additions and 105 deletions
  1. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx
  2. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx
  3. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/FormattingHelp-test.tsx
  4. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx
  5. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx
  6. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/Landing-test.tsx
  7. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx
  8. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx
  9. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx
  10. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx
  11. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/ResetPassword-test.tsx
  12. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx
  13. 1
    1
      server/sonar-web/src/main/js/app/components/__tests__/UpdateNotification-it.tsx
  14. 1
    1
      server/sonar-web/src/main/js/app/components/global-search/__tests__/GlobalSearch-it.tsx
  15. 1
    1
      server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx
  16. 1
    1
      server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx
  17. 1
    1
      server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationRenderer-test.tsx
  18. 1
    1
      server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx
  19. 1
    1
      server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx
  20. 1
    1
      server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx
  21. 1
    1
      server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx
  22. 1
    1
      server/sonar-web/src/main/js/apps/account/__tests__/Account-it.tsx
  23. 1
    1
      server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-it.tsx
  24. 5
    5
      server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx
  25. 1
    1
      server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-it.tsx
  26. 1
    1
      server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts
  27. 1
    1
      server/sonar-web/src/main/js/apps/coding-rules/__tests__/CustomRule-it.ts
  28. 3
    3
      server/sonar-web/src/main/js/apps/coding-rules/utils-tests.tsx
  29. 1
    1
      server/sonar-web/src/main/js/apps/component-measures/__tests__/ComponentMeasures-it.tsx
  30. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/Azure-it.tsx
  31. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx
  32. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloud-it.tsx
  33. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/GitHub-it.tsx
  34. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx
  35. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/Manual-it.tsx
  36. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx
  37. 1
    1
      server/sonar-web/src/main/js/apps/create/project/__tests__/MonorepoProjectCreate-it.tsx
  38. 1
    1
      server/sonar-web/src/main/js/apps/groups/__tests__/GroupsApp-it.tsx
  39. 1
    1
      server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx
  40. 1
    1
      server/sonar-web/src/main/js/apps/issues/__tests__/IssueHeader-it.tsx
  41. 1
    1
      server/sonar-web/src/main/js/apps/issues/__tests__/IssuesSourceViewer-it.tsx
  42. 1
    1
      server/sonar-web/src/main/js/apps/issues/components/__tests__/AssigneeSelect-test.tsx
  43. 1
    1
      server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/IssueSourceViewerHeader-test.tsx
  44. 1
    1
      server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx
  45. 1
    1
      server/sonar-web/src/main/js/apps/issues/issues-subnavigation/__tests__/SubnavigationIssues-it.tsx
  46. 1
    1
      server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/SimpleListStyleFacet-test.tsx
  47. 1
    1
      server/sonar-web/src/main/js/apps/issues/test-utils.tsx
  48. 1
    1
      server/sonar-web/src/main/js/apps/marketplace/__tests__/MarketplaceApp-it.tsx
  49. 1
    1
      server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-it.tsx
  50. 1
    1
      server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx
  51. 1
    1
      server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts
  52. 1
    1
      server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/BranchQualityGate-it.tsx
  53. 1
    1
      server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-it.tsx
  54. 1
    1
      server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/PermissionTemplatesApp-it.tsx
  55. 1
    1
      server/sonar-web/src/main/js/apps/permissions/test-utils.ts
  56. 1
    1
      server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx
  57. 1
    1
      server/sonar-web/src/main/js/apps/projectBranches/__tests__/ProjectBranchesApp-it.tsx
  58. 1
    1
      server/sonar-web/src/main/js/apps/projectDeletion/__tests__/ProjectDeletionApp-it.tsx
  59. 1
    1
      server/sonar-web/src/main/js/apps/projectDump/__tests__/ProjectDumpApp-it.tsx
  60. 1
    1
      server/sonar-web/src/main/js/apps/projectInformation/__tests__/ProjectInformationApp-it.tsx
  61. 1
    1
      server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/__tests__/RegulatoryReport-it.tsx
  62. 1
    1
      server/sonar-web/src/main/js/apps/projectKey/__tests__/ProjectKeyApp-it.tsx
  63. 1
    1
      server/sonar-web/src/main/js/apps/projectLinks/__tests__/ProjectLinksApp-it.tsx
  64. 1
    1
      server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/ProjectNewCodeDefinitionApp-it.tsx
  65. 1
    1
      server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-it.tsx
  66. 1
    1
      server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/projectQualityProfilesApp-it.tsx
  67. 1
    1
      server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx
  68. 1
    1
      server/sonar-web/src/main/js/apps/projects/components/__tests__/CreateApplication-test.tsx
  69. 1
    1
      server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx
  70. 1
    1
      server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx
  71. 1
    1
      server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx
  72. 1
    1
      server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx
  73. 1
    1
      server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfilesApp-it.tsx
  74. 1
    1
      server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-it.tsx
  75. 1
    1
      server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-it.tsx
  76. 1
    1
      server/sonar-web/src/main/js/apps/security-hotspots/hooks/__tests__/useStickyDetection-test.tsx
  77. 1
    1
      server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
  78. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/__tests__/AnalysisScope-test.tsx
  79. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-it.tsx
  80. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-it.tsx
  81. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodeDefinition-it.tsx
  82. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/__tests__/SettingsApp-it.tsx
  83. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx
  84. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx
  85. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Bitbucket-it.tsx
  86. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Github-it.tsx
  87. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Gitlab-it.tsx
  88. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Scim-it.tsx
  89. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-it.tsx
  90. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx
  91. 1
    1
      server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-it.tsx
  92. 1
    1
      server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx
  93. 1
    1
      server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx
  94. 1
    1
      server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-it.tsx
  95. 1
    1
      server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx
  96. 1
    1
      server/sonar-web/src/main/js/apps/web-api/__tests__/WebApi-it.tsx
  97. 1
    1
      server/sonar-web/src/main/js/apps/web-api/components/__tests__/Actions-test.tsx
  98. 1
    1
      server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx
  99. 1
    1
      server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewer-it.tsx
  100. 0
    0
      server/sonar-web/src/main/js/components/activity-graph/__tests__/ActivityGraph-it.tsx

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx View File

@@ -20,10 +20,10 @@
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { Route, useOutletContext } from 'react-router-dom';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { getSystemStatus, waitSystemUPStatus } from '../../../api/system';
import { mockAppState } from '../../../helpers/testMocks';
import { renderAppRoutes } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../helpers/testSelector';
import { AdminPagesContext } from '../../../types/admin';
import { AdminContainer, AdminContainerProps } from '../AdminContainer';
import AdminContext from '../AdminContext';

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx View File

@@ -22,6 +22,7 @@ import userEvent from '@testing-library/user-event';
import React, { useContext } from 'react';
import { Route } from 'react-router-dom';
import * as withRouter from '~sonar-aligned/components/hoc/withRouter';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { validateProjectAlmBinding } from '../../../api/alm-settings';
import { getTasksForComponent } from '../../../api/ce';
@@ -33,7 +34,6 @@ import { mockComponent } from '../../../helpers/mocks/component';
import { mockTask } from '../../../helpers/mocks/tasks';
import { HttpStatus } from '../../../helpers/request';
import { renderAppRoutes, renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { getProjectUrl, getPullRequestUrl } from '../../../helpers/urls';
import { TaskStatuses, TaskTypes } from '../../../types/tasks';
import handleRequiredAuthorization from '../../utils/handleRequiredAuthorization';

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/FormattingHelp-test.tsx View File

@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import FormattingHelp from '../FormattingHelp';

it('should render correctly', () => {

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx View File

@@ -19,10 +19,10 @@
*/
import { addDays, subDays } from 'date-fns';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import SystemServiceMock from '../../../api/mocks/SystemServiceMock';
import { mockAppState } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { AppState } from '../../../types/appstate';
import { EditionKey } from '../../../types/editions';
import { FCProps } from '../../../types/misc';

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx View File

@@ -19,8 +19,8 @@
*/
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import KeyboardShortcutsModal from '../KeyboardShortcutsModal';

it('should render correctly', async () => {

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/Landing-test.tsx View File

@@ -18,9 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byText } from '~sonar-aligned/helpers/testSelector';
import { mockCurrentUser, mockLoggedInUser } from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byText } from '../../../helpers/testSelector';
import { CurrentUser } from '../../../types/users';
import { Landing, LandingProps } from '../Landing';


+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx View File

@@ -19,9 +19,9 @@
*/
import * as React from 'react';
import { Route } from 'react-router-dom';
import { byText } from '~sonar-aligned/helpers/testSelector';
import { getSystemStatus } from '../../../helpers/system';
import { renderAppRoutes } from '../../../helpers/testReactTestingUtils';
import { byText } from '../../../helpers/testSelector';
import MigrationContainer from '../MigrationContainer';

jest.mock('../../../helpers/system', () => ({

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx View File

@@ -20,11 +20,11 @@
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { installScript } from '../../../helpers/extensions';
import { getWebAnalyticsPageHandlerFromCache } from '../../../helpers/extensionsHandler';
import { mockAppState } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import PageTracker from '../PageTracker';

jest.mock('../../../helpers/extensions', () => ({

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx View File

@@ -19,10 +19,10 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { setSimpleSettingValue } from '../../../api/settings';
import { mockLoggedInUser, mockRouter } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import { PluginRiskConsent, PluginRiskConsentProps } from '../PluginRiskConsent';

jest.mock('../../../api/settings', () => ({

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx View File

@@ -19,10 +19,10 @@
*/
import * as React from 'react';
import { Route } from 'react-router-dom';
import { byText } from '~sonar-aligned/helpers/testSelector';
import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization';
import { mockComponent } from '../../../helpers/mocks/component';
import { renderAppRoutes } from '../../../helpers/testReactTestingUtils';
import { byText } from '../../../helpers/testSelector';
import { ProjectAdminContainer } from '../ProjectAdminContainer';

jest.mock('../../utils/handleRequiredAuthorization', () => {

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/ResetPassword-test.tsx View File

@@ -19,9 +19,9 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector';
import { mockLoggedInUser } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole } from '../../../helpers/testSelector';
import { ResetPassword, ResetPasswordProps } from '../ResetPassword';

jest.mock('../../../helpers/system', () => ({

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx View File

@@ -19,11 +19,11 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { showLicense } from '../../../api/editions';
import { save } from '../../../helpers/storage';
import { mockAppState, mockCurrentUser } from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { EditionKey } from '../../../types/editions';
import { LoggedInUser } from '../../../types/users';
import { StartupModal } from '../StartupModal';

+ 1
- 1
server/sonar-web/src/main/js/app/components/__tests__/UpdateNotification-it.tsx View File

@@ -20,11 +20,11 @@
import userEvent from '@testing-library/user-event';
import { addDays, formatISO, subDays } from 'date-fns';
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { getSystemUpgrades } from '../../../api/system';
import { UpdateUseCase } from '../../../components/upgrade/utils';
import { mockAppState, mockCurrentUser } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import { AppState } from '../../../types/appstate';
import { Permissions } from '../../../types/permissions';
import { CurrentUser } from '../../../types/users';

+ 1
- 1
server/sonar-web/src/main/js/app/components/global-search/__tests__/GlobalSearch-it.tsx View File

@@ -19,10 +19,10 @@
*/
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { getSuggestions } from '../../../../api/components';
import { mockRouter } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import GlobalSearch, { GlobalSearch as GlobalSearchWithoutRouter } from '../GlobalSearch';

jest.mock('../../../../api/components', () => ({

+ 1
- 1
server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx View File

@@ -20,9 +20,9 @@
import { waitFor } from '@testing-library/react';
import * as React from 'react';
import { useContext } from 'react';
import { byText } from '~sonar-aligned/helpers/testSelector';
import { mockAppState } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byText } from '../../../../helpers/testSelector';
import { IndexationStatus } from '../../../../types/indexation';
import { IndexationContext } from '../IndexationContext';
import {

+ 1
- 1
server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx View File

@@ -19,9 +19,9 @@
*/
import { act } from '@testing-library/react';
import * as React from 'react';
import { byText } from '~sonar-aligned/helpers/testSelector';
import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byText } from '../../../../helpers/testSelector';
import { Permissions } from '../../../../types/permissions';
import { IndexationNotification } from '../IndexationNotification';
import IndexationNotificationHelper from '../IndexationNotificationHelper';

+ 1
- 1
server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationRenderer-test.tsx View File

@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { IndexationNotificationType } from '../../../../types/indexation';
import IndexationNotificationRenderer from '../IndexationNotificationRenderer';


+ 1
- 1
server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx View File

@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { PageUnavailableDueToIndexation } from '../PageUnavailableDueToIndexation';

it('should render correctly', () => {

+ 1
- 1
server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx View File

@@ -18,9 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { getLanguages } from '../../../../api/languages';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { Language } from '../../../../types/languages';
import { LanguagesContext } from '../LanguagesContext';
import LanguagesContextProvider from '../LanguagesContextProvider';

+ 1
- 1
server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx View File

@@ -18,11 +18,11 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { MetricKey } from '~sonar-aligned/types/metrics';
import { getAllMetrics } from '../../../../api/metrics';
import { mockMetric } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { MetricsContext } from '../MetricsContext';
import MetricsContextProvider from '../MetricsContextProvider';


+ 1
- 1
server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx View File

@@ -19,10 +19,10 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { dismissNotice } from '../../../../api/users';
import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { CurrentUser, NoticeType } from '../../../../types/users';
import PromotionNotification from '../PromotionNotification';


+ 1
- 1
server/sonar-web/src/main/js/apps/account/__tests__/Account-it.tsx View File

@@ -23,6 +23,7 @@ import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import React from 'react';
import { Outlet, Route } from 'react-router-dom';
import selectEvent from 'react-select-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { getMyProjects, getScannableProjects } from '../../../api/components';
import NotificationsMock from '../../../api/mocks/NotificationsMock';
import UserTokensMock from '../../../api/mocks/UserTokensMock';
@@ -30,7 +31,6 @@ import { mockUserToken } from '../../../helpers/mocks/token';
import { setKeyboardShortcutEnabled } from '../../../helpers/preferences';
import { mockCurrentUser, mockLoggedInUser } from '../../../helpers/testMocks';
import { renderAppRoutes } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { NotificationGlobalType, NotificationProjectType } from '../../../types/notifications';
import { Permissions } from '../../../types/permissions';
import { TokenType } from '../../../types/token';

+ 1
- 1
server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-it.tsx View File

@@ -19,11 +19,11 @@
*/
import userEvent from '@testing-library/user-event';
import { getDate, getMonth, getYear, subDays } from 'date-fns';
import { byPlaceholderText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock';
import { now } from '../../../../helpers/dates';
import { getShortMonthName } from '../../../../helpers/l10n';
import { renderAppWithAdminContext } from '../../../../helpers/testReactTestingUtils';
import { byPlaceholderText, byRole, byTestId, byText } from '../../../../helpers/testSelector';
import { AdminPageExtension } from '../../../../types/extension';
import { SettingsKey } from '../../../../types/settings';
import routes from '../../routes';

+ 5
- 5
server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx View File

@@ -20,17 +20,17 @@
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import selectEvent from 'react-select-event';
import ComputeEngineServiceMock from '../../../api/mocks/ComputeEngineServiceMock';
import { parseDate } from '../../../helpers/dates';
import { mockAppState } from '../../../helpers/testMocks';
import { RenderContext, renderAppWithAdminContext } from '../../../helpers/testReactTestingUtils';
import {
byLabelText,
byPlaceholderText,
byRole,
byTestId,
byText,
} from '../../../helpers/testSelector';
} from '~sonar-aligned/helpers/testSelector';
import ComputeEngineServiceMock from '../../../api/mocks/ComputeEngineServiceMock';
import { parseDate } from '../../../helpers/dates';
import { mockAppState } from '../../../helpers/testMocks';
import { RenderContext, renderAppWithAdminContext } from '../../../helpers/testReactTestingUtils';
import { EditionKey } from '../../../types/editions';
import { TaskStatuses, TaskTypes } from '../../../types/tasks';
import { PAGE_SIZE } from '../constants';

+ 1
- 1
server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-it.tsx View File

@@ -19,10 +19,10 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { changePassword } from '../../../api/users';
import { mockAppState } from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../helpers/testSelector';
import { AppState } from '../../../types/appstate';
import ChangeAdminPasswordApp from '../ChangeAdminPasswordApp';
import { DEFAULT_ADMIN_PASSWORD } from '../constants';

+ 1
- 1
server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts View File

@@ -21,6 +21,7 @@ import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import { keyBy, omit, times } from 'lodash';
import { QuerySelector, byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
@@ -31,7 +32,6 @@ import { isDiffMetric } from '../../../helpers/measures';
import { mockComponent } from '../../../helpers/mocks/component';
import { mockMeasure } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { QuerySelector, byLabelText, byRole, byText } from '../../../helpers/testSelector';
import { Component } from '../../../types/types';
import routes from '../routes';


+ 1
- 1
server/sonar-web/src/main/js/apps/coding-rules/__tests__/CustomRule-it.ts View File

@@ -18,10 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import selectEvent from 'react-select-event';
import { byText } from '~sonar-aligned/helpers/testSelector';
import CodingRulesServiceMock from '../../../api/mocks/CodingRulesServiceMock';
import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock';
import { mockLoggedInUser } from '../../../helpers/testMocks';
import { byText } from '../../../helpers/testSelector';
import { SoftwareQuality } from '../../../types/clean-code-taxonomy';
import { getPageObjects, renderCodingRulesApp } from '../utils-tests';


+ 3
- 3
server/sonar-web/src/main/js/apps/coding-rules/utils-tests.tsx View File

@@ -19,15 +19,15 @@
*/
import { waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { Profile } from '../../api/quality-profiles';
import { renderAppRoutes } from '../../helpers/testReactTestingUtils';
import {
byLabelText,
byPlaceholderText,
byRole,
byTestId,
byText,
} from '../../helpers/testSelector';
} from '~sonar-aligned/helpers/testSelector';
import { Profile } from '../../api/quality-profiles';
import { renderAppRoutes } from '../../helpers/testReactTestingUtils';
import {
CleanCodeAttribute,
CleanCodeAttributeCategory,

+ 1
- 1
server/sonar-web/src/main/js/apps/component-measures/__tests__/ComponentMeasures-it.tsx View File

@@ -21,6 +21,7 @@ import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { times } from 'lodash';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
@@ -30,7 +31,6 @@ import { MeasuresServiceMock } from '../../../api/mocks/MeasuresServiceMock';
import { mockComponent } from '../../../helpers/mocks/component';
import { mockMeasure, mockMetric } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byTestId, byText } from '../../../helpers/testSelector';
import { ComponentContextShape } from '../../../types/component';
import { Feature } from '../../../types/features';
import routes from '../routes';

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/Azure-it.tsx View File

@@ -22,12 +22,12 @@ import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { searchAzureRepositories } from '../../../../api/alm-integrations';
import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock';
import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock';
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import CreateProjectPage from '../CreateProjectPage';
import { CreateProjectModes } from '../types';

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx View File

@@ -22,12 +22,12 @@ import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { searchForBitbucketServerRepositories } from '../../../../api/alm-integrations';
import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock';
import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock';
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import CreateProjectPage from '../CreateProjectPage';
import { CreateProjectModes } from '../types';

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloud-it.tsx View File

@@ -22,12 +22,12 @@ import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { searchForBitbucketCloudRepositories } from '../../../../api/alm-integrations';
import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock';
import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock';
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import CreateProjectPage from '../CreateProjectPage';
import { REPOSITORY_PAGE_SIZE } from '../constants';

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/GitHub-it.tsx View File

@@ -22,13 +22,13 @@ import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { getGithubRepositories } from '../../../../api/alm-integrations';
import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock';
import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock';
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
import { mockGitHubRepository } from '../../../../helpers/mocks/alm-integrations';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import CreateProjectPage from '../CreateProjectPage';

jest.mock('../../../../api/alm-integrations');

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx View File

@@ -21,13 +21,13 @@ import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { getGitlabProjects } from '../../../../api/alm-integrations';
import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock';
import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock';
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
import { mockGitlabProject } from '../../../../helpers/mocks/alm-integrations';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import CreateProjectPage from '../CreateProjectPage';
import { CreateProjectModes } from '../types';

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/Manual-it.tsx View File

@@ -20,6 +20,7 @@
import { waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock';
import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock';
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
@@ -28,7 +29,6 @@ import { getNewCodeDefinition } from '../../../../api/newCodeDefinition';
import { mockProject } from '../../../../helpers/mocks/projects';
import { mockAppState, mockCurrentUser } from '../../../../helpers/testMocks';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { NewCodeDefinitionType } from '../../../../types/new-code-definition';
import { Permissions } from '../../../../types/permissions';
import routes from '../../../projects/routes';

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx View File

@@ -20,9 +20,9 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { doesComponentExists } from '../../../../api/components';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import ManualProjectCreate from '../manual/ManualProjectCreate';

const ui = {

+ 1
- 1
server/sonar-web/src/main/js/apps/create/project/__tests__/MonorepoProjectCreate-it.tsx View File

@@ -21,6 +21,7 @@ import { waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import selectEvent from 'react-select-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock';
import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock';
import ComponentsServiceMock from '../../../../api/mocks/ComponentsServiceMock';
@@ -30,7 +31,6 @@ import ProjectManagementServiceMock from '../../../../api/mocks/ProjectsManageme
import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock';
import { mockProject } from '../../../../helpers/mocks/projects';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { AlmKeys } from '../../../../types/alm-settings';
import { Feature } from '../../../../types/features';
import CreateProjectPage from '../CreateProjectPage';

+ 1
- 1
server/sonar-web/src/main/js/apps/groups/__tests__/GroupsApp-it.tsx View File

@@ -20,6 +20,7 @@
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import GithubProvisioningServiceMock from '../../../api/mocks/GithubProvisioningServiceMock';
import GroupMembershipsServiceMock from '../../../api/mocks/GroupMembersipsServiceMock';
import GroupsServiceMock from '../../../api/mocks/GroupsServiceMock';
@@ -27,7 +28,6 @@ import SystemServiceMock from '../../../api/mocks/SystemServiceMock';
import UsersServiceMock from '../../../api/mocks/UsersServiceMock';
import { mockGroup, mockGroupMembership, mockRestUser } from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { Feature } from '../../../types/features';
import { TaskStatuses } from '../../../types/tasks';
import { Provider } from '../../../types/types';

+ 1
- 1
server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx View File

@@ -20,9 +20,9 @@
import { screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { TabKeys } from '../../../components/rules/RuleTabViewer';
import { mockLoggedInUser } from '../../../helpers/testMocks';
import { byRole, byText } from '../../../helpers/testSelector';
import { RestUserDetailed } from '../../../types/users';
import {
branchHandler,

+ 1
- 1
server/sonar-web/src/main/js/apps/issues/__tests__/IssueHeader-it.tsx View File

@@ -18,10 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { WorkspaceContext } from '../../../components/workspace/context';
import { mockIssue, mockRuleDetails } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { Dict } from '../../../types/types';
import IssueHeader from '../components/IssueHeader';


+ 1
- 1
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesSourceViewer-it.tsx View File

@@ -19,7 +19,7 @@
*/
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { byLabelText, byRole } from '../../../helpers/testSelector';
import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector';
import {
componentsHandler,
issuesHandler,

+ 1
- 1
server/sonar-web/src/main/js/apps/issues/components/__tests__/AssigneeSelect-test.tsx View File

@@ -20,11 +20,11 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byLabelText } from '~sonar-aligned/helpers/testSelector';
import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider';
import { mockUserBase } from '../../../../helpers/mocks/users';
import { mockCurrentUser, mockIssue, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText } from '../../../../helpers/testSelector';
import { CurrentUser } from '../../../../types/users';
import AssigneeSelect, { AssigneeSelectProps, MIN_QUERY_LENGTH } from '../AssigneeSelect';


+ 1
- 1
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/IssueSourceViewerHeader-test.tsx View File

@@ -19,13 +19,13 @@
*/
import { screen, waitForElementToBeRemoved } from '@testing-library/react';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext';
import { ComponentContext } from '../../../../app/components/componentContext/ComponentContext';
import { mockComponent } from '../../../../helpers/mocks/component';
import { mockSourceViewerFile } from '../../../../helpers/mocks/sources';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import { IssueSourceViewerHeader, Props } from '../IssueSourceViewerHeader';


+ 1
- 1
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx View File

@@ -20,9 +20,9 @@
import { screen } from '@testing-library/react';
import { range } from 'lodash';
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { mockSourceLine, mockSourceViewerFile } from '../../../../helpers/mocks/sources';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import SnippetViewer, { SnippetViewerProps } from '../SnippetViewer';

beforeEach(() => {

+ 1
- 1
server/sonar-web/src/main/js/apps/issues/issues-subnavigation/__tests__/SubnavigationIssues-it.tsx View File

@@ -20,9 +20,9 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { mockFlowLocation, mockIssue, mockPaging } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { ComponentPropsType } from '../../../../helpers/testUtils';
import { FlowType, Issue } from '../../../../types/types';
import { VISIBLE_LOCATIONS_COLLAPSE } from '../IssueLocationsCrossFile';

+ 1
- 1
server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/SimpleListStyleFacet-test.tsx View File

@@ -19,8 +19,8 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { FCProps } from '../../../../types/misc';
import { SimpleListStyleFacet } from '../SimpleListStyleFacet';


+ 1
- 1
server/sonar-web/src/main/js/apps/issues/test-utils.tsx View File

@@ -20,6 +20,7 @@
import { waitFor } from '@testing-library/react';
import React from 'react';
import { Outlet, Route } from 'react-router-dom';
import { byPlaceholderText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import BranchesServiceMock from '../../api/mocks/BranchesServiceMock';
import ComponentsServiceMock from '../../api/mocks/ComponentsServiceMock';
import IssuesServiceMock from '../../api/mocks/IssuesServiceMock';
@@ -27,7 +28,6 @@ import UsersServiceMock from '../../api/mocks/UsersServiceMock';
import { mockComponent } from '../../helpers/mocks/component';
import { mockCurrentUser } from '../../helpers/testMocks';
import { renderApp, renderAppWithComponentContext } from '../../helpers/testReactTestingUtils';
import { byPlaceholderText, byRole, byTestId, byText } from '../../helpers/testSelector';
import {
CleanCodeAttributeCategory,
SoftwareImpactSeverity,

+ 1
- 1
server/sonar-web/src/main/js/apps/marketplace/__tests__/MarketplaceApp-it.tsx View File

@@ -19,13 +19,13 @@
*/
import userEvent from '@testing-library/user-event';
import React, { useState } from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { NavigationServiceMock } from '../../../api/mocks/NavigationServiceMock';
import PluginsServiceMock from '../../../api/mocks/PluginsServiceMock';
import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock';
import AdminContext from '../../../app/components/AdminContext';
import { mockAppState } from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { AppState } from '../../../types/appstate';
import { EditionKey } from '../../../types/editions';
import { PendingPluginResult } from '../../../types/plugins';

+ 1
- 1
server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-it.tsx View File

@@ -19,6 +19,7 @@
*/
import { screen, waitFor } from '@testing-library/react';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock';
@@ -39,7 +40,6 @@ import { mockAnalysis, mockAnalysisEvent } from '../../../../helpers/mocks/proje
import { mockQualityGateProjectStatus } from '../../../../helpers/mocks/quality-gates';
import { mockLoggedInUser, mockMeasure, mockPaging } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { SoftwareImpactSeverity, SoftwareQuality } from '../../../../types/clean-code-taxonomy';
import { ProjectAnalysisEventCategory } from '../../../../types/project-activity';
import { CaycStatus } from '../../../../types/types';

+ 1
- 1
server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx View File

@@ -19,13 +19,13 @@
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { Status } from '~sonar-aligned/types/common';
import { MetricKey } from '~sonar-aligned/types/metrics';
import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider';
import { mockQualityGate, mockQualityGateStatus } from '../../../../helpers/mocks/quality-gates';
import { mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { CaycStatus } from '../../../../types/types';
import { CurrentUser, NoticeType } from '../../../../types/users';
import QualityGatePanelSection, { QualityGatePanelSectionProps } from '../QualityGatePanelSection';

+ 1
- 1
server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts View File

@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import userEvent from '@testing-library/user-event';
import { byLabelText, byRole, byTestId, byText } from '../../../helpers/testSelector';
import { byLabelText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import {
SoftwareImpactMeasureData,
SoftwareImpactSeverity,

+ 1
- 1
server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/BranchQualityGate-it.tsx View File

@@ -18,13 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector';
import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { mockPullRequest } from '../../../../helpers/mocks/branch-like';
import { mockComponent } from '../../../../helpers/mocks/component';
import { mockQualityGateStatusConditionEnhanced } from '../../../../helpers/mocks/quality-gates';
import { mockMeasureEnhanced, mockMetric } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole } from '../../../../helpers/testSelector';
import { FCProps } from '../../../../types/misc';
import { Status } from '../../utils';
import BranchQualityGate from '../BranchQualityGate';

+ 1
- 1
server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-it.tsx View File

@@ -20,6 +20,7 @@
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
@@ -33,7 +34,6 @@ import {
} from '../../../../helpers/mocks/quality-gates';
import { mockLoggedInUser, mockMeasure, mockMetric } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole } from '../../../../helpers/testSelector';
import { ComponentPropsType } from '../../../../helpers/testUtils';
import { CaycStatus } from '../../../../types/types';
import { NoticeType } from '../../../../types/users';

+ 1
- 1
server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/PermissionTemplatesApp-it.tsx View File

@@ -21,6 +21,7 @@ import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import { uniq } from 'lodash';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import GithubProvisioningServiceMock from '../../../../api/mocks/GithubProvisioningServiceMock';
import PermissionsServiceMock from '../../../../api/mocks/PermissionsServiceMock';
@@ -28,7 +29,6 @@ import { mockPermissionGroup, mockPermissionUser } from '../../../../helpers/moc
import { PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE } from '../../../../helpers/permissions';
import { mockAppState } from '../../../../helpers/testMocks';
import { renderAppWithAdminContext } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import { Permissions } from '../../../../types/permissions';
import { PermissionGroup, PermissionUser } from '../../../../types/types';

+ 1
- 1
server/sonar-web/src/main/js/apps/permissions/test-utils.ts View File

@@ -20,8 +20,8 @@
import { waitFor } from '@testing-library/react';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import selectEvent from 'react-select-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { Visibility } from '~sonar-aligned/types/component';
import { byRole, byText } from '../../helpers/testSelector';
import { Permissions } from '../../types/permissions';

export function getPageObject(user: UserEvent) {

+ 1
- 1
server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx View File

@@ -22,6 +22,7 @@ import userEvent from '@testing-library/user-event';
import { keyBy, times } from 'lodash';
import React from 'react';
import { Route } from 'react-router-dom';
import { byLabelText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import ApplicationServiceMock from '../../../../api/mocks/ApplicationServiceMock';
@@ -39,7 +40,6 @@ import {
import { get } from '../../../../helpers/storage';
import { mockMetric } from '../../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byTestId, byText } from '../../../../helpers/testSelector';
import {
ApplicationAnalysisEventCategory,
GraphType,

+ 1
- 1
server/sonar-web/src/main/js/apps/projectBranches/__tests__/ProjectBranchesApp-it.tsx View File

@@ -20,13 +20,13 @@
import { within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock';
import { ComponentContext } from '../../../app/components/componentContext/ComponentContext';
import { mockComponent } from '../../../helpers/mocks/component';
import { mockAppState } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole } from '../../../helpers/testSelector';
import { AppState } from '../../../types/appstate';
import { Feature } from '../../../types/features';
import { SettingsKey } from '../../../types/settings';

+ 1
- 1
server/sonar-web/src/main/js/apps/projectDeletion/__tests__/ProjectDeletionApp-it.tsx View File

@@ -19,13 +19,13 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { deleteApplication } from '../../../api/application';
import { deletePortfolio, deleteProject } from '../../../api/project-management';
import { ComponentContext } from '../../../app/components/componentContext/ComponentContext';
import { mockComponent } from '../../../helpers/mocks/component';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { ComponentContextShape } from '../../../types/component';
import { Component } from '../../../types/types';
import App from '../App';

+ 1
- 1
server/sonar-web/src/main/js/apps/projectDump/__tests__/ProjectDumpApp-it.tsx View File

@@ -19,11 +19,11 @@
*/
import { act, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import ComputeEngineServiceMock from '../../../api/mocks/ComputeEngineServiceMock';
import { ProjectDumpServiceMock } from '../../../api/mocks/ProjectDumpServiceMock';
import { mockComponent } from '../../../helpers/mocks/component';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { Feature } from '../../../types/features';
import { TaskStatuses, TaskTypes } from '../../../types/tasks';
import routes from '../routes';

+ 1
- 1
server/sonar-web/src/main/js/apps/projectInformation/__tests__/ProjectInformationApp-it.tsx View File

@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { screen } from '@testing-library/react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
@@ -30,7 +31,6 @@ import ProjectLinksServiceMock from '../../../api/mocks/ProjectLinksServiceMock'
import { mockComponent } from '../../../helpers/mocks/component';
import { mockCurrentUser, mockLoggedInUser, mockMeasure } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import { Component } from '../../../types/types';
import { CurrentUser } from '../../../types/users';
import routes from '../routes';

+ 1
- 1
server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/__tests__/RegulatoryReport-it.tsx View File

@@ -20,10 +20,10 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { BranchLike } from '../../../../types/branch-like';
import RegulatoryReport from '../RegulatoryReport';


+ 1
- 1
server/sonar-web/src/main/js/apps/projectKey/__tests__/ProjectKeyApp-it.tsx View File

@@ -22,9 +22,9 @@ import userEvent from '@testing-library/user-event';
import { last } from 'lodash';
import React from 'react';
import { Route } from 'react-router-dom';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import ProjectKeyApp from '../ProjectKeyApp';

const componentsMock = new ComponentsServiceMock();

+ 1
- 1
server/sonar-web/src/main/js/apps/projectLinks/__tests__/ProjectLinksApp-it.tsx View File

@@ -21,10 +21,10 @@ import userEvent from '@testing-library/user-event';
import { last } from 'lodash';
import React from 'react';
import { Route } from 'react-router-dom';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import ProjectLinksServiceMock from '../../../api/mocks/ProjectLinksServiceMock';
import { mockComponent } from '../../../helpers/mocks/component';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import ProjectLinksApp from '../ProjectLinksApp';

const componentsMock = new ProjectLinksServiceMock();

+ 1
- 1
server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/ProjectNewCodeDefinitionApp-it.tsx View File

@@ -20,6 +20,7 @@
import userEvent from '@testing-library/user-event';
import { last } from 'lodash';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { MessageTypes } from '../../../../api/messages';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import MessagesServiceMock from '../../../../api/mocks/MessagesServiceMock';
@@ -33,7 +34,6 @@ import {
RenderContext,
renderAppWithComponentContext,
} from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import { NewCodeDefinitionType } from '../../../../types/new-code-definition';
import routes from '../../routes';

+ 1
- 1
server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-it.tsx View File

@@ -22,6 +22,7 @@ import { waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { addGlobalErrorMessage, addGlobalSuccessMessage } from 'design-system';
import selectEvent from 'react-select-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { QualityGatesServiceMock } from '../../../api/mocks/QualityGatesServiceMock';
import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization';
import { mockComponent } from '../../../helpers/mocks/component';
@@ -29,7 +30,6 @@ import {
RenderContext,
renderAppWithComponentContext,
} from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { Component } from '../../../types/types';
import routes from '../routes';


+ 1
- 1
server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/projectQualityProfilesApp-it.tsx View File

@@ -20,6 +20,7 @@
import userEvent from '@testing-library/user-event';
import { addGlobalSuccessMessage } from 'design-system';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import {
ProfileProject,
associateProject,
@@ -32,7 +33,6 @@ import {
RenderContext,
renderAppWithComponentContext,
} from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../helpers/testSelector';
import { Component } from '../../../types/types';
import routes from '../routes';


+ 1
- 1
server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx View File

@@ -21,13 +21,13 @@ import { screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { AutoSizerProps } from 'react-virtualized';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import { ProjectsServiceMock } from '../../../../api/mocks/ProjectsServiceMock';
import { save } from '../../../../helpers/storage';
import { mockAppState, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { Dict } from '../../../../types/types';
import projectRoutes from '../../routes';
import { LS_PROJECTS_SORT, LS_PROJECTS_VIEW } from '../AllProjects';

+ 1
- 1
server/sonar-web/src/main/js/apps/projects/components/__tests__/CreateApplication-test.tsx View File

@@ -19,13 +19,13 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { queryToSearchString } from '~sonar-aligned/helpers/urls';
import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { createApplication } from '../../../../api/application';
import { getComponentNavigation } from '../../../../api/navigation';
import { mockAppState, mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { FCProps } from '../../../../types/misc';
import { LoggedInUser } from '../../../../types/users';
import { ApplicationCreation } from '../ApplicationCreation';

+ 1
- 1
server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx View File

@@ -19,12 +19,12 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getAlmSettings } from '../../../../api/alm-settings';
import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider';
import { mockAppState, mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { AlmKeys } from '../../../../types/alm-settings';
import { FCProps } from '../../../../types/misc';
import { CurrentUser } from '../../../../types/users';

+ 1
- 1
server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx View File

@@ -20,6 +20,7 @@
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import selectEvent from 'react-select-event';
import { byPlaceholderText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import GithubProvisioningServiceMock from '../../../api/mocks/GithubProvisioningServiceMock';
import PermissionsServiceMock from '../../../api/mocks/PermissionsServiceMock';
@@ -29,7 +30,6 @@ import { mockComponent } from '../../../helpers/mocks/component';
import { mockProject } from '../../../helpers/mocks/projects';
import { mockAppState, mockCurrentUser } from '../../../helpers/testMocks';
import { RenderContext, renderAppWithAdminContext } from '../../../helpers/testReactTestingUtils';
import { byPlaceholderText, byRole, byText } from '../../../helpers/testSelector';
import { AppState } from '../../../types/appstate';
import { Feature } from '../../../types/features';
import { Permissions } from '../../../types/permissions';

+ 1
- 1
server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx View File

@@ -20,13 +20,13 @@
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import selectEvent from 'react-select-event';
import { byRole, byTestId } from '~sonar-aligned/helpers/testSelector';
import { QualityGatesServiceMock } from '../../../../api/mocks/QualityGatesServiceMock';
import UsersServiceMock from '../../../../api/mocks/UsersServiceMock';
import { searchProjects, searchUsers } from '../../../../api/quality-gates';
import { dismissNotice } from '../../../../api/users';
import { mockLoggedInUser } from '../../../../helpers/testMocks';
import { RenderContext, renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byRole, byTestId } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import { CaycStatus } from '../../../../types/types';
import { NoticeType } from '../../../../types/users';

+ 1
- 1
server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx View File

@@ -20,9 +20,9 @@
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import selectEvent from 'react-select-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import QualityProfilesServiceMock from '../../../api/mocks/QualityProfilesServiceMock';
import { renderAppRoutes } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import routes from '../routes';

jest.mock('../../../api/quality-profiles');

+ 1
- 1
server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfilesApp-it.tsx View File

@@ -20,11 +20,11 @@
import { getByText, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import selectEvent from 'react-select-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import QualityProfilesServiceMock from '../../../api/mocks/QualityProfilesServiceMock';
import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock';
import { mockPaging, mockRule } from '../../../helpers/testMocks';
import { renderAppRoutes } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import routes from '../routes';

jest.mock('../../../api/quality-profiles');

+ 1
- 1
server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-it.tsx View File

@@ -19,10 +19,10 @@
*/
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import QualityProfilesServiceMock from '../../../../api/mocks/QualityProfilesServiceMock';
import { mockQualityProfileChangelogEvent } from '../../../../helpers/testMocks';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import routes from '../../routes';

jest.mock('../../../../api/quality-profiles');

+ 1
- 1
server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-it.tsx View File

@@ -21,6 +21,7 @@ import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { Route } from 'react-router-dom';
import { byDisplayValue, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import CodingRulesServiceMock from '../../../api/mocks/CodingRulesServiceMock';
@@ -32,7 +33,6 @@ import { openHotspot, probeSonarLintServers } from '../../../helpers/sonarlint';
import { get, save } from '../../../helpers/storage';
import { mockLoggedInUser } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byDisplayValue, byRole, byTestId, byText } from '../../../helpers/testSelector';
import { ComponentContextShape } from '../../../types/component';
import SecurityHotspotsApp from '../SecurityHotspotsApp';
import useStickyDetection from '../hooks/useStickyDetection';

+ 1
- 1
server/sonar-web/src/main/js/apps/security-hotspots/hooks/__tests__/useStickyDetection-test.tsx View File

@@ -19,8 +19,8 @@
*/
import { act } from '@testing-library/react';
import React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { mockIntersectionObserver } from '../../../../helpers/testUtils';
import useStickyDetection from '../useStickyDetection';


+ 1
- 1
server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx View File

@@ -22,12 +22,12 @@ import { waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { addGlobalErrorMessage } from 'design-system';
import * as React from 'react';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { getLoginMessage } from '../../../../api/settings';
import { getIdentityProviders } from '../../../../api/users';
import { getBaseUrl } from '../../../../helpers/system';
import { mockLocation } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { LoginContainer } from '../LoginContainer';

jest.mock('../../../../helpers/system', () => ({

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/__tests__/AnalysisScope-test.tsx View File

@@ -19,12 +19,12 @@
*/
import { uniq } from 'lodash';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock, {
DEFAULT_DEFINITIONS_MOCK,
} from '../../../../api/mocks/SettingsServiceMock';
import { mockComponent } from '../../../../helpers/mocks/component';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { AdditionalCategoryComponentProps } from '../AdditionalCategories';
import { AnalysisScope } from '../AnalysisScope';


+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-it.tsx View File

@@ -22,13 +22,13 @@ import userEvent from '@testing-library/user-event';
import { last } from 'lodash';
import React from 'react';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock, {
DEFAULT_DEFINITIONS_MOCK,
} from '../../../../api/mocks/SettingsServiceMock';
import { mockComponent } from '../../../../helpers/mocks/component';
import { mockDefinition } from '../../../../helpers/mocks/settings';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { ExtendedSettingDefinition, SettingType, SettingValue } from '../../../../types/settings';
import { Component } from '../../../../types/types';
import Definition from '../Definition';

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-it.tsx View File

@@ -21,12 +21,12 @@ import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { last } from 'lodash';
import React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock, {
DEFAULT_DEFINITIONS_MOCK,
} from '../../../../api/mocks/SettingsServiceMock';
import { mockComponent } from '../../../../helpers/mocks/component';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { AdditionalCategoryComponentProps } from '../AdditionalCategories';
import Languages from '../Languages';


+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodeDefinition-it.tsx View File

@@ -19,11 +19,11 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { MessageTypes } from '../../../../api/messages';
import MessagesServiceMock from '../../../../api/mocks/MessagesServiceMock';
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { NewCodeDefinitionType } from '../../../../types/new-code-definition';
import NewCodeDefinition from '../NewCodeDefinition';


+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/__tests__/SettingsApp-it.tsx View File

@@ -22,6 +22,7 @@ import userEvent from '@testing-library/user-event';
import React from 'react';
import { Route } from 'react-router-dom';
import selectEvent from 'react-select-event';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock';
import { KeyboardKeys } from '../../../../helpers/keycodes';
import { mockComponent } from '../../../../helpers/mocks/component';
@@ -30,7 +31,6 @@ import {
renderAppWithComponentContext,
RenderContext,
} from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import { Feature } from '../../../../types/features';
import { Component } from '../../../../types/types';
import routes from '../../routes';

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx View File

@@ -19,9 +19,9 @@
*/
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../../helpers/testSelector';
import { AlmKeys } from '../../../../../types/alm-settings';
import AlmBindingDefinitionForm, {
AlmBindingDefinitionFormProps,

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx View File

@@ -20,11 +20,11 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock';
import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../../helpers/testSelector';
import { AlmKeys } from '../../../../../types/alm-settings';
import { Feature } from '../../../../../types/features';
import { SettingsKey } from '../../../../../types/settings';

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Bitbucket-it.tsx View File

@@ -19,11 +19,11 @@
*/
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock';
import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext';
import { definitions } from '../../../../../helpers/mocks/definitions-list';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byRole, byTestId, byText } from '../../../../../helpers/testSelector';
import { AlmKeys } from '../../../../../types/alm-settings';
import { Feature } from '../../../../../types/features';
import Authentication from '../Authentication';

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Github-it.tsx View File

@@ -21,6 +21,7 @@ import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import React from 'react';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import ComputeEngineServiceMock from '../../../../../api/mocks/ComputeEngineServiceMock';
import GithubProvisioningServiceMock from '../../../../../api/mocks/GithubProvisioningServiceMock';
import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock';
@@ -28,7 +29,6 @@ import SystemServiceMock from '../../../../../api/mocks/SystemServiceMock';
import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext';
import { definitions } from '../../../../../helpers/mocks/definitions-list';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../../helpers/testSelector';
import { AlmKeys } from '../../../../../types/alm-settings';
import { Feature } from '../../../../../types/features';
import { GitHubProvisioningStatus } from '../../../../../types/provisioning';

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Gitlab-it.tsx View File

@@ -19,6 +19,7 @@
*/
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import ComputeEngineServiceMock from '../../../../../api/mocks/ComputeEngineServiceMock';
import GitlabProvisioningServiceMock from '../../../../../api/mocks/GitlabProvisioningServiceMock';
import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock';
@@ -27,7 +28,6 @@ import { AvailableFeaturesContext } from '../../../../../app/components/availabl
import { mockGitlabConfiguration } from '../../../../../helpers/mocks/alm-integrations';
import { definitions } from '../../../../../helpers/mocks/definitions-list';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../../helpers/testSelector';
import { AlmKeys } from '../../../../../types/alm-settings';
import { Feature } from '../../../../../types/features';
import { ProvisioningType } from '../../../../../types/provisioning';

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Scim-it.tsx View File

@@ -21,13 +21,13 @@ import { waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import ScimProvisioningServiceMock from '../../../../../api/mocks/ScimProvisioningServiceMock';
import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock';
import SystemServiceMock from '../../../../../api/mocks/SystemServiceMock';
import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext';
import { definitions } from '../../../../../helpers/mocks/definitions-list';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../../helpers/testSelector';
import { Feature } from '../../../../../types/features';
import Authentication from '../Authentication';


+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-it.tsx View File

@@ -20,6 +20,7 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import GithubProvisioningServiceMock from '../../../../../api/mocks/GithubProvisioningServiceMock';
import GitlabProvisioningServiceMock from '../../../../../api/mocks/GitlabProvisioningServiceMock';
import ScimProvisioningServiceMock from '../../../../../api/mocks/ScimProvisioningServiceMock';
@@ -28,7 +29,6 @@ import SystemServiceMock from '../../../../../api/mocks/SystemServiceMock';
import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext';
import { definitions } from '../../../../../helpers/mocks/definitions-list';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../../helpers/testSelector';
import { Feature } from '../../../../../types/features';
import Authentication from '../Authentication';


+ 1
- 1
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx View File

@@ -20,12 +20,12 @@
import userEvent from '@testing-library/user-event';
import React from 'react';
import selectEvent from 'react-select-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import CurrentUserContextProvider from '../../../../../app/components/current-user/CurrentUserContextProvider';
import { mockComponent } from '../../../../../helpers/mocks/component';
import { mockCurrentUser } from '../../../../../helpers/testMocks';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../../helpers/testSelector';
import {
AlmKeys,
ProjectAlmBindingConfigurationErrorScope,

+ 1
- 1
server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-it.tsx View File

@@ -19,9 +19,9 @@
*/
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byRole } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
import EncryptionApp from '../EncryptionApp';

let settingsMock: SettingsServiceMock;

+ 1
- 1
server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx View File

@@ -20,9 +20,9 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { first } from 'lodash';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import SystemServiceMock from '../../../../api/mocks/SystemServiceMock';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { AppState } from '../../../../types/appstate';
import routes from '../../routes';
import { LogsLevels } from '../../utils';

+ 1
- 1
server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx View File

@@ -17,12 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock';
import UserTokensMock from '../../../../api/mocks/UserTokensMock';
import handleRequiredAuthentication from '../../../../helpers/handleRequiredAuthentication';
import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { Permissions } from '../../../../types/permissions';
import routes from '../../routes';


+ 1
- 1
server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-it.tsx View File

@@ -21,6 +21,7 @@ import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import selectEvent from 'react-select-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import GithubProvisioningServiceMock from '../../../api/mocks/GithubProvisioningServiceMock';
import GroupMembershipsServiceMock from '../../../api/mocks/GroupMembersipsServiceMock';
@@ -37,7 +38,6 @@ import {
mockRestUser,
} from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../helpers/testSelector';
import { Feature } from '../../../types/features';
import { TaskStatuses } from '../../../types/tasks';
import { Provider } from '../../../types/types';

+ 1
- 1
server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx View File

@@ -20,9 +20,9 @@
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector';
import WebApiServiceMock from '../../../api/mocks/WebApiServiceMock';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byRole, byTestId, byText } from '../../../helpers/testSelector';
import WebApiApp from '../WebApiApp';

const handler = new WebApiServiceMock();

+ 1
- 1
server/sonar-web/src/main/js/apps/web-api/__tests__/WebApi-it.tsx View File

@@ -18,9 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import userEvent from '@testing-library/user-event';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import WebApiServiceMock from '../../../api/mocks/WebApiServiceMock';
import { renderAppRoutes } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../helpers/testSelector';
import routes from '../routes';

jest.mock('../../../components/common/ScreenPositionHelper');

+ 1
- 1
server/sonar-web/src/main/js/apps/web-api/components/__tests__/Actions-test.tsx View File

@@ -19,9 +19,9 @@
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { mockAction, mockDomain, mockParam } from '../../../../helpers/mocks/webapi';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import Action from '../Action';

jest.mock('../../../../api/web-api', () => ({

+ 1
- 1
server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx View File

@@ -20,11 +20,11 @@
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector';
import WebhooksMock from '../../../../api/mocks/WebhooksMock';
import { mockComponent } from '../../../../helpers/mocks/component';
import { mockWebhook } from '../../../../helpers/mocks/webhook';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { App, AppProps } from '../App';
import { WEBHOOKS_LIMIT } from '../PageActions';


+ 1
- 1
server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewer-it.tsx View File

@@ -20,6 +20,7 @@
import { queryHelpers, screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { byLabelText } from '~sonar-aligned/helpers/testSelector';
import { MetricKey } from '~sonar-aligned/types/metrics';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import IssuesServiceMock from '../../../api/mocks/IssuesServiceMock';
@@ -29,7 +30,6 @@ import { isDiffMetric } from '../../../helpers/measures';
import { HttpStatus } from '../../../helpers/request';
import { mockIssue, mockLoggedInUser, mockMeasure } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byLabelText } from '../../../helpers/testSelector';
import { RestUserDetailed } from '../../../types/users';
import SourceViewer, { Props } from '../SourceViewer';
import loadIssues from '../helpers/loadIssues';

+ 0
- 0
server/sonar-web/src/main/js/components/activity-graph/__tests__/ActivityGraph-it.tsx View File


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

Loading…
Cancel
Save