Reduce repetitious code in static page tests