From 3d573827230e7a750c002cf416cf9231161dd9b3 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Tue, 19 Apr 2022 13:11:38 +0300 Subject: Update Jsoup to 1.14.3 (#2448) * Update Jsoup to 1.14.3 * Fix Jsoup API breaking changes after the update * Fix new Qodana inspections * Replace IllegalStateException with more appropriate NoSuchElementException --- .../base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/base/base-test-utils/src/main/kotlin') diff --git a/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt b/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt index 1d725398..3397b2b4 100644 --- a/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt +++ b/plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt @@ -11,7 +11,8 @@ fun TestOutputWriter.renderedContent(path: String = "root/example.html"): Elemen .single() fun Element.signature(): Elements = select("div.symbol.monospace") -fun Element.firstSignature(): Element = signature().first() +fun Element.firstSignature(): Element = signature().first() ?: throw NoSuchElementException("No signature found") +fun Element.lastSignature(): Element = signature().last() ?: throw NoSuchElementException("No signature found") class Parameters(vararg matchers: Any) : Tag("span", *matchers, expectedClasses = listOf("parameters")) class Parameter(vararg matchers: Any) : Tag("span", *matchers, expectedClasses = listOf("parameter")) \ No newline at end of file -- cgit