diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index dc336700b6..871790ce28 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -149,8 +149,8 @@ {{end}} diff --git a/tests/integration/repo_archive_test.go b/tests/integration/repo_archive_test.go index 277ead4a28..a5c076952c 100644 --- a/tests/integration/repo_archive_test.go +++ b/tests/integration/repo_archive_test.go @@ -1,4 +1,5 @@ // Copyright 2024 The Gitea Authors. All rights reserved. +// Copyright 2024 The Forgejo Authors. All rights reserved. // SPDX-License-Identifier: MIT package integration @@ -55,9 +56,10 @@ func TestRepoDownloadArchiveSubdir(t *testing.T) { t.Run("Frontend", func(t *testing.T) { resp := MakeRequest(t, NewRequestf(t, "GET", "/%s/src/branch/master/subdir", repo.FullName()), http.StatusOK) + page := NewHTMLParser(t, resp.Body) - assert.Contains(t, resp.Body.String(), fmt.Sprintf("/%s/archive/master:subdir.zip", repo.FullName())) - assert.Contains(t, resp.Body.String(), fmt.Sprintf("/%s/archive/master:subdir.tar.gz", repo.FullName())) + page.AssertElement(t, fmt.Sprintf(".folder-actions a.archive-link[href='/%s/archive/master:subdir.zip'][type='application/zip']", repo.FullName()), true) + page.AssertElement(t, fmt.Sprintf(".folder-actions a.archive-link[href='/%s/archive/master:subdir.tar.gz'][type='application/gzip']", repo.FullName()), true) }) t.Run("Backend", func(t *testing.T) {