fix: Fix about modal version for cloud installations (#25389)

This commit is contained in:
Antonis Stamatiou 2023-11-13 10:33:47 +02:00 committed by GitHub
parent 9cf84fb93f
commit bdb363bd28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -106,7 +106,7 @@ describe('components/AboutBuildModal', () => {
expect(screen.getByText('Mattermost Cloud')).toBeInTheDocument();
expect(screen.getByText('High trust messaging for the enterprise')).toBeInTheDocument();
expect(screen.getByTestId('aboutModalVersion')).toHaveTextContent('Mattermost Version: 3.6.0');
expect(screen.getByText('0123456789abcdef', {exact: false})).toBeInTheDocument();
expect(screen.getByRole('link', {name: 'server'})).toHaveAttribute('href', 'https://github.com/mattermost/mattermost-server/blob/master/NOTICE.txt');
expect(screen.getByRole('link', {name: 'desktop'})).toHaveAttribute('href', 'https://github.com/mattermost/desktop/blob/master/NOTICE.txt');

View File

@ -57,11 +57,6 @@ export default function AboutBuildModalCloud(props: Props) {
</div>
);
let mmversion = config.BuildNumber;
if (!isNaN(config.BuildNumber)) {
mmversion = 'ci';
}
return (
<Modal
dialogClassName={classNames('a11y__modal', 'about-modal', 'cloud')}
@ -94,12 +89,12 @@ export default function AboutBuildModalCloud(props: Props) {
</h3>
<p className='subtitle'>{subTitle}</p>
<div className='description'>
<div>
<div data-testid='aboutModalVersion'>
<FormattedMessage
id='about.version'
defaultMessage='Mattermost Version:'
/>
<span id='versionString'>{'\u00a0' + mmversion}</span>
<span id='versionString'>{'\u00a0' + config.Version}</span>
</div>
</div>
{licensee}