From 25997370335a38029967d96d14acc7125f1aaf21 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sat, 8 Jun 2024 23:33:55 +0500 Subject: [PATCH] Update instance title in tests --- tests/e2e/example.test.e2e.js | 2 +- tests/integration/repo_test.go | 28 ++++++++++++++-------------- tests/integration/view_test.go | 8 ++++---- tests/mysql.ini.tmpl | 4 ++-- tests/pgsql.ini.tmpl | 4 ++-- tests/sqlite.ini.tmpl | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/e2e/example.test.e2e.js b/tests/e2e/example.test.e2e.js index 57c69a291..c185d9157 100644 --- a/tests/e2e/example.test.e2e.js +++ b/tests/e2e/example.test.e2e.js @@ -9,7 +9,7 @@ test.beforeAll(async ({browser}, workerInfo) => { test('Load Homepage', async ({page}) => { const response = await page.goto('/'); await expect(response?.status()).toBe(200); // Status OK - await expect(page).toHaveTitle(/^Gitea: Git with a cup of tea\s*$/); + await expect(page).toHaveTitle(/^Forgejo: Beyond coding. We Forge.\s*$/); await expect(page.locator('.logo')).toHaveAttribute('src', '/assets/img/logo.svg'); }); diff --git a/tests/integration/repo_test.go b/tests/integration/repo_test.go index 3f4cad6bc..a61c57422 100644 --- a/tests/integration/repo_test.go +++ b/tests/integration/repo_test.go @@ -217,13 +217,13 @@ func TestRepoHTMLTitle(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo1") - assert.EqualValues(t, "user2/repo1 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "user2/repo1 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("With description", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user27/repo49") - assert.EqualValues(t, "user27/repo49: A wonderful repository with more than just a README.md - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "user27/repo49: A wonderful repository with more than just a README.md - Forgejo: Beyond coding. We Forge.", htmlTitle) }) }) @@ -233,25 +233,25 @@ func TestRepoHTMLTitle(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/branch/master/deep/nesting") - assert.EqualValues(t, "repo59/deep/nesting at master - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting at master - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("Non-default branch", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/branch/cake-recipe/deep/nesting") - assert.EqualValues(t, "repo59/deep/nesting at cake-recipe - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting at cake-recipe - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("Commit", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/commit/d8f53dfb33f6ccf4169c34970b5e747511c18beb/deep/nesting/") - assert.EqualValues(t, "repo59/deep/nesting at d8f53dfb33f6ccf4169c34970b5e747511c18beb - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting at d8f53dfb33f6ccf4169c34970b5e747511c18beb - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("Tag", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/tag/v1.0/deep/nesting/") - assert.EqualValues(t, "repo59/deep/nesting at v1.0 - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting at v1.0 - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) }) t.Run("File", func(t *testing.T) { @@ -259,25 +259,25 @@ func TestRepoHTMLTitle(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/branch/master/deep/nesting/folder/secret_sauce_recipe.txt") - assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at master - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at master - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("Non-default branch", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/branch/cake-recipe/deep/nesting/folder/secret_sauce_recipe.txt") - assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at cake-recipe - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at cake-recipe - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("Commit", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/commit/d8f53dfb33f6ccf4169c34970b5e747511c18beb/deep/nesting/folder/secret_sauce_recipe.txt") - assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at d8f53dfb33f6ccf4169c34970b5e747511c18beb - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at d8f53dfb33f6ccf4169c34970b5e747511c18beb - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("Tag", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo59/src/tag/v1.0/deep/nesting/folder/secret_sauce_recipe.txt") - assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at v1.0 - user2/repo59 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "repo59/deep/nesting/folder/secret_sauce_recipe.txt at v1.0 - user2/repo59 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) }) }) @@ -287,13 +287,13 @@ func TestRepoHTMLTitle(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo1/issues") - assert.EqualValues(t, "Issues - user2/repo1 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "Issues - user2/repo1 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("View issue page", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo1/issues/1") - assert.EqualValues(t, "#1 - issue1 - user2/repo1 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "#1 - issue1 - user2/repo1 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) }) @@ -302,13 +302,13 @@ func TestRepoHTMLTitle(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo1/pulls") - assert.EqualValues(t, "Pull requests - user2/repo1 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "Pull requests - user2/repo1 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) t.Run("View pull request", func(t *testing.T) { defer tests.PrintCurrentTest(t)() htmlTitle := GetHTMLTitle(t, nil, "/user2/repo1/pulls/2") - assert.EqualValues(t, "#2 - issue2 - user2/repo1 - Gitea: Git with a cup of tea", htmlTitle) + assert.EqualValues(t, "#2 - issue2 - user2/repo1 - Forgejo: Beyond coding. We Forge.", htmlTitle) }) }) } diff --git a/tests/integration/view_test.go b/tests/integration/view_test.go index d7225101d..4e7c1b8cd 100644 --- a/tests/integration/view_test.go +++ b/tests/integration/view_test.go @@ -189,7 +189,7 @@ func TestInHistoryButton(t *testing.T) { func TestTitleDisplayName(t *testing.T) { session := emptyTestSession(t) title := GetHTMLTitle(t, session, "/") - assert.Equal(t, "Gitea: Git with a cup of tea", title) + assert.Equal(t, "Forgejo: Beyond coding. We Forge.", title) } func TestHomeDisplayName(t *testing.T) { @@ -197,7 +197,7 @@ func TestHomeDisplayName(t *testing.T) { req := NewRequest(t, "GET", "/") resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) - assert.Equal(t, "Gitea: Git with a cup of tea", strings.TrimSpace(htmlDoc.Find("h1.title").Text())) + assert.Equal(t, "Forgejo: Beyond coding. We Forge.", strings.TrimSpace(htmlDoc.Find("h1.title").Text())) } func TestOpenGraphDisplayName(t *testing.T) { @@ -206,7 +206,7 @@ func TestOpenGraphDisplayName(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) ogTitle, _ := htmlDoc.Find("meta[property='og:title']").Attr("content") - assert.Equal(t, "Gitea: Git with a cup of tea", ogTitle) + assert.Equal(t, "Forgejo: Beyond coding. We Forge.", ogTitle) ogSiteName, _ := htmlDoc.Find("meta[property='og:site_name']").Attr("content") - assert.Equal(t, "Gitea: Git with a cup of tea", ogSiteName) + assert.Equal(t, "Forgejo: Beyond coding. We Forge.", ogSiteName) } diff --git a/tests/mysql.ini.tmpl b/tests/mysql.ini.tmpl index 1bfc797ba..f24590a76 100644 --- a/tests/mysql.ini.tmpl +++ b/tests/mysql.ini.tmpl @@ -1,5 +1,5 @@ -APP_NAME = Gitea -APP_SLOGAN = Git with a cup of tea +APP_NAME = Forgejo +APP_SLOGAN = Beyond coding. We Forge. RUN_MODE = prod [database] diff --git a/tests/pgsql.ini.tmpl b/tests/pgsql.ini.tmpl index 760826280..b58d753b6 100644 --- a/tests/pgsql.ini.tmpl +++ b/tests/pgsql.ini.tmpl @@ -1,5 +1,5 @@ -APP_NAME = Gitea -APP_SLOGAN = Git with a cup of tea +APP_NAME = Forgejo +APP_SLOGAN = Beyond coding. We Forge. RUN_MODE = prod [database] diff --git a/tests/sqlite.ini.tmpl b/tests/sqlite.ini.tmpl index 48ee8d4e4..51234e3c8 100644 --- a/tests/sqlite.ini.tmpl +++ b/tests/sqlite.ini.tmpl @@ -1,5 +1,5 @@ -APP_NAME = Gitea -APP_SLOGAN = Git with a cup of tea +APP_NAME = Forgejo +APP_SLOGAN = Beyond coding. We Forge. RUN_MODE = prod [database]