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

View File

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