package web
import (
"strings"
"testing"
)
// The diagram's sizing rules reach the diagram only. Written against
// .pikchr-fig svg, they also caught the bar's icons, and each Copy and
// studio icon was drawn as wide as the diagram.
func TestDiagramSizingSkipsTheBarsIcons(t *testing.T) {
for _, bad := range []string{".pikchr-fig svg {", ".pikchr-fig:target svg {"} {
if strings.Contains(sheet, bad) {
t.Errorf("FAIL: %q sizes every svg in the frame, the bar's icons included", bad)
}
}
if !strings.Contains(sheet, ".pikchr-view svg {") {
t.Error("FAIL: the diagram lost its sizing rule")
}
t.Log("ok: sizing is scoped to the diagram")
}