Skip to content

Commit

Permalink
update page text
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Jan 23, 2025
1 parent e4dfc9a commit c0a7d74
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 10 additions & 6 deletions report-viewer/src/views/OldVersionRedirectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@
<Container class="mx-auto mt-10 w-fit max-w-5xl space-y-5 p-5">
<div class="space-y-2">
<h3 class="text-2xl font-bold">
You are trying to open a report from an older version of JPlag
You are trying to open a report created with an older version of JPlag
</h3>
<p class="text-xl">
The report you are trying to open has version {{ uploadedVersion.toString() }}. <br />
The current version of JPlag is {{ reportViewerVersion.toString() }}. The report viewer
can open reports from version {{ minimalReportVersion.toString() }}<br />
You can access the old report viewer here:
Your report was created with JPlag version {{ uploadedVersion.toString() }}. <br />
The current version of JPlag is {{ reportViewerVersion.toString() }}. It supports
reports starting from version {{ minimalReportVersion.toString() }}<br />
<span v-if="requestedVersion !== null">You can still view the old report here:</span>
<span v-else
>Opening reports generated with version {{ uploadedVersion.toString() }} is not
supported by this report viewer.</span
>
</p>
</div>
<a :href="buildOldVersionLink()">
<a v-if="requestedVersion !== null" :href="buildOldVersionLink()">
<Interactable class="mx-auto mt-2 !border-accent-dark !bg-accent !bg-opacity-50">
Open old report viewer
</Interactable>
Expand Down
6 changes: 4 additions & 2 deletions report-viewer/tests/e2e/OpenOldReport.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ for (const oldVersion of oldVersionZips) {
await uploadFile(oldVersion.zipName, page, '/old/' + oldVersion.version)

const bodyContent = await page.locator('body').textContent()
expect(bodyContent).toContain('You are trying to open a report from an older version of JPlag')
expect(bodyContent).toContain(
'You are trying to open a report created with an older version of JPlag'
)
expect(bodyContent).toContain(oldVersion.version)
expect(bodyContent).toContain('You can access the old report viewer here:')
expect(bodyContent).toContain('You can still view the old report here:')
expect(bodyContent).toContain('Open old report viewer')

const oldVersionLinkElement = await page.locator('a').first()
Expand Down

0 comments on commit c0a7d74

Please sign in to comment.