Esempio n. 1
0
func checkMainSectionsVisible(t *testing.T, wd selenium.WebDriverT, isVis bool, text string) {

	for _, hidden := range []string{"#footer", "#main"} {
		element := wd.Q(hidden)
		if element.IsDisplayed() != isVis {
			msg := "not be"
			if isVis {
				msg = "be"
			}
			t.Fatalf("%s section should %s turned on %s", hidden, msg, text)
		}
	}

}
Esempio n. 2
0
func checkNumCompletedItemsDisplayedText(t *testing.T, wd selenium.WebDriverT, expected string) {
	countDisplayed := wd.Q("span#num-completed")
	if countDisplayed.Text() != expected {
		t.Fatalf("unexpected done count '%s' but expected '%s'", countDisplayed, expected)
	}
}