From e4ca08fd41866689eb8a13993c9cde2a934da055 Mon Sep 17 00:00:00 2001 From: Piotr Tomiak Date: Fri, 17 Jan 2025 17:06:06 +0100 Subject: [PATCH] [angular] WEB-29262 Add tests for nested forms support. GitOrigin-RevId: 7945de26afc91a13143b8772f32608597d264e50 --- .../intellij.platform.webSymbols.iml | 1 + .../com/intellij/webSymbols/WebTestUtil.kt | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/platform/webSymbols/intellij.platform.webSymbols.iml b/platform/webSymbols/intellij.platform.webSymbols.iml index 887edc5c5826..ded6e1a998c2 100644 --- a/platform/webSymbols/intellij.platform.webSymbols.iml +++ b/platform/webSymbols/intellij.platform.webSymbols.iml @@ -29,5 +29,6 @@ + \ No newline at end of file diff --git a/platform/webSymbols/testSrc/com/intellij/webSymbols/WebTestUtil.kt b/platform/webSymbols/testSrc/com/intellij/webSymbols/WebTestUtil.kt index c00f6aedd804..5e5a9e21985a 100644 --- a/platform/webSymbols/testSrc/com/intellij/webSymbols/WebTestUtil.kt +++ b/platform/webSymbols/testSrc/com/intellij/webSymbols/WebTestUtil.kt @@ -56,6 +56,7 @@ import com.intellij.webSymbols.query.WebSymbolMatch import com.intellij.webSymbols.query.WebSymbolsQueryExecutorFactory import junit.framework.TestCase.* import org.junit.Assert +import org.opentest4j.AssertionFailedError import java.io.File import java.util.concurrent.Callable import kotlin.math.max @@ -141,12 +142,18 @@ fun CodeInsightTestFixture.checkLookupItems( locations.forEachIndexed { index, location -> moveToOffsetBySignature(location) completeBasic() - checkListByFile( - renderLookupItems(renderPriority, renderTypeText, renderTailText, renderProximity, renderDisplayText, renderDisplayEffects, - lookupItemFilter), - expectedDataLocation + (if (hasDir) "/items" else "$fileName.items") + ".${index + 1}.txt", - containsCheck - ) + try { + checkListByFile( + renderLookupItems(renderPriority, renderTypeText, renderTailText, renderProximity, renderDisplayText, renderDisplayEffects, + lookupItemFilter), + expectedDataLocation + (if (hasDir) "/items" else "$fileName.items") + ".${index + 1}.txt", + containsCheck + ) + } catch (e: FileComparisonFailedError) { + throw FileComparisonFailedError(e.message + "\nFor location: $location", + e.expectedStringPresentation, e.actualStringPresentation, + e.filePath, e.actualFilePath) + } checkLookupDocumentation(".${index + 1}") } }