Skip to content
quarry Artifact [6ff5233395]
Login

Artifact [6ff5233395]

Artifact 6ff5233395a333d4ba881c53da00b156d81d624637c3f0f6181835a3f1ab49da:


package web

import (
	"strings"
	"testing"
)

// A file list never scrolls on its own: the history link's hit area
// overhangs the last row (margin: -0.25rem 0), and the wrapper that
// scrolls a wide tree sideways is a scroller on both axes, so without
// room for that overhang every file list showed a vertical scroll bar.
func TestTheFileListLeavesRoomForItsLastHistoryLink(t *testing.T) {
	compact := strings.Join(strings.Fields(sheet), "")
	if !strings.Contains(compact, ".hist{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;margin:-0.25rem0;") {
		t.Skip("the history link no longer overhangs its row; this guard is moot")
	}
	if !strings.Contains(compact, ".tw:has(>table.tree){padding-bottom:var(--sp-1);}") {
		t.Errorf("FAIL: the tree's wrapper has no room for the last row's history link, so it scrolls")
	}
}