Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions browserstack/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ repositories {
dependencies {
implementation(kotlin("stdlib"))
implementation(project(":core"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")

api("io.github.darkweird:browserstack.kt:0.3.1")
implementation("io.ktor:ktor-client-auth-jvm:$ktor_version")
implementation("io.ktor:ktor-client-serialization-jvm:$ktor_version")
}
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("jvm") version "1.7.10"
kotlin("plugin.serialization") version "1.7.10"
kotlin("jvm") version "2.1.21"
kotlin("plugin.serialization") version "2.1.21"
}

group = "me.darkweird.sekt"
Expand Down
6 changes: 3 additions & 3 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ repositories {
dependencies {
implementation(kotlin("stdlib"))

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
implementation("io.ktor:ktor-client-core-jvm:$ktor_version")
implementation("io.ktor:ktor-client-cio-jvm:$ktor_version")

testImplementation("io.kotest:kotest-runner-junit5:4.6.2")
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
testImplementation("io.ktor:ktor-client-mock-jvm:$ktor_version")
}
4 changes: 2 additions & 2 deletions examples/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
implementation(kotlin("stdlib"))
implementation(project(":core"))
implementation(project(":w3c"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
implementation("io.kotest:kotest-runner-junit5:5.4.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")
implementation("io.kotest:kotest-runner-junit5:5.9.1")
}

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fun FunSpec.theInternetTests(
withTestSession: suspend (name: String, block: suspend Session.() -> Unit) -> Unit
) {
test("Add/remove elements") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/add_remove_elements/"))

val addButton = findElement(tagName("button"))
Expand All @@ -41,25 +41,25 @@ fun FunSpec.theInternetTests(
}

xtest("Basic auth") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/basic_auth"))
}
}

xtest("Broken images") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/broken_images"))
}
}

xtest("Challenging DOM") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/challenging_dom"))
}
}

test("Checkboxes") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/checkboxes"))

val checkboxes = findElements(xpath("//form[@id='checkboxes']/input"))
Expand All @@ -73,7 +73,7 @@ fun FunSpec.theInternetTests(
}

test("Context Menu") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/context_menu"))

val contextMenuTarget = findElement(css("#hot-spot"))
Expand All @@ -97,22 +97,22 @@ fun FunSpec.theInternetTests(
}

xtest("Digest Authentication") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/"))

}
}


xtest("Disappearing Elements") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/disappearing_elements"))

}
}

test("Drag and Drop") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/drag_and_drop"))

val (firstColumn, secondColumn) = findElement(css("#columns")).findElements(tagName("div"))
Expand Down Expand Up @@ -169,7 +169,7 @@ fun FunSpec.theInternetTests(
}

test("Dropdown List") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/dropdown"))
val select = findElement(css("#dropdown"))
select.getProperty("value") shouldBe ""
Expand All @@ -183,15 +183,15 @@ fun FunSpec.theInternetTests(
}

xtest("Dynamic Content") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/dynamic_content"))

}
}

// Fixme stuck at check box disappear
xtest("Dynamic Controls") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/dynamic_controls"))

// Checkbox check
Expand All @@ -218,7 +218,7 @@ fun FunSpec.theInternetTests(
}

test("Dynamic Loading/1") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/dynamic_loading"))

findElement(linkText("Example 1: Element on page that is hidden")).click()
Expand All @@ -236,7 +236,7 @@ fun FunSpec.theInternetTests(
}

test("Dynamic Loading/2") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/dynamic_loading"))

findElement(linkText("Example 1: Element on page that is hidden")).click()
Expand All @@ -256,50 +256,50 @@ fun FunSpec.theInternetTests(
}

xtest("Entry Ad") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/entry_ad"))

}
}

xtest("Exit Intent") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/exit_intent"))

}
}

xtest("File Download") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/download"))

}
}

xtest("File Unload") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/upload"))

}
}

xtest("Floating menu") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/floating_menu"))

}
}

xtest("Forgot Password") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/forgot_password"))


}
}

test("Form Authentication/1") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/login"))

findElement(css("#username")).sendKeys(Text("tomsmith"))
Expand All @@ -311,7 +311,7 @@ fun FunSpec.theInternetTests(
}

test("Form Authentication/2") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/login"))

findElement(css("#login button")).click()
Expand All @@ -321,7 +321,7 @@ fun FunSpec.theInternetTests(
}

test("Form Authentication/3") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/login"))

findElement(css("#username")).sendKeys(Text("tomsmith"))
Expand All @@ -332,7 +332,7 @@ fun FunSpec.theInternetTests(
}

test("Nested frames") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/nested_frames"))

runCatching { findElement(css("frameset")) }.shouldBeSuccess()
Expand Down Expand Up @@ -365,7 +365,7 @@ fun FunSpec.theInternetTests(
}

test("iframes") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/iframe"))

runCatching { findElement(css("#tinymce")) }.shouldBeFailure()
Expand All @@ -376,13 +376,13 @@ fun FunSpec.theInternetTests(
}

xtest("Geolocation") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/geolocation"))
}
}

test("Horizontal Slider") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/horizontal_slider"))
val slider = findElement(tagName("input"))
val rangeValue = findElement(css("#range"))
Expand Down Expand Up @@ -414,7 +414,7 @@ fun FunSpec.theInternetTests(
}

test("Hovers") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/hovers"))
val figures = findElements(css(".figure"))
performActions(
Expand All @@ -437,22 +437,22 @@ fun FunSpec.theInternetTests(
}

xtest("Infinity Scroll") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/infinite_scroll"))


}
}

xtest("Inputs") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/inputs"))

}
}

test("Windows") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/windows"))
findElement(linkText("Click Here")).click()
switchToWindow(WindowHandle((getWindowHandles() - getWindowHandle()).first()))
Expand All @@ -462,31 +462,31 @@ fun FunSpec.theInternetTests(
}

xtest("Notification Message") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/notification_message_rendered"))


}
}

xtest("Redirections") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/redirector"))


}
}

xtest("Secure File Download") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/download-secure"))


}
}

xtest("Shadow DOM") {
withTestSession(testCase.displayName) {
withTestSession(testCase.name.testName) {
setUrl(PageUrl("$webUrl/shadow_dom"))


Expand Down
8 changes: 4 additions & 4 deletions examples/the-internet-browserstack/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ dependencies {
implementation(project(":core"))
implementation(project(":browserstack"))
implementation(project(":w3c"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")


testImplementation(project(":examples:common"))
testImplementation("io.kotest:kotest-runner-junit5:5.4.2")
testImplementation("io.kotest:kotest-framework-datatest:5.4.2")
testImplementation("ch.qos.logback:logback-classic:1.2.10")
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
testImplementation("io.kotest:kotest-framework-datatest:5.9.1")
testImplementation("ch.qos.logback:logback-classic:1.5.18")
testImplementation("io.ktor:ktor-client-cio-jvm:$ktor_version")
testImplementation("io.ktor:ktor-client-logging-jvm:$ktor_version")
}
Expand Down
4 changes: 2 additions & 2 deletions examples/the-internet-w3c-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ dependencies {
implementation(kotlin("stdlib"))
implementation(project(":core"))
implementation(project(":w3c"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")

testImplementation(project(":examples:common"))
testImplementation("io.kotest:kotest-runner-junit5:5.4.2")
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
testImplementation("io.ktor:ktor-client-cio-jvm:$ktor_version")
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kotlin.code.style=official
ktor_version=2.1.0
kotlin_version=1.7.10
ktor_version=3.1.3
kotlin_version=2.1.21
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading