Browse Source

[web][tests] always use nextChild when you start with root.children[0], remove redundant braces

pull/1870/head
Shagen Ogandzhanian 3 years ago
parent
commit
6f89804467
  1. 5
      web/core/src/jsTest/kotlin/CSSUnitApiTests.kt
  2. 2
      web/core/src/jsTest/kotlin/css/AnimationTests.kt
  3. 22
      web/core/src/jsTest/kotlin/css/CSSBorderTests.kt
  4. 84
      web/core/src/jsTest/kotlin/css/CSSBoxTests.kt
  5. 40
      web/core/src/jsTest/kotlin/css/CSSFlexTests.kt
  6. 18
      web/core/src/jsTest/kotlin/css/CSSListStyleTests.kt
  7. 8
      web/core/src/jsTest/kotlin/css/CSSMarginTests.kt
  8. 22
      web/core/src/jsTest/kotlin/css/CSSOverflowTests.kt
  9. 8
      web/core/src/jsTest/kotlin/css/CSSPaddingTests.kt
  10. 94
      web/core/src/jsTest/kotlin/css/CSSTextTests.kt
  11. 8
      web/core/src/jsTest/kotlin/css/CSSUiTests.kt

5
web/core/src/jsTest/kotlin/CSSUnitApiTests.kt

@ -522,8 +522,9 @@ class CSSUnitApiTests {
}) })
} }
val el = nextChild()
assertEquals("5px", (root.children[0] as HTMLElement).style.left) assertEquals("5px", el.style.left)
assertEquals("8px", (root.children[0] as HTMLElement).style.top) assertEquals("8px", el.style.top)
} }
} }

2
web/core/src/jsTest/kotlin/css/AnimationTests.kt

@ -57,7 +57,7 @@ class AnimationTests {
Style(AnimationsStyleSheet) Style(AnimationsStyleSheet)
} }
val el = root.children[0] as HTMLStyleElement val el = nextChild() as HTMLStyleElement
val cssRules = (el.sheet as? CSSStyleSheet)?.cssRules val cssRules = (el.sheet as? CSSStyleSheet)?.cssRules
val rules = (0 until (cssRules?.length ?: 0)).map { val rules = (0 until (cssRules?.length ?: 0)).map {
cssRules?.item(it)?.cssText?.replace("\n", "") ?: "" cssRules?.item(it)?.cssText?.replace("\n", "") ?: ""

22
web/core/src/jsTest/kotlin/css/CSSBorderTests.kt

@ -20,8 +20,8 @@ class CSSBorderTests {
Div({ style { border(3.px, color = Color("green")) } }) Div({ style { border(3.px, color = Color("green")) } })
} }
assertEquals("1px solid red", (nextChild()).style.border) assertEquals("1px solid red", nextChild().style.border)
(nextChild()).let { el -> nextChild().let { el ->
assertEquals("green", el.style.getPropertyValue("border-color")) assertEquals("green", el.style.getPropertyValue("border-color"))
assertEquals("3px", el.style.getPropertyValue("border-width")) assertEquals("3px", el.style.getPropertyValue("border-width"))
} }
@ -33,7 +33,7 @@ class CSSBorderTests {
Div({ style { border(3.px, LineStyle.Dotted, Color("green")) } }) Div({ style { border(3.px, LineStyle.Dotted, Color("green")) } })
} }
assertEquals("3px dotted green", (nextChild()).style.border) assertEquals("3px dotted green", nextChild().style.border)
} }
@Test @Test
@ -45,10 +45,10 @@ class CSSBorderTests {
Div({ style { borderRadius(3.px, 5.px, 4.px, 1.px) } }) Div({ style { borderRadius(3.px, 5.px, 4.px, 1.px) } })
} }
assertEquals("3px", (nextChild()).style.borderRadius) assertEquals("3px", nextChild().style.borderRadius)
assertEquals("3px 5px", (nextChild()).style.borderRadius) assertEquals("3px 5px", nextChild().style.borderRadius)
assertEquals("3px 5px 4px", (nextChild()).style.borderRadius) assertEquals("3px 5px 4px", nextChild().style.borderRadius)
assertEquals("3px 5px 4px 1px", (nextChild()).style.borderRadius) assertEquals("3px 5px 4px 1px", nextChild().style.borderRadius)
} }
@ -61,9 +61,9 @@ class CSSBorderTests {
Div({ style { borderWidth(3.px, 5.px, 4.px, 2.px) } }) Div({ style { borderWidth(3.px, 5.px, 4.px, 2.px) } })
} }
assertEquals("2px", (nextChild()).style.borderWidth) assertEquals("2px", nextChild().style.borderWidth)
assertEquals("3px 7px", (nextChild()).style.borderWidth) assertEquals("3px 7px", nextChild().style.borderWidth)
assertEquals("3px 5px 4px", (nextChild()).style.borderWidth) assertEquals("3px 5px 4px", nextChild().style.borderWidth)
assertEquals("3px 5px 4px 2px", (nextChild()).style.borderWidth) assertEquals("3px 5px 4px 2px", nextChild().style.borderWidth)
} }
} }

