diff options
author | Jeremy Davis <jeremy.davis@sonarsource.com> | 2022-06-13 11:39:21 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-06-28 20:02:53 +0000 |
commit | 54732569670fc345367062d5b20fcca83d9f7692 (patch) | |
tree | 8a3d86a9b76fbc056b74ac68ff8b38db9cee2cb1 /server/sonar-web/src/main/js/apps/create | |
parent | 26675093303e38f1973f3ee9da5750aeeb2a5a5f (diff) | |
download | sonarqube-54732569670fc345367062d5b20fcca83d9f7692.tar.gz sonarqube-54732569670fc345367062d5b20fcca83d9f7692.zip |
SONAR-16045 Migrate react-router to 6.3.0
Co-authored-by: Jeremy Davis <jeremy.davis@sonarsource.com>
Co-authored-by: Guillaume Péoc'h <guillaume.peoch@sonarsource.com>
Diffstat (limited to 'server/sonar-web/src/main/js/apps/create')
25 files changed, 70 insertions, 163 deletions
diff --git a/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx b/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx index 7fd11744ddf..ec51beea670 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx @@ -20,7 +20,7 @@ import classNames from 'classnames'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { colors } from '../../../app/theme'; import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion'; import ListFooter from '../../../components/controls/ListFooter'; @@ -29,7 +29,7 @@ import CheckIcon from '../../../components/icons/CheckIcon'; import { Alert } from '../../../components/ui/Alert'; import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { translate } from '../../../helpers/l10n'; -import { getProjectUrl } from '../../../helpers/urls'; +import { getProjectUrl, queryToSearch } from '../../../helpers/urls'; import { AzureProject, AzureRepository } from '../../../types/alm-integration'; import { CreateProjectModes } from './types'; @@ -110,7 +110,7 @@ export default function AzureProjectAccordion(props: AzureProjectAccordionProps) <Link to={{ pathname: '/projects/create', - query: { mode: CreateProjectModes.AzureDevOps, resetPat: 1 } + search: queryToSearch({ mode: CreateProjectModes.AzureDevOps, resetPat: 1 }) }}> {translate('onboarding.create_project.update_your_token')} </Link> diff --git a/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreate.tsx index 9084102b075..963e3dd32c8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreate.tsx @@ -19,7 +19,6 @@ */ import { groupBy } from 'lodash'; import * as React from 'react'; -import { WithRouterProps } from 'react-router'; import { checkPersonalAccessTokenIsValid, getAzureProjects, @@ -28,16 +27,19 @@ import { searchAzureRepositories, setAlmPersonalAccessToken } from '../../../api/alm-integrations'; +import { Location, Router } from '../../../components/hoc/withRouter'; import { AzureProject, AzureRepository } from '../../../types/alm-integration'; import { AlmSettingsInstance } from '../../../types/alm-settings'; import { Dict } from '../../../types/types'; import AzureCreateProjectRenderer from './AzureProjectCreateRenderer'; -interface Props extends Pick<WithRouterProps, 'location' | 'router'> { +interface Props { canAdmin: boolean; loadingBindings: boolean; onProjectCreate: (projectKey: string) => void; settings: AlmSettingsInstance[]; + location: Location; + router: Router; } interface State { diff --git a/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx index 51e3911aa03..c4965a8dca7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { Button } from '../../../components/controls/buttons'; import SearchBox from '../../../components/controls/SearchBox'; import { Alert } from '../../../components/ui/Alert'; diff --git a/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx b/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx index 0bbea571367..19f38414288 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx @@ -19,10 +19,11 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import ListFooter from '../../../components/controls/ListFooter'; import { Alert } from '../../../components/ui/Alert'; import { translate } from '../../../helpers/l10n'; +import { queryToSearch } from '../../../helpers/urls'; import { AzureProject, AzureRepository } from '../../../types/alm-integration'; import { Dict } from '../../../types/types'; import AzureProjectAccordion from './AzureProjectAccordion'; @@ -73,7 +74,7 @@ export default function AzureProjectsList(props: AzureProjectsListProps) { <Link to={{ pathname: '/projects/create', - query: { mode: CreateProjectModes.AzureDevOps, resetPat: 1 } + search: queryToSearch({ mode: CreateProjectModes.AzureDevOps, resetPat: 1 }) }}> {translate('onboarding.create_project.update_your_token')} </Link> diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreate.tsx index cd1274896c7..74fe4a49838 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreate.tsx @@ -18,21 +18,23 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { WithRouterProps } from 'react-router'; import { importBitbucketCloudRepository, searchForBitbucketCloudRepositories } from '../../../api/alm-integrations'; +import { Location, Router } from '../../../components/hoc/withRouter'; import { BitbucketCloudRepository } from '../../../types/alm-integration'; import { AlmSettingsInstance } from '../../../types/alm-settings'; import { Paging } from '../../../types/types'; import BitbucketCloudProjectCreateRenderer from './BitbucketCloudProjectCreateRender'; -interface Props extends Pick<WithRouterProps, 'location' | 'router'> { +interface Props { canAdmin: boolean; settings: AlmSettingsInstance[]; loadingBindings: boolean; onProjectCreate: (projectKey: string) => void; + location: Location; + router: Router; } interface State { diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx index 442ac14aee0..03cb73fc033 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { Button } from '../../../components/controls/buttons'; import SearchBox from '../../../components/controls/SearchBox'; import Tooltip from '../../../components/controls/Tooltip'; @@ -30,7 +30,7 @@ import { Alert } from '../../../components/ui/Alert'; import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { formatMeasure } from '../../../helpers/measures'; -import { getProjectUrl } from '../../../helpers/urls'; +import { getProjectUrl, queryToSearch } from '../../../helpers/urls'; import { BitbucketCloudRepository } from '../../../types/alm-integration'; import { ComponentQualifier } from '../../../types/component'; import { CreateProjectModes } from './types'; @@ -72,7 +72,7 @@ export default function BitbucketCloudSearchForm(props: BitbucketCloudSearchForm <Link to={{ pathname: '/projects/create', - query: { mode: CreateProjectModes.BitbucketCloud, resetPat: 1 } + search: queryToSearch({ mode: CreateProjectModes.BitbucketCloud, resetPat: 1 }) }}> {translate('onboarding.create_project.update_your_token')} </Link> diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx index cdbafd18724..d1a741729a7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx @@ -19,10 +19,11 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import SearchBox from '../../../components/controls/SearchBox'; import { Alert } from '../../../components/ui/Alert'; import { translate } from '../../../helpers/l10n'; +import { queryToSearch } from '../../../helpers/urls'; import { BitbucketProject, BitbucketProjectRepositories, @@ -64,7 +65,7 @@ export default function BitbucketImportRepositoryForm(props: BitbucketImportRepo <Link to={{ pathname: '/projects/create', - query: { mode: CreateProjectModes.BitbucketServer, resetPat: 1 } + search: queryToSearch({ mode: CreateProjectModes.BitbucketServer, resetPat: 1 }) }}> {translate('onboarding.create_project.update_your_token')} </Link> diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx index 9f220c1b39f..b1c05705ec8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx @@ -20,14 +20,14 @@ import classNames from 'classnames'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { colors } from '../../../app/theme'; import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion'; import Radio from '../../../components/controls/Radio'; import CheckIcon from '../../../components/icons/CheckIcon'; import { Alert } from '../../../components/ui/Alert'; import { translate, translateWithParameters } from '../../../helpers/l10n'; -import { getProjectUrl } from '../../../helpers/urls'; +import { getProjectUrl, queryToSearch } from '../../../helpers/urls'; import { BitbucketProject, BitbucketRepository } from '../../../types/alm-integration'; import { CreateProjectModes } from './types'; @@ -85,7 +85,10 @@ export default function BitbucketProjectAccordion(props: BitbucketProjectAccordi <Link to={{ pathname: '/projects/create', - query: { mode: CreateProjectModes.BitbucketServer, resetPat: 1 } + search: queryToSearch({ + mode: CreateProjectModes.BitbucketServer, + resetPat: 1 + }) }}> {translate('onboarding.create_project.update_your_token')} </Link> diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreate.tsx index ba764483aa7..5c56e0683c5 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreate.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { WithRouterProps } from 'react-router'; import { getBitbucketServerProjects, getBitbucketServerRepositories, importBitbucketServerProject, searchForBitbucketServerRepositories } from '../../../api/alm-integrations'; +import { Location, Router } from '../../../components/hoc/withRouter'; import { BitbucketProject, BitbucketProjectRepositories, @@ -34,11 +34,13 @@ import { AlmSettingsInstance } from '../../../types/alm-settings'; import BitbucketCreateProjectRenderer from './BitbucketProjectCreateRenderer'; import { DEFAULT_BBS_PAGE_SIZE } from './constants'; -interface Props extends Pick<WithRouterProps, 'location' | 'router'> { +interface Props { canAdmin: boolean; bitbucketSettings: AlmSettingsInstance[]; loadingBindings: boolean; onProjectCreate: (projectKey: string) => void; + location: Location; + router: Router; } interface State { diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx index 1c793becabc..384f7906a66 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; -import { WithRouterProps } from 'react-router'; import { getAlmSettings } from '../../../api/alm-settings'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget'; +import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import { translate } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; @@ -38,8 +38,10 @@ import ManualProjectCreate from './ManualProjectCreate'; import './style.css'; import { CreateProjectModes } from './types'; -interface Props extends Pick<WithRouterProps, 'router' | 'location'> { +interface Props { appState: AppState; + location: Location; + router: Router; } interface State { @@ -270,4 +272,4 @@ export class CreateProjectPage extends React.PureComponent<Props, State> { } } -export default withAppStateContext(CreateProjectPage); +export default withRouter(withAppStateContext(CreateProjectPage)); diff --git a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx index 12e69d5816d..2871ac8eda8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx @@ -19,24 +19,26 @@ */ import { debounce } from 'lodash'; import * as React from 'react'; -import { WithRouterProps } from 'react-router'; import { getGithubClientId, getGithubOrganizations, getGithubRepositories, importGithubRepository } from '../../../api/alm-integrations'; +import { Location, Router } from '../../../components/hoc/withRouter'; import { getHostUrl } from '../../../helpers/urls'; import { GithubOrganization, GithubRepository } from '../../../types/alm-integration'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import { Paging } from '../../../types/types'; import GitHubProjectCreateRenderer from './GitHubProjectCreateRenderer'; -interface Props extends Pick<WithRouterProps, 'location' | 'router'> { +interface Props { canAdmin: boolean; loadingBindings: boolean; onProjectCreate: (projectKey: string) => void; settings: AlmSettingsInstance[]; + location: Location; + router: Router; } interface State { diff --git a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx index e801b649039..7fbfedb3606 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { colors } from '../../../app/theme'; import { Button } from '../../../components/controls/buttons'; import ListFooter from '../../../components/controls/ListFooter'; diff --git a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreate.tsx index 6dfa1f8d974..f1dab9ad7be 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreate.tsx @@ -18,18 +18,20 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { WithRouterProps } from 'react-router'; import { getGitlabProjects, importGitlabProject } from '../../../api/alm-integrations'; +import { Location, Router } from '../../../components/hoc/withRouter'; import { GitlabProject } from '../../../types/alm-integration'; import { AlmSettingsInstance } from '../../../types/alm-settings'; import { Paging } from '../../../types/types'; import GitlabProjectCreateRenderer from './GitlabProjectCreateRenderer'; -interface Props extends Pick<WithRouterProps, 'location' | 'router'> { +interface Props { canAdmin: boolean; loadingBindings: boolean; onProjectCreate: (projectKey: string) => void; settings: AlmSettingsInstance[]; + location: Location; + router: Router; } interface State { diff --git a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx index 5726f4b4c23..bdbcc5f93be 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { Button } from '../../../components/controls/buttons'; import ListFooter from '../../../components/controls/ListFooter'; import SearchBox from '../../../components/controls/SearchBox'; @@ -30,7 +30,7 @@ import QualifierIcon from '../../../components/icons/QualifierIcon'; import { Alert } from '../../../components/ui/Alert'; import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { translate } from '../../../helpers/l10n'; -import { getProjectUrl } from '../../../helpers/urls'; +import { getProjectUrl, queryToSearch } from '../../../helpers/urls'; import { GitlabProject } from '../../../types/alm-integration'; import { ComponentQualifier } from '../../../types/component'; import { Paging } from '../../../types/types'; @@ -69,7 +69,7 @@ export default function GitlabProjectSelectionForm(props: GitlabProjectSelection <Link to={{ pathname: '/projects/create', - query: { mode: CreateProjectModes.GitLab, resetPat: 1 } + search: queryToSearch({ mode: CreateProjectModes.GitLab, resetPat: 1 }) }}> {translate('onboarding.create_project.update_your_token')} </Link> diff --git a/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx b/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx index bed32e27e6f..821d2a1ed7f 100644 --- a/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Link } from 'react-router'; +import { Link } from 'react-router-dom'; import { Alert } from '../../../components/ui/Alert'; import { translate } from '../../../helpers/l10n'; import { getGlobalSettingsUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectAccordion-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectAccordion-test.tsx.snap index 75ce5ede02c..85fc0eecdd7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectAccordion-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectAccordion-test.tsx.snap @@ -151,16 +151,11 @@ exports[`should render correctly: search results 1`] = ` className="little-spacer-bottom text-ellipsis" > <Link - onlyActiveOnIndex={false} - style={Object {}} title="SQ Name" to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "sq-key", - }, + "search": "?id=sq-key", } } > @@ -236,16 +231,11 @@ exports[`should render correctly: with repositories 1`] = ` className="little-spacer-bottom text-ellipsis" > <Link - onlyActiveOnIndex={false} - style={Object {}} title="SQ Name" to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "sq-key", - }, + "search": "?id=sq-key", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectCreateRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectCreateRenderer-test.tsx.snap index dfcbf392e44..d39ae29d2d9 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectCreateRenderer-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectCreateRenderer-test.tsx.snap @@ -165,14 +165,10 @@ exports[`should render correctly: setting missing url, admin 1`] = ` Object { "alm": "onboarding.alm.azure", "url": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/admin/settings", - "query": Object { - "category": "almintegration", - }, + "search": "?category=almintegration", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectsList-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectsList-test.tsx.snap index f26d19c132b..271f606cb68 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectsList-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectsList-test.tsx.snap @@ -36,15 +36,10 @@ exports[`should render correctly: empty 1`] = ` values={ Object { "link": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/projects/create", - "query": Object { - "mode": "azure", - "resetPat": 1, - }, + "search": "?mode=azure&resetPat=1", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketCloudSearchForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketCloudSearchForm-test.tsx.snap index 2f9463a21fb..bbaa3079000 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketCloudSearchForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketCloudSearchForm-test.tsx.snap @@ -11,15 +11,10 @@ exports[`Should render correctly 1`] = ` values={ Object { "link": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/projects/create", - "query": Object { - "mode": "bitbucketcloud", - "resetPat": 1, - }, + "search": "?mode=bitbucketcloud&resetPat=1", } } > @@ -109,15 +104,10 @@ exports[`Should render correctly: Importing 1`] = ` className="project-name display-inline-block text-ellipsis" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "sq-key", - }, + "search": "?id=sq-key", } } > @@ -373,15 +363,10 @@ exports[`Should render correctly: Show more 1`] = ` className="project-name display-inline-block text-ellipsis" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "sq-key", - }, + "search": "?id=sq-key", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketImportRepositoryForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketImportRepositoryForm-test.tsx.snap index fa7fa8fc11d..171179efbaf 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketImportRepositoryForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketImportRepositoryForm-test.tsx.snap @@ -62,15 +62,10 @@ exports[`should render correctly: no projects 1`] = ` values={ Object { "link": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/projects/create", - "query": Object { - "mode": "bitbucket", - "resetPat": 1, - }, + "search": "?mode=bitbucket&resetPat=1", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketProjectAccordion-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketProjectAccordion-test.tsx.snap index e995e7e8379..4afde710ce4 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketProjectAccordion-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketProjectAccordion-test.tsx.snap @@ -60,15 +60,10 @@ exports[`should render correctly: default 1`] = ` title="Bar" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "bar", - }, + "search": "?id=bar", } } > @@ -132,15 +127,10 @@ exports[`should render correctly: disable options 1`] = ` title="Bar" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "bar", - }, + "search": "?id=bar", } } > @@ -204,15 +194,10 @@ exports[`should render correctly: no click handler 1`] = ` title="Bar" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "bar", - }, + "search": "?id=bar", } } > @@ -276,15 +261,10 @@ exports[`should render correctly: no project info 1`] = ` title="Bar" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "bar", - }, + "search": "?id=bar", } } > @@ -324,15 +304,10 @@ exports[`should render correctly: no repos 1`] = ` values={ Object { "link": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/projects/create", - "query": Object { - "mode": "bitbucket", - "resetPat": 1, - }, + "search": "?mode=bitbucket&resetPat=1", } } > @@ -393,15 +368,10 @@ exports[`should render correctly: not showing all repos 1`] = ` title="Bar" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "bar", - }, + "search": "?id=bar", } } > @@ -470,15 +440,10 @@ exports[`should render correctly: selected repo 1`] = ` title="Bar" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "bar", - }, + "search": "?id=bar", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap index 70474361ec7..1d7755f6e7a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPage-test.tsx.snap @@ -96,7 +96,6 @@ exports[`should render correctly for azure mode 1`] = ` loadingBindings={true} location={ Object { - "action": "PUSH", "hash": "", "key": "key", "pathname": "/path", @@ -149,7 +148,6 @@ exports[`should render correctly for bitbucket mode 1`] = ` loadingBindings={true} location={ Object { - "action": "PUSH", "hash": "", "key": "key", "pathname": "/path", @@ -200,7 +198,6 @@ exports[`should render correctly for bitbucketcloud mode 1`] = ` loadingBindings={true} location={ Object { - "action": "PUSH", "hash": "", "key": "key", "pathname": "/path", @@ -252,7 +249,6 @@ exports[`should render correctly for github mode 1`] = ` loadingBindings={true} location={ Object { - "action": "PUSH", "hash": "", "key": "key", "pathname": "/path", @@ -304,7 +300,6 @@ exports[`should render correctly for gitlab mode 1`] = ` loadingBindings={true} location={ Object { - "action": "PUSH", "hash": "", "key": "key", "pathname": "/path", diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitHubProjectCreateRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitHubProjectCreateRenderer-test.tsx.snap index 56300a11343..8179e528969 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitHubProjectCreateRenderer-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitHubProjectCreateRenderer-test.tsx.snap @@ -112,8 +112,6 @@ exports[`should render correctly: error for admin 1`] = ` values={ Object { "link": <Link - onlyActiveOnIndex={false} - style={Object {}} to="/admin/settings?category=almintegration" > onboarding.create_project.github.warning.message_admin.link @@ -375,15 +373,10 @@ exports[`should render correctly: repositories 1`] = ` > <Link className="display-flex-center max-width-60" - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "repo2", - }, + "search": "?id=repo2", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitlabProjectSelectionForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitlabProjectSelectionForm-test.tsx.snap index f179ea42dac..daa8b66ab26 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitlabProjectSelectionForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitlabProjectSelectionForm-test.tsx.snap @@ -75,15 +75,10 @@ exports[`should render correctly: importing 1`] = ` className="project-name display-inline-block text-ellipsis" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "already-imported", - }, + "search": "?id=already-imported", } } > @@ -154,15 +149,10 @@ exports[`should render correctly: no projects 1`] = ` values={ Object { "link": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/projects/create", - "query": Object { - "mode": "gitlab", - "resetPat": 1, - }, + "search": "?mode=gitlab&resetPat=1", } } > @@ -276,15 +266,10 @@ exports[`should render correctly: projects 1`] = ` className="project-name display-inline-block text-ellipsis" > <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/dashboard", - "query": Object { - "branch": undefined, - "id": "already-imported", - }, + "search": "?id=already-imported", } } > @@ -355,15 +340,10 @@ exports[`should render correctly: undefined projects 1`] = ` values={ Object { "link": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/projects/create", - "query": Object { - "mode": "gitlab", - "resetPat": 1, - }, + "search": "?mode=gitlab&resetPat=1", } } > diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/WrongBindingCountAlert-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/WrongBindingCountAlert-test.tsx.snap index b30756a2619..7dff8982253 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/WrongBindingCountAlert-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/WrongBindingCountAlert-test.tsx.snap @@ -27,14 +27,10 @@ exports[`should render correctly: for admin 1`] = ` Object { "alm": "onboarding.alm.bitbucket", "url": <Link - onlyActiveOnIndex={false} - style={Object {}} to={ Object { "pathname": "/admin/settings", - "query": Object { - "category": "almintegration", - }, + "search": "?category=almintegration", } } > |