com.github.mvysny.kaributesting.v10.RouterLink.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of karibu-testing-v10 Show documentation
Show all versions of karibu-testing-v10 Show documentation
Karibu Testing, support for browserless Vaadin testing in Kotlin
@file:Suppress("FunctionName")
package com.github.mvysny.kaributesting.v10
import com.github.mvysny.kaributools.navigateTo
import com.vaadin.flow.router.RouterLink
/**
* Navigates to where this router link points to.
* @throws IllegalStateException if the link was not visible, not enabled. See [checkEditableByUser] for
* more details.
*/
public fun RouterLink._click() {
_expectEditableByUser()
click()
}
/**
* Navigates to where this router link points to. The difference to [_click] is that this one doesn't check whether
* the link is actually visible and enabled.
*/
public fun RouterLink.click() {
navigateTo()
}