84
web/core/src/jsTest/kotlin/css/CSSBoxTests.kt

@ -27,7 +27,7 @@ class CSSBoxTests {
) )
} }
assertEquals("100px", (nextChild()).style.width) assertEquals("100px", nextChild().style.width)
} }
@Test @Test
@ -42,7 +42,7 @@ class CSSBoxTests {
) )
} }
assertEquals("90px", (nextChild()).style.height) assertEquals("90px", nextChild().style.height)
} }
@Test @Test
@ -64,8 +64,8 @@ class CSSBoxTests {
) )
} }
assertEquals("border-box", (nextChild()).style.boxSizing) assertEquals("border-box", nextChild().style.boxSizing)
assertEquals("content-box", (nextChild()).style.boxSizing) assertEquals("content-box", nextChild().style.boxSizing)
} }
@Test @Test
@ -108,10 +108,10 @@ class CSSBoxTests {
) )
} }
assertEquals("thin", (nextChild()).style.outlineWidth) assertEquals("thin", nextChild().style.outlineWidth)
assertEquals("medium", (nextChild()).style.outlineWidth) assertEquals("medium", nextChild().style.outlineWidth)
assertEquals("thick", (nextChild()).style.outlineWidth) assertEquals("thick", nextChild().style.outlineWidth)
assertEquals("8px", (nextChild()).style.outlineWidth) assertEquals("8px", nextChild().style.outlineWidth)
assertEquals("0.1em", (root.children[4] as HTMLElement).style.outlineWidth) assertEquals("0.1em", (root.children[4] as HTMLElement).style.outlineWidth)
} }
@ -130,8 +130,8 @@ class CSSBoxTests {
}) })
} }
assertEquals("red", (nextChild()).style.outlineColor) assertEquals("red", nextChild().style.outlineColor)
assertEquals("rgb(50, 161, 206)", (nextChild()).style.outlineColor) assertEquals("rgb(50, 161, 206)", nextChild().style.outlineColor)
} }
@Test @Test
@ -147,14 +147,14 @@ class CSSBoxTests {
Div({ style { outlineStyle("inset") } }) Div({ style { outlineStyle("inset") } })
} }
assertEquals("dotted", (nextChild()).style.outlineStyle) assertEquals("dotted", nextChild().style.outlineStyle)
assertEquals("dashed", (nextChild()).style.outlineStyle) assertEquals("dashed", nextChild().style.outlineStyle)
assertEquals("solid", (nextChild()).style.outlineStyle) assertEquals("solid", nextChild().style.outlineStyle)
assertEquals("double", (nextChild()).style.outlineStyle) assertEquals("double", nextChild().style.outlineStyle)
assertEquals("groove", (root.children[4] as HTMLElement).style.outlineStyle) assertEquals("groove", nextChild().style.outlineStyle)
assertEquals("ridge", (root.children[5] as HTMLElement).style.outlineStyle) assertEquals("ridge", nextChild().style.outlineStyle)
assertEquals("outset", (root.children[6] as HTMLElement).style.outlineStyle) assertEquals("outset", nextChild().style.outlineStyle)
assertEquals("inset", (root.children[7] as HTMLElement).style.outlineStyle) assertEquals("inset", nextChild().style.outlineStyle)
} }
@Test @Test
@ -163,7 +163,7 @@ class CSSBoxTests {
Div({ style { outline("dotted") } }) Div({ style { outline("dotted") } })
} }
assertEquals("dotted", (nextChild()).style.outlineStyle) assertEquals("dotted", nextChild().style.outlineStyle)
} }
@Test @Test
@ -174,17 +174,17 @@ class CSSBoxTests {
Div({ style { outline("ridge", 3.px) } }) Div({ style { outline("ridge", 3.px) } })
} }
(nextChild()).let { nextChild().let {
assertEquals("rgb(255, 102, 102)", it.style.outlineColor) assertEquals("rgb(255, 102, 102)", it.style.outlineColor)
assertEquals("dashed", it.style.outlineStyle) assertEquals("dashed", it.style.outlineStyle)
} }
(nextChild()).let { nextChild().let {
assertEquals("inset", it.style.outlineStyle) assertEquals("inset", it.style.outlineStyle)
assertEquals("thick", it.style.outlineWidth) assertEquals("thick", it.style.outlineWidth)
} }
(nextChild()).let { nextChild().let {
assertEquals("ridge", it.style.outlineStyle) assertEquals("ridge", it.style.outlineStyle)
assertEquals("3px", it.style.outlineWidth) assertEquals("3px", it.style.outlineWidth)
} }
@ -199,10 +199,10 @@ class CSSBoxTests {
Div({ style { outline("yellow", "inset", 8.px) } }) Div({ style { outline("yellow", "inset", 8.px) } })
} }
assertEquals("rgb(0, 20, 100) dashed thick", (nextChild()).style.outline) assertEquals("rgb(0, 20, 100) dashed thick", nextChild().style.outline)
assertEquals("rgb(0, 100, 20) double 4px", (nextChild()).style.outline) assertEquals("rgb(0, 100, 20) double 4px", nextChild().style.outline)
assertEquals("red outset thin", (nextChild()).style.outline) assertEquals("red outset thin", nextChild().style.outline)
assertEquals("yellow inset 8px", (nextChild()).style.outline) assertEquals("yellow inset 8px", nextChild().style.outline)
} }
@Test @Test
@ -214,10 +214,10 @@ class CSSBoxTests {
Div({ style { minWidth("min-content") } }) Div({ style { minWidth("min-content") } })
} }
assertEquals("3.5em", (nextChild()).style.minWidth) assertEquals("3.5em", nextChild().style.minWidth)
assertEquals("75%", (nextChild()).style.minWidth) assertEquals("75%", nextChild().style.minWidth)
assertEquals("max-content", (nextChild()).style.minWidth) assertEquals("max-content", nextChild().style.minWidth)
assertEquals("min-content", (nextChild()).style.minWidth) assertEquals("min-content", nextChild().style.minWidth)
} }
@Test @Test
@ -229,10 +229,10 @@ class CSSBoxTests {
Div({ style { maxWidth("min-content") } }) Div({ style { maxWidth("min-content") } })
} }
assertEquals("0.5em", (nextChild()).style.maxWidth) assertEquals("0.5em", nextChild().style.maxWidth)
assertEquals("10%", (nextChild()).style.maxWidth) assertEquals("10%", nextChild().style.maxWidth)
assertEquals("max-content", (nextChild()).style.maxWidth) assertEquals("max-content", nextChild().style.maxWidth)
assertEquals("min-content", (nextChild()).style.maxWidth) assertEquals("min-content", nextChild().style.maxWidth)
} }
@Test @Test
@ -244,10 +244,10 @@ class CSSBoxTests {
Div({ style { minHeight("min-content") } }) Div({ style { minHeight("min-content") } })
} }
assertEquals("5px", (nextChild()).style.minHeight) assertEquals("5px", nextChild().style.minHeight)
assertEquals("25%", (nextChild()).style.minHeight) assertEquals("25%", nextChild().style.minHeight)
assertEquals("max-content", (nextChild()).style.minHeight) assertEquals("max-content", nextChild().style.minHeight)
assertEquals("min-content", (nextChild()).style.minHeight) assertEquals("min-content", nextChild().style.minHeight)
} }
@Test @Test
@ -259,9 +259,9 @@ class CSSBoxTests {
Div({ style { maxHeight("min-content") } }) Div({ style { maxHeight("min-content") } })
} }
assertEquals("15px", (nextChild()).style.maxHeight) assertEquals("15px", nextChild().style.maxHeight)
assertEquals("35%", (nextChild()).style.maxHeight) assertEquals("35%", nextChild().style.maxHeight)
assertEquals("max-content", (nextChild()).style.maxHeight) assertEquals("max-content", nextChild().style.maxHeight)
assertEquals("min-content", (nextChild()).style.maxHeight) assertEquals("min-content", nextChild().style.maxHeight)
} }
} }

40
web/core/src/jsTest/kotlin/css/CSSFlexTests.kt

@ -36,8 +36,8 @@ class CSSFlexTests {
) )
} }
assertEquals("-4", (nextChild()).style.order) assertEquals("-4", nextChild().style.order)
assertEquals("3", (nextChild()).style.order) assertEquals("3", nextChild().style.order)
} }
@Test @Test
@ -73,10 +73,10 @@ class CSSFlexTests {
) )
} }
assertEquals("3", (nextChild()).style.flexGrow) assertEquals("3", nextChild().style.flexGrow)
assertEquals("2.5", (nextChild()).style.flexGrow) assertEquals("2.5", nextChild().style.flexGrow)
assertEquals("100", (nextChild()).style.flexGrow) assertEquals("100", nextChild().style.flexGrow)
assertEquals("0.6", (nextChild()).style.flexGrow) assertEquals("0.6", nextChild().style.flexGrow)
} }
@Test @Test
@ -112,10 +112,10 @@ class CSSFlexTests {
) )
} }
assertEquals("3", (nextChild()).style.flexShrink) assertEquals("3", nextChild().style.flexShrink)
assertEquals("2.5", (nextChild()).style.flexShrink) assertEquals("2.5", nextChild().style.flexShrink)
assertEquals("100", (nextChild()).style.flexShrink) assertEquals("100", nextChild().style.flexShrink)
assertEquals("0.6", (nextChild()).style.flexShrink) assertEquals("0.6", nextChild().style.flexShrink)
} }
@Test @Test
@ -140,7 +140,7 @@ class CSSFlexTests {
flexWraps.forEach { flexWrap -> flexWraps.forEach { flexWrap ->
assertEquals( assertEquals(
"${flexDirection.value} ${flexWrap.value}", "${flexDirection.value} ${flexWrap.value}",
(nextChild()).style.flexFlow nextChild().style.flexFlow
) )
} }
} }
@ -164,7 +164,7 @@ class CSSFlexTests {
enumValues.forEach { justifyContent -> enumValues.forEach { justifyContent ->
assertEquals( assertEquals(
justifyContent.value, justifyContent.value,
(nextChild()).style.justifyContent nextChild().style.justifyContent
) )
} }
} }
@ -233,7 +233,7 @@ class CSSFlexTests {
enumValues.forEach { alignContent -> enumValues.forEach { alignContent ->
assertEquals( assertEquals(
alignContent.value, alignContent.value,
(nextChild()).style.alignContent nextChild().style.alignContent
) )
} }
} }
@ -256,7 +256,7 @@ class CSSFlexTests {
enumValues.forEach { displayStyle -> enumValues.forEach { displayStyle ->
assertEquals( assertEquals(
displayStyle.value, displayStyle.value,
(nextChild()).style.flexDirection nextChild().style.flexDirection
) )
} }
} }
@ -300,8 +300,8 @@ class CSSFlexTests {
}) })
} }
assertEquals("10em", (nextChild()).style.flexBasis) assertEquals("10em", nextChild().style.flexBasis)
assertEquals("auto", (nextChild()).style.flexBasis) assertEquals("auto", nextChild().style.flexBasis)
} }
@Test @Test
@ -329,10 +329,10 @@ class CSSFlexTests {
}) })
} }
assertEquals("auto", (nextChild()).style.flexBasis) assertEquals("auto", nextChild().style.flexBasis)
assertEquals("initial", (nextChild()).style.flexBasis) assertEquals("initial", nextChild().style.flexBasis)
assertEquals("2", (nextChild()).style.flexGrow) assertEquals("2", nextChild().style.flexGrow)
assertEquals("10em", (nextChild()).style.flexBasis) assertEquals("10em", nextChild().style.flexBasis)
} }
@Test @Test

18
web/core/src/jsTest/kotlin/css/CSSListStyleTests.kt

@ -35,9 +35,9 @@ class CSSListStyleTests {
} }
assertEquals("none", (nextChild()).style.listStyleImage) assertEquals("none", nextChild().style.listStyleImage)
assertEquals("url(\"starsolid.gif\")", (nextChild()).style.listStyleImage) assertEquals("url(\"starsolid.gif\")", nextChild().style.listStyleImage)
assertEquals("linear-gradient(to left bottom, red, blue)", (nextChild()).style.listStyleImage) assertEquals("linear-gradient(to left bottom, red, blue)", nextChild().style.listStyleImage)
} }
@Test @Test
@ -55,8 +55,8 @@ class CSSListStyleTests {
}) })
} }
assertEquals("inside", (nextChild()).style.listStylePosition) assertEquals("inside", nextChild().style.listStylePosition)
assertEquals("outside", (nextChild()).style.listStylePosition) assertEquals("outside", nextChild().style.listStylePosition)
} }
@ -85,10 +85,10 @@ class CSSListStyleTests {
}) })
} }
assertEquals("armenian", (nextChild()).style.listStyleType) assertEquals("armenian", nextChild().style.listStyleType)
assertEquals("disc", (nextChild()).style.listStyleType) assertEquals("disc", nextChild().style.listStyleType)
assertEquals("circle", (nextChild()).style.listStyleType) assertEquals("circle", nextChild().style.listStyleType)
assertEquals("square", (nextChild()).style.listStyleType) assertEquals("square", nextChild().style.listStyleType)
} }
@Test @Test

8
web/core/src/jsTest/kotlin/css/CSSMarginTests.kt

@ -22,7 +22,7 @@ class CSSMarginTests {
}) })
} }
assertEquals("5px", (nextChild()).style.marginLeft) assertEquals("5px", nextChild().style.marginLeft)
} }
@Test @Test
@ -35,7 +35,7 @@ class CSSMarginTests {
}) })
} }
assertEquals("15px", (nextChild()).style.marginTop) assertEquals("15px", nextChild().style.marginTop)
} }
@Test @Test
@ -48,7 +48,7 @@ class CSSMarginTests {
}) })
} }
assertEquals("12vw", (nextChild()).style.marginRight) assertEquals("12vw", nextChild().style.marginRight)
} }
@Test @Test
@ -61,7 +61,7 @@ class CSSMarginTests {
}) })
} }
assertEquals("12%", (nextChild()).style.marginBottom) assertEquals("12%", nextChild().style.marginBottom)
} }
@Test @Test

22
web/core/src/jsTest/kotlin/css/CSSOverflowTests.kt

@ -42,11 +42,11 @@ class CSSOverflowTests {
}) })
} }
assertEquals("visible", (nextChild()).style.overflowX) assertEquals("visible", nextChild().style.overflowX)
assertEquals("hidden", (nextChild()).style.overflowX) assertEquals("hidden", nextChild().style.overflowX)
assertEquals("clip", (nextChild()).style.overflowX) assertEquals("clip", nextChild().style.overflowX)
assertEquals("scroll", (nextChild()).style.overflowX) assertEquals("scroll", nextChild().style.overflowX)
assertEquals("auto", (nextChild()).style.overflowX) assertEquals("auto", nextChild().style.overflowX)
} }
@Test @Test
@ -79,11 +79,11 @@ class CSSOverflowTests {
}) })
} }
assertEquals("visible", (nextChild()).style.overflowY) assertEquals("visible", nextChild().style.overflowY)
assertEquals("hidden", (nextChild()).style.overflowY) assertEquals("hidden", nextChild().style.overflowY)
assertEquals("clip", (nextChild()).style.overflowY) assertEquals("clip", nextChild().style.overflowY)
assertEquals("scroll", (nextChild()).style.overflowY) assertEquals("scroll", nextChild().style.overflowY)
assertEquals("auto", (nextChild()).style.overflowY) assertEquals("auto", nextChild().style.overflowY)
} }
@Test @Test
@ -96,7 +96,7 @@ class CSSOverflowTests {
}) })
} }
val style = (nextChild()).style val style = nextChild().style
assertEquals("clip", style.overflowX) assertEquals("clip", style.overflowX)
assertEquals("clip", style.overflowY) assertEquals("clip", style.overflowY)
} }

