(matcher *IntMatcher)
| 560 | } |
| 561 | |
| 562 | func (self *ViewDriver) LineCount(matcher *IntMatcher) *ViewDriver { |
| 563 | view := self.getView() |
| 564 | |
| 565 | self.t.assertWithRetries(func() (bool, string) { |
| 566 | lineCount := self.getLineCount() |
| 567 | ok, _ := matcher.test(lineCount) |
| 568 | return ok, fmt.Sprintf("unexpected number of lines in view '%s'. Expected %s, got %d", view.Name(), matcher.name(), lineCount) |
| 569 | }) |
| 570 | |
| 571 | return self |
| 572 | } |
| 573 | |
| 574 | func (self *ViewDriver) getLineCount() int { |
| 575 | // can't rely entirely on view.BufferLines because it returns 1 even if there's nothing in the view |
no test coverage detected