Browse Source

Simplify call signatures in [web-core] tests

pull/702/head
Shagen Ogandzhanian 3 years ago
parent
commit
16813707d4
  1. 10
      web/core/src/jsTest/kotlin/elements/AttributesTests.kt
  2. 4
      web/core/src/jsTest/kotlin/elements/EventTests.kt
  3. 16
      web/core/src/jsTest/kotlin/elements/TableTests.kt

10
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"

4
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 = ""

16
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)
}
) {

Loading…
Cancel
Save