8
web/core/src/jsTest/kotlin/css/CSSPaddingTests.kt

@ -30,7 +30,7 @@ class CSSPaddingTests {
}) })
} }
assertEquals("5px", (nextChild()).style.paddingLeft) assertEquals("5px", nextChild().style.paddingLeft)
} }
@Test @Test
@ -43,7 +43,7 @@ class CSSPaddingTests {
}) })
} }
assertEquals("15px", (nextChild()).style.paddingTop) assertEquals("15px", nextChild().style.paddingTop)
} }
@Test @Test
@ -56,7 +56,7 @@ class CSSPaddingTests {
}) })
} }
assertEquals("12vw", (nextChild()).style.paddingRight) assertEquals("12vw", nextChild().style.paddingRight)
} }
@Test @Test
@ -69,7 +69,7 @@ class CSSPaddingTests {
}) })
} }
assertEquals("12%", (nextChild()).style.paddingBottom) assertEquals("12%", nextChild().style.paddingBottom)
} }
@Test @Test

94
web/core/src/jsTest/kotlin/css/CSSTextTests.kt

@ -23,7 +23,7 @@ class CSSTextTests {
}) })
} }
assertEquals("20em", (nextChild()).style.fontSize) assertEquals("20em", nextChild().style.fontSize)
} }
@Test @Test
@ -41,8 +41,8 @@ class CSSTextTests {
}) })
} }
assertEquals("italic", (nextChild()).style.fontStyle) assertEquals("italic", nextChild().style.fontStyle)
assertEquals("oblique", (nextChild()).style.fontStyle) assertEquals("oblique", nextChild().style.fontStyle)
} }
@Test @Test
@ -75,11 +75,11 @@ class CSSTextTests {
}) })
} }
assertEquals("bold", (nextChild()).style.fontWeight) assertEquals("bold", nextChild().style.fontWeight)
assertEquals("bolder", (nextChild()).style.fontWeight) assertEquals("bolder", nextChild().style.fontWeight)
assertEquals("lighter", (nextChild()).style.fontWeight) assertEquals("lighter", nextChild().style.fontWeight)
assertEquals("100", (nextChild()).style.fontWeight) assertEquals("100", nextChild().style.fontWeight)
assertEquals("800", (nextChild()).style.fontWeight) assertEquals("800", nextChild().style.fontWeight)
} }
@Test @Test
@ -97,8 +97,8 @@ class CSSTextTests {
}) })
} }
assertEquals("normal", (nextChild()).style.lineHeight) assertEquals("normal", nextChild().style.lineHeight)
assertEquals("2em", (nextChild()).style.lineHeight) assertEquals("2em", nextChild().style.lineHeight)
} }
@Test @Test
@ -116,8 +116,8 @@ class CSSTextTests {
}) })
} }
assertEquals("normal", (nextChild()).style.letterSpacing) assertEquals("normal", nextChild().style.letterSpacing)
assertEquals("2em", (nextChild()).style.letterSpacing) assertEquals("2em", nextChild().style.letterSpacing)
} }
@Test @Test
@ -135,8 +135,8 @@ class CSSTextTests {
}) })
} }
assertEquals("\"Gill Sans Extrabold\", sans-serif", (nextChild()).style.fontFamily) assertEquals("\"Gill Sans Extrabold\", sans-serif", nextChild().style.fontFamily)
assertEquals("sans-serif", (nextChild()).style.fontFamily) assertEquals("sans-serif", nextChild().style.fontFamily)
} }
@Test @Test
@ -149,7 +149,7 @@ class CSSTextTests {
}) })
} }
assertEquals("italic bold 0.8em / 1.2 Arial, sans-serif", (nextChild()).style.font) assertEquals("italic bold 0.8em / 1.2 Arial, sans-serif", nextChild().style.font)
} }
@Test @Test
@ -187,12 +187,12 @@ class CSSTextTests {
}) })
} }
assertEquals("left", (nextChild()).style.textAlign) assertEquals("left", nextChild().style.textAlign)
assertEquals("right", (nextChild()).style.textAlign) assertEquals("right", nextChild().style.textAlign)
assertEquals("center", (nextChild()).style.textAlign) assertEquals("center", nextChild().style.textAlign)
assertEquals("justify", (nextChild()).style.textAlign) assertEquals("justify", nextChild().style.textAlign)
assertEquals("start", (nextChild()).style.textAlign) assertEquals("start", nextChild().style.textAlign)
assertEquals("end", (nextChild()).style.textAlign) assertEquals("end", nextChild().style.textAlign)
} }
@ -211,8 +211,8 @@ class CSSTextTests {
}) })
} }
assertEquals("red", (nextChild()).style.textDecorationColor) assertEquals("red", nextChild().style.textDecorationColor)
assertEquals("rgba(0, 200, 20, 0.85)", (nextChild()).style.textDecorationColor) assertEquals("rgba(0, 200, 20, 0.85)", nextChild().style.textDecorationColor)
} }
@Test @Test
@ -245,11 +245,11 @@ class CSSTextTests {
}) })
} }
assertEquals("solid", (nextChild()).style.textDecorationStyle) assertEquals("solid", nextChild().style.textDecorationStyle)
assertEquals("double", (nextChild()).style.textDecorationStyle) assertEquals("double", nextChild().style.textDecorationStyle)
assertEquals("dotted", (nextChild()).style.textDecorationStyle) assertEquals("dotted", nextChild().style.textDecorationStyle)
assertEquals("dashed", (nextChild()).style.textDecorationStyle) assertEquals("dashed", nextChild().style.textDecorationStyle)
assertEquals("wavy", (nextChild()).style.textDecorationStyle) assertEquals("wavy", nextChild().style.textDecorationStyle)
} }
@Test @Test
@ -277,10 +277,10 @@ class CSSTextTests {
}) })
} }
assertEquals("text-decoration-thickness: auto;", (nextChild()).style.cssText) assertEquals("text-decoration-thickness: auto;", nextChild().style.cssText)
assertEquals("text-decoration-thickness: from-font;", (nextChild()).style.cssText) assertEquals("text-decoration-thickness: from-font;", nextChild().style.cssText)
assertEquals("text-decoration-thickness: 10px;", (nextChild()).style.cssText) assertEquals("text-decoration-thickness: 10px;", nextChild().style.cssText)
assertEquals("text-decoration-thickness: 2%;", (nextChild()).style.cssText) assertEquals("text-decoration-thickness: 2%;", nextChild().style.cssText)
} }
@Test @Test
@ -313,11 +313,11 @@ class CSSTextTests {
}) })
} }
assertEquals("none", (nextChild()).style.textDecorationLine) assertEquals("none", nextChild().style.textDecorationLine)
assertEquals("underline", (nextChild()).style.textDecorationLine) assertEquals("underline", nextChild().style.textDecorationLine)
assertEquals("overline", (nextChild()).style.textDecorationLine) assertEquals("overline", nextChild().style.textDecorationLine)
assertEquals("line-through", (nextChild()).style.textDecorationLine) assertEquals("line-through", nextChild().style.textDecorationLine)
assertEquals("blink", (nextChild()).style.textDecorationLine) assertEquals("blink", nextChild().style.textDecorationLine)
} }
@Test @Test
@ -345,10 +345,10 @@ class CSSTextTests {
}) })
} }
assertEquals("underline red", (nextChild()).style.textDecoration) assertEquals("underline red", nextChild().style.textDecoration)
assertEquals("overline wavy lime", (nextChild()).style.textDecoration) assertEquals("overline wavy lime", nextChild().style.textDecoration)
assertEquals("line-through", (nextChild()).style.textDecoration) assertEquals("line-through", nextChild().style.textDecoration)
assertEquals("underline overline dashed", (nextChild()).style.textDecoration) assertEquals("underline overline dashed", nextChild().style.textDecoration)
} }
@Test @Test
@ -386,12 +386,12 @@ class CSSTextTests {
}) })
} }
assertEquals("normal", (nextChild()).style.whiteSpace) assertEquals("normal", nextChild().style.whiteSpace)
assertEquals("nowrap", (nextChild()).style.whiteSpace) assertEquals("nowrap", nextChild().style.whiteSpace)
assertEquals("pre", (nextChild()).style.whiteSpace) assertEquals("pre", nextChild().style.whiteSpace)
assertEquals("pre-wrap", (nextChild()).style.whiteSpace) assertEquals("pre-wrap", nextChild().style.whiteSpace)
assertEquals("pre-line", (nextChild()).style.whiteSpace) assertEquals("pre-line", nextChild().style.whiteSpace)
assertEquals("break-spaces", (nextChild()).style.whiteSpace) assertEquals("break-spaces", nextChild().style.whiteSpace)
} }
} }

8
web/core/src/jsTest/kotlin/css/CSSUiTests.kt

@ -37,9 +37,9 @@ class CSSUiTests {
}) })
} }
assertEquals("pointer", (nextChild()).style.cursor) assertEquals("pointer", nextChild().style.cursor)
assertEquals("auto", (nextChild()).style.cursor) assertEquals("auto", nextChild().style.cursor)
assertEquals("url(\"hand.cur\"), pointer", (nextChild()).style.cursor) assertEquals("url(\"hand.cur\"), pointer", nextChild().style.cursor)
assertEquals("url(\"cursor2.png\") 2 2, pointer", (nextChild()).style.cursor) assertEquals("url(\"cursor2.png\") 2 2, pointer", nextChild().style.cursor)
} }
} }

Loading…
Cancel
Save