return (
<div className="page-wrapper-simple">
<FlagMessage className="sw-m-10" variant="info">
- {translate('indexation.page_unavailable.description')}
- <br />
- <FormattedMessage
- defaultMessage={translate(
- 'indexation.page_unavailable.description.additional_information'
- )}
- id="indexation.page_unavailable.description.additional_information"
- values={{
- link: (
- <Link
- className="sw-ml-4"
- to="https://docs.sonarqube.org/latest/instance-administration/reindexing/"
- >
- {translate('learn_more')}
- </Link>
- ),
- }}
- />
+ <span className="sw-w-[290px]">
+ {translate('indexation.page_unavailable.description')}
+ <span className="sw-ml-1">
+ <FormattedMessage
+ defaultMessage={translate(
+ 'indexation.page_unavailable.description.additional_information'
+ )}
+ id="indexation.page_unavailable.description.additional_information"
+ values={{
+ link: (
+ <Link to="https://docs.sonarqube.org/latest/instance-administration/reindexing/">
+ {translate('learn_more')}
+ </Link>
+ ),
+ }}
+ />
+ </span>
+ </span>
</FlagMessage>
</div>
);
className="sw-m-10"
variant="info"
>
- indexation.page_unavailable.description
- <br />
- <FormattedMessage
- defaultMessage="indexation.page_unavailable.description.additional_information"
- id="indexation.page_unavailable.description.additional_information"
- values={
- {
- "link": <StandoutLink
- className="sw-ml-4"
- to="https://docs.sonarqube.org/latest/instance-administration/reindexing/"
- >
- learn_more
- </StandoutLink>,
- }
- }
- />
+ <span
+ className="sw-w-[290px]"
+ >
+ indexation.page_unavailable.description
+ <span
+ className="sw-ml-1"
+ >
+ <FormattedMessage
+ defaultMessage="indexation.page_unavailable.description.additional_information"
+ id="indexation.page_unavailable.description.additional_information"
+ values={
+ {
+ "link": <StandoutLink
+ to="https://docs.sonarqube.org/latest/instance-administration/reindexing/"
+ >
+ learn_more
+ </StandoutLink>,
+ }
+ }
+ />
+ </span>
+ </span>
</FlagMessage>
</div>
`;
describe('withIndexationGuard', () => {
it('should render indexation message when showIndexationMessage returns true', () => {
renderComponentWithIndexationGuard(() => true);
- expect(screen.getByText(/indexation\.page_unavailable\.description/)).toBeInTheDocument();
+ expect(
+ screen.getByText(/indexation\.page_unavailable\.description\.additional_information/)
+ ).toBeInTheDocument();
});
it('should render children when showIndexationMessage returns false', () => {