diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 67364dee..78232298 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,15 +5,16 @@ vaadin8 = "8.16.1" # This is the latest stable Vaadin 14 version vaadin14 = "14.10.12" # Latest unstable Vaadin 14 version -vaadin14_next = "14.11.9" -vaadin23="23.2.17" -vaadin23_next="23.3.34" +vaadin14_next = "14.11.10" +vaadin23="23.3.35" +# Don't go 23.5+ - it requires license +vaadin23_next="23.4.1" # https://repo1.maven.org/maven2/org/slf4j/slf4j-api/ -slf4j = "2.0.12" +slf4j = "2.0.13" # Stay on 1.0.8/1.1.3 because of Vaadin 8 compatibility karibudsl10 = "1.0.8" karibudsl11 = "1.1.3" -fake-servlet = "1.0" +fake-servlet = "1.1" karibu_tools = "0.14" junit = "5.10.2" diff --git a/karibu-testing-v10/kt10-tests/src/main/kotlin/com/github/mvysny/kaributesting/v10/MockVaadinTest.kt b/karibu-testing-v10/kt10-tests/src/main/kotlin/com/github/mvysny/kaributesting/v10/MockVaadinTest.kt index cd5378ae..c1ad8483 100644 --- a/karibu-testing-v10/kt10-tests/src/main/kotlin/com/github/mvysny/kaributesting/v10/MockVaadinTest.kt +++ b/karibu-testing-v10/kt10-tests/src/main/kotlin/com/github/mvysny/kaributesting/v10/MockVaadinTest.kt @@ -14,6 +14,8 @@ import com.github.mvysny.kaributesting.v10.mock.MockService import com.github.mvysny.kaributesting.v10.mock.MockVaadinServlet import com.github.mvysny.kaributesting.v10.mock.MockVaadinSession import com.github.mvysny.kaributesting.v10.mock.MockedUI +import com.github.mvysny.kaributools.SemanticVersion +import com.github.mvysny.kaributools.VaadinVersion import com.github.mvysny.kaributools.navigateTo import com.github.mvysny.kaributools.removeFromParent import com.vaadin.flow.component.AttachEvent @@ -39,6 +41,10 @@ import kotlin.concurrent.thread import kotlin.concurrent.write import kotlin.test.expect +fun SemanticVersion.isAtMost(major: Int): Boolean = this.major <= major +@JvmOverloads +fun SemanticVersion.isAtMost(major: Int, minor: Int, bugfix: Int = Int.MAX_VALUE): Boolean = this <= SemanticVersion(major, minor, bugfix) + @DynaTestDsl internal fun DynaNodeGroup.mockVaadinTest() { lateinit var routes: Routes @@ -65,7 +71,10 @@ internal fun DynaNodeGroup.mockVaadinTest() { expect(true) { VaadinSession.getCurrent().browser.locale != null } expect(false) { VaadinSession.getCurrent().browser.isIPhone } expect(true) { VaadinSession.getCurrent().browser.isFirefox } - expect(false) { VaadinSession.getCurrent().browser.isTooOldToFunctionProperly } + if (VaadinVersion.get.isAtMost(23, 3)) { + // Vaadin 23.4+ lacks Browser.isTooOldToFunctionProperly + expect(false) { VaadinSession.getCurrent().browser.isTooOldToFunctionProperly } + } expect(false) { VaadinSession.getCurrent().browser.isChrome } expect(false) { VaadinSession.getCurrent().browser.isChromeOS } expect(false) { VaadinSession.getCurrent().browser.isAndroid }