package check import ( "regexp" "strings" "testing" ) // The button sample is the set that behaves differently, not every // combination: four variants at the default size, the three sizes on // primary, each labelled with its size, a link wearing the look, a // full-width one and a disabled one. The busy state is form-foot's idle/working pair, so it is not // drawn twice. A combination missing here is a size or variant a // reader of the gallery never sees on a button. func TestTheButtonSampleShowsEachDistinctBehaviour(t *testing.T) { sample := idiomMarkup(t, "button") for _, want := range []string{ ` View orders

` if !strings.Contains(sample, sizes) { t.Errorf("the button sample has no size row %s", sizes) } if strings.Contains(sample, "aria-busy") || strings.Contains(sample, "rst-spin") { t.Error("the button sample draws the busy state, which form-foot's pair already shows") } }