aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/base-test-utils
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/base-test-utils')
-rw-r--r--plugins/base/base-test-utils/api/base-test-utils.api1
-rw-r--r--plugins/base/base-test-utils/src/main/kotlin/renderers/SignatureUtils.kt1
2 files changed, 2 insertions, 0 deletions
diff --git a/plugins/base/base-test-utils/api/base-test-utils.api b/plugins/base/base-test-utils/api/base-test-utils.api
index b07dbb9e..a6bdc192 100644
--- a/plugins/base/base-test-utils/api/base-test-utils.api
+++ b/plugins/base/base-test-utils/api/base-test-utils.api
@@ -99,6 +99,7 @@ public final class signatures/SignatureUtilsKt {
public static final fun renderedContent (Lutils/TestOutputWriter;Ljava/lang/String;)Lorg/jsoup/nodes/Element;
public static synthetic fun renderedContent$default (Lutils/TestOutputWriter;Ljava/lang/String;ILjava/lang/Object;)Lorg/jsoup/nodes/Element;
public static final fun signature (Lorg/jsoup/nodes/Element;)Lorg/jsoup/select/Elements;
+ public static final fun tab (Lorg/jsoup/nodes/Element;Ljava/lang/String;)Lorg/jsoup/select/Elements;
}
public final class utils/A : utils/Tag {
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 3397b2b4..f8b2c453 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,6 +11,7 @@ fun TestOutputWriter.renderedContent(path: String = "root/example.html"): Elemen
.single()
fun Element.signature(): Elements = select("div.symbol.monospace")
+fun Element.tab(tabName: String): Elements = select("div[data-togglable=\"$tabName\"]")
fun Element.firstSignature(): Element = signature().first() ?: throw NoSuchElementException("No signature found")
fun Element.lastSignature(): Element = signature().last() ?: throw NoSuchElementException("No signature found")