diff --git a/TODO.md b/TODO.md index e14276c..d45aee2 100644 --- a/TODO.md +++ b/TODO.md @@ -20,6 +20,10 @@ regress. # Completed Steps +- 2026-10-02: In a window too narrow for the top bar, such as 390 px, the New + App and Logout buttons move to a second row instead of running into "by + @sneak"; the bar keeps a gap between its two sides at every width (#272). + - 2026-10-02: On the Applications list, a long repository URL now wraps within its column instead of making the table wider than its card, which cut off the Actions column and the Deploy buttons. In a window too narrow for the table, diff --git a/internal/handlers/dashboard_layout_test.go b/internal/handlers/dashboard_layout_test.go index 2ab09da..1d572b8 100644 --- a/internal/handlers/dashboard_layout_test.go +++ b/internal/handlers/dashboard_layout_test.go @@ -52,3 +52,26 @@ func TestDashboardTableFitsCard(t *testing.T) { assert.Contains(t, cellTag, "whitespace-normal") assert.Contains(t, cellTag, "break-all") } + +// TestTopBarWrapsWhenNarrow checks that the top bar keeps a gap between the +// µPaaS title and the New App and Logout buttons, and puts the buttons on a +// second row in a window too narrow for one, instead of letting them meet. +func TestTopBarWrapsWhenNarrow(t *testing.T) { + t.Parallel() + + testCtx := setupTestHandlers(t) + + request := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/", nil) + recorder := httptest.NewRecorder() + + testCtx.handlers.HandleDashboard().ServeHTTP(recorder, request) + + require.Equal(t, http.StatusOK, recorder.Code) + + _, afterNav, found := strings.Cut(recorder.Body.String(), `