Fix app version

Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
soupette 2021-11-02 10:31:08 +01:00
parent 3525237887
commit 4af2e8c47a
2 changed files with 7 additions and 4 deletions

View File

@ -15,7 +15,7 @@ const ApplicationInfosPage = () => {
const { formatMessage } = useIntl(); const { formatMessage } = useIntl();
useFocusWhenNavigate(); useFocusWhenNavigate();
const appInfos = useAppInfos(); const appInfos = useAppInfos();
const { shouldUpdateStrapi, latestStrapiReleaseTag } = appInfos; const { shouldUpdateStrapi, latestStrapiReleaseTag, strapiVersion } = appInfos;
const currentPlan = appInfos.communityEdition const currentPlan = appInfos.communityEdition
? 'app.components.UpgradePlanModal.text-ce' ? 'app.components.UpgradePlanModal.text-ce'
@ -58,7 +58,7 @@ const ApplicationInfosPage = () => {
defaultMessage: 'details', defaultMessage: 'details',
})} })}
</TableLabel> </TableLabel>
<Text as="p">{appInfos.latestStrapiReleaseTag}</Text> <Text as="p">v{strapiVersion}</Text>
</GridItem> </GridItem>
<GridItem col={6} s={12}> <GridItem col={6} s={12}>
<TableLabel textColor="neutral600"> <TableLabel textColor="neutral600">

View File

@ -24,6 +24,7 @@ describe('Application page', () => {
return { return {
shouldUpdateStrapi: true, shouldUpdateStrapi: true,
latestStrapiReleaseTag: 'v3.6.8', latestStrapiReleaseTag: 'v3.6.8',
strapiVersion: '4.0.0',
}; };
}); });
@ -360,7 +361,8 @@ describe('Application page', () => {
<p <p
class="c20" class="c20"
> >
v3.6.8 v
4.0.0
</p> </p>
</div> </div>
</div> </div>
@ -487,12 +489,13 @@ describe('Application page', () => {
return { return {
shouldUpdateStrapi: true, shouldUpdateStrapi: true,
latestStrapiReleaseTag: 'v3.6.8', latestStrapiReleaseTag: 'v3.6.8',
strapiVersion: '4.0.0',
}; };
}); });
render(App); render(App);
expect(screen.getByText('v3.6.8')).toBeInTheDocument(); expect(screen.getByText('v4.0.0')).toBeInTheDocument();
expect(screen.getByText('Upgrade your admin panel')).toBeInTheDocument(); expect(screen.getByText('Upgrade your admin panel')).toBeInTheDocument();
}); });