From 43e04febee93921462fd334407702ca8afcd9d7b Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 14 Jun 2024 13:26:14 +0200 Subject: [PATCH] Fix reporting of unexpected selections in integration tests Expected and actual selection were swapped in the error message. --- pkg/integration/components/view_driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/integration/components/view_driver.go b/pkg/integration/components/view_driver.go index e40c0c5f1..b6f917603 100644 --- a/pkg/integration/components/view_driver.go +++ b/pkg/integration/components/view_driver.go @@ -263,8 +263,8 @@ func (self *ViewDriver) assertLines(offset int, matchers ...*TextMatcher) *ViewD return false, fmt.Sprintf( "Unexpected selection in view '%s'. Expected %s to be selected but got %s.\nExpected selected lines:\n---\n%s\n---\n\nActual selected lines:\n---\n%s\n---\n", view.Name(), - formatLineRange(startIdx, endIdx), formatLineRange(expectedStartIdx, expectedEndIdx), + formatLineRange(startIdx, endIdx), strings.Join(expectedSelectedLines, "\n"), strings.Join(lines, "\n"), )