|
|
@ -185,12 +185,10 @@ class StaticComposableTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
fun stylesPosition() { |
|
|
|
fun stylesPosition() = runTest { |
|
|
|
val root = "div".asHtmlElement() |
|
|
|
|
|
|
|
val enumValues = Position.values() |
|
|
|
val enumValues = Position.values() |
|
|
|
renderComposable( |
|
|
|
|
|
|
|
root = root |
|
|
|
composition { |
|
|
|
) { |
|
|
|
|
|
|
|
enumValues.forEach { position -> |
|
|
|
enumValues.forEach { position -> |
|
|
|
Span( |
|
|
|
Span( |
|
|
|
{ |
|
|
|
{ |
|
|
@ -198,14 +196,14 @@ class StaticComposableTests { |
|
|
|
position(position) |
|
|
|
position(position) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
) { } |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enumValues.forEachIndexed { index, position -> |
|
|
|
enumValues.forEachIndexed { index, position -> |
|
|
|
assertEquals( |
|
|
|
assertEquals( |
|
|
|
"position: ${position.value};", |
|
|
|
"position: ${position.value};", |
|
|
|
(root.children[index] as HTMLElement).style.cssText |
|
|
|
nextChild().style.cssText |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|