Skip to content

Commit

Permalink
dep v bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed May 24, 2024
1 parent b8517a6 commit 5c6a7bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 6 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }
Expand Down

0 comments on commit 5c6a7bc

Please sign in to comment.