From 16813707d4d38dc89e537d7ed4347e851b226d64 Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Wed, 26 May 2021 22:32:18 +0200 Subject: [PATCH] Simplify call signatures in [web-core] tests --- .../jsTest/kotlin/elements/AttributesTests.kt | 10 +++++----- .../src/jsTest/kotlin/elements/EventTests.kt | 4 ++-- .../src/jsTest/kotlin/elements/TableTests.kt | 16 ++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/web/core/src/jsTest/kotlin/elements/AttributesTests.kt b/web/core/src/jsTest/kotlin/elements/AttributesTests.kt index 197d258958..608d766771 100644 --- a/web/core/src/jsTest/kotlin/elements/AttributesTests.kt +++ b/web/core/src/jsTest/kotlin/elements/AttributesTests.kt @@ -67,7 +67,7 @@ class AttributesTests { composition { Button( - attrs = { + { disabled(disabled) } ) {} @@ -85,7 +85,7 @@ class AttributesTests { @Test fun multipleClassesCallsAddMoreClasses() = runTest { composition { - Div(attrs = { + Div({ classes("a", "b") classes("c", "d") }) {} @@ -101,7 +101,7 @@ class AttributesTests { @Test fun multipleClassesBuildersCallsAddMoreClasses() = runTest { composition { - Div(attrs = { + Div({ classes("a", "b") classes { +"c" @@ -121,7 +121,7 @@ class AttributesTests { @Test fun multipleClassesBuildersCallsAddMoreClasses2() = runTest { composition { - Div(attrs = { + Div({ classes { +"c" +"d" @@ -141,7 +141,7 @@ class AttributesTests { fun multipleClassesBuildersCallsWithConditionsAddCorrectClasses() = runTest { val addClassD = mutableStateOf(true) composition { - Div(attrs = { + Div({ classes { +"c" if (addClassD.value) +"d" diff --git a/web/core/src/jsTest/kotlin/elements/EventTests.kt b/web/core/src/jsTest/kotlin/elements/EventTests.kt index f880d17606..b126e2024b 100644 --- a/web/core/src/jsTest/kotlin/elements/EventTests.kt +++ b/web/core/src/jsTest/kotlin/elements/EventTests.kt @@ -22,7 +22,7 @@ class EventTests { composition { Button( - attrs = { + { onClick { handeled = true } } ) {} @@ -81,7 +81,7 @@ class EventTests { composition { TextArea( - attrs = { + { onTextInput { handeled = true } }, value = "" diff --git a/web/core/src/jsTest/kotlin/elements/TableTests.kt b/web/core/src/jsTest/kotlin/elements/TableTests.kt index d44fa45f1b..f46465f22d 100644 --- a/web/core/src/jsTest/kotlin/elements/TableTests.kt +++ b/web/core/src/jsTest/kotlin/elements/TableTests.kt @@ -26,7 +26,7 @@ class TableTests { fun colAttributes() = runTest { composition { Col( - attrs = { + { span(2) } ) { } @@ -55,7 +55,7 @@ class TableTests { Th { } Th { } Th( - attrs = { + { colspan(2) } ) { @@ -66,12 +66,12 @@ class TableTests { Th { } Th { } Th( - attrs = { + { scope(Scope.Col) } ) { Text("A") } Th( - attrs = { + { scope(Scope.Col) } ) { Text("B") } @@ -80,7 +80,7 @@ class TableTests { Tbody { Tr { Th( - attrs = { + { scope(Scope.Row) rowspan(2) } @@ -88,7 +88,7 @@ class TableTests { Text("Rows") } Th( - attrs = { + { scope(Scope.Row) } ) { @@ -103,7 +103,7 @@ class TableTests { } Tr { Th( - attrs = { + { scope(Scope.Row) } ) { @@ -120,7 +120,7 @@ class TableTests { Tfoot { Tr { Th( - attrs = { + { scope(Scope.Row) } ) {