From 804051b9ddd211e6878306837c91e8fbfad164a3 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Tue, 22 Oct 2024 14:50:53 +0200 Subject: [PATCH] fix: typo on releases for source code downloads Closes #5648 (cherry picked from commit 02f8fad54db98e176a36db149e4658a7eaebba33) --- templates/repo/release/list.tmpl | 2 +- tests/e2e/release.test.e2e.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index cc5c6702f3..4c7f13dda7 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -84,7 +84,7 @@
  • - {{svg "octicon-file-zip" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.source_code"}} (ZIP) + {{svg "octicon-file-zip" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.source_code"}} (TAR.GZ)
    {{ctx.Locale.TrN .Release.ArchiveDownloadCount.TarGz "repo.release.download_count_one" "repo.release.download_count_few" (ctx.Locale.PrettyNumber .Release.ArchiveDownloadCount.TarGz)}} diff --git a/tests/e2e/release.test.e2e.js b/tests/e2e/release.test.e2e.js index ac1e101f98..daa2a821d2 100644 --- a/tests/e2e/release.test.e2e.js +++ b/tests/e2e/release.test.e2e.js @@ -38,6 +38,10 @@ test('External Release Attachments', async ({browser, isMobile}, workerInfo) => // Validate release page and click edit await expect(page).toHaveURL('/user2/repo2/releases'); await expect(page.locator('.download[open] li')).toHaveCount(3); + await expect(page.locator('.download[open] li:nth-of-type(1)')).toContainText('Source code (ZIP)'); + await expect(page.locator('.download[open] li:nth-of-type(1) a')).toHaveAttribute('href', '/user2/repo2/archive/2.0.zip'); + await expect(page.locator('.download[open] li:nth-of-type(2)')).toContainText('Source code (TAR.GZ)'); + await expect(page.locator('.download[open] li:nth-of-type(2) a')).toHaveAttribute('href', '/user2/repo2/archive/2.0.tar.gz'); await expect(page.locator('.download[open] li:nth-of-type(3)')).toContainText('Test'); await expect(page.locator('.download[open] li:nth-of-type(3) a')).toHaveAttribute('href', 'https://forgejo.org/'); save_visual(page);