@@ -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'; |
@@ -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'; |
@@ -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', () => { |
@@ -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'; |
@@ -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 () => { |
@@ -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'; | |||
@@ -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', () => ({ |
@@ -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', () => ({ |
@@ -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', () => ({ |
@@ -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', () => { |
@@ -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', () => ({ |
@@ -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'; |
@@ -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'; |
@@ -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', () => ({ |
@@ -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 { |
@@ -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'; |
@@ -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'; | |||
@@ -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', () => { |
@@ -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'; |
@@ -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'; | |||
@@ -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'; | |||
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; | |||
@@ -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'; | |||
@@ -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, |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'); |
@@ -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'; |
@@ -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'; |
@@ -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 = { |
@@ -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'; |
@@ -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'; |
@@ -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, |
@@ -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'; | |||
@@ -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, |
@@ -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'; | |||
@@ -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'; | |||
@@ -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(() => { |
@@ -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'; |
@@ -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'; | |||
@@ -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, |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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, |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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) { |
@@ -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, |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; | |||
@@ -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(); |
@@ -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(); |
@@ -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'; |
@@ -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'; | |||
@@ -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'; | |||
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'); |
@@ -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'); |
@@ -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'); |
@@ -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'; |
@@ -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'; | |||
@@ -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', () => ({ |
@@ -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'; | |||
@@ -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'; |
@@ -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'; | |||
@@ -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'; | |||
@@ -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'; |
@@ -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, |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; |
@@ -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'; | |||
@@ -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'; | |||
@@ -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, |
@@ -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; |
@@ -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'; |
@@ -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'; | |||
@@ -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'; |
@@ -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(); |
@@ -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'); |
@@ -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', () => ({ |
@@ -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'; | |||
@@ -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'; |