com.github.mvysny.kaributesting.v10.groovy.PrettyPrintTreeUtils.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of karibu-testing-v10-groovy Show documentation
Show all versions of karibu-testing-v10-groovy Show documentation
Karibu Testing, support for browserless Vaadin testing in Kotlin
The newest version!
package com.github.mvysny.kaributesting.v10.groovy
import com.github.mvysny.kaributesting.v10.PrettyPrintTreeKt
import com.vaadin.flow.component.Component
import groovy.transform.CompileStatic
import org.jetbrains.annotations.NotNull
/**
* Also see {@link PrettyPrintTreeKt#setPrettyPrintUseAscii(boolean)} and
* {@link PrettyPrintTreeKt#setPrettyStringHook(kotlin.jvm.functions.Function2)}.
* @author mavi
*/
@CompileStatic
class PrettyPrintTreeUtils {
@NotNull
static String toPrettyTree(@NotNull Component self) {
PrettyPrintTreeKt.toPrettyTree(self)
}
/**
* Returns the most basic properties of the component, formatted as a concise string:
*
* - The component class
* - The [Component.getId]
* - Whether the component is [Component.isVisible]
* - Whether it is a [HasValue] that is read-only
* - the styles
* - The [Component.label] and text
* - The [HasValue.getValue]
*
*/
@NotNull
static String toPrettyString(@NotNull Component self) {
PrettyPrintTreeKt.toPrettyString(self)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy