Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Refresh the web surface with Everforest, readable type, and clearer navigation

796ac8c0ce77461174cf520d5fad4dea37744662 · Keenan Nemetz · 12d ago · parent ac00929f

server/nav_test.go +11−11

@@ -8,11 +8,11 @@ import (
8 8 "testing"
9 9 )
10 10
11 // TestProjectsIsTheWayHome: the bar needs a text destination for the landing page.
12 // The emblem links there too, but a mark is not a label, and "Projects" is what
13 // the landing page is a list of. It marks itself current wherever the repository
14 // list is the context: the landing page and a repository page alike.
15 func TestProjectsIsTheWayHome(t *testing.T) {
11 // TestHomeIsTheGlobalDestination: the bar needs a text destination for the
12 // landing page. The emblem links there too, but a mark is not a label. Home marks
13 // itself current wherever the repository list is the context: the landing page
14 // and a repository page alike.
15 func TestHomeIsTheGlobalDestination(t *testing.T) {
16 16 t.Parallel()
17 17 f := newFixture(t)
18 18 f.publish(f.repo)
@@ -22,25 +22,25 @@ func TestProjectsIsTheWayHome(t *testing.T) {
22 22 if code != http.StatusOK {
23 23 t.Fatalf("%s = %d", path, code)
24 24 }
25 if !strings.Contains(body, ">Projects</a>") {
26 t.Fatalf("%s has no Projects link:\n%s", path, body)
25 if !strings.Contains(body, ">Home</a>") {
26 t.Fatalf("%s has no Home link:\n%s", path, body)
27 27 }
28 28 if !strings.Contains(body, `class="active" href="/" aria-current="page"`) {
29 t.Fatalf("%s does not mark Projects current:\n%s", path, body)
29 t.Fatalf("%s does not mark Home current:\n%s", path, body)
30 30 }
31 31 if !strings.Contains(body, `class="icon"`) {
32 t.Fatalf("%s renders the Projects link without an icon", path)
32 t.Fatalf("%s renders the Home link without an icon", path)
33 33 }
34 34 }
35 35
36 // Activity is a different destination, so Projects stops being current — and
36 // Activity is a different destination, so Home stops being current — and
37 37 // Activity takes over, which is what makes the bar say where you are.
38 38 code, body := f.get("/activity")
39 39 if code != http.StatusOK {
40 40 t.Fatalf("/activity = %d", code)
41 41 }
42 42 if strings.Contains(body, `class="active" href="/"`) {
43 t.Fatalf("/activity marks Projects current:\n%s", body)
43 t.Fatalf("/activity marks Home current:\n%s", body)
44 44 }
45 45 if !strings.Contains(body, `class="active" href="/activity"`) {
46 46 t.Fatalf("/activity does not mark Activity current:\n%s", body)