Browse Source

fix tests related to changed API

pull/5150/head
InsanusMokrassar 3 months ago
parent
commit
e1a756fa9d
  1. 6
      html/compose-compiler-integration/src/jsTest/kotlin/AnonymousObjectsInComposable.kt
  2. 16
      html/compose-compiler-integration/src/jsTest/kotlin/ComposableLambdaCalls.kt

6
html/compose-compiler-integration/src/jsTest/kotlin/AnonymousObjectsInComposable.kt

@ -18,7 +18,7 @@ class AnonymousObjectsInComposable {
content.Abc()
}
assertEquals("<div>Abc</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>Abc</div>", document.body!!.lastElementChild!!.outerHTML)
}
@Test
@ -30,7 +30,7 @@ class AnonymousObjectsInComposable {
HasLocalClassWithComposable()
}
assertEquals("<div>Abc2</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>Abc2</div>", document.body!!.lastElementChild!!.outerHTML)
}
@Test
@ -41,7 +41,7 @@ class AnonymousObjectsInComposable {
TestConstructor { return@TestConstructor 111 }.otherComposable!!.invoke()
}
assertEquals("<div>Abc223-111</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>Abc223-111</div>", document.body!!.lastElementChild!!.outerHTML)
}
}

16
html/compose-compiler-integration/src/jsTest/kotlin/ComposableLambdaCalls.kt

@ -25,7 +25,7 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div>SomeText</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>SomeText</div>", document.body!!.lastElementChild!!.outerHTML)
}
@Test
@ -36,7 +36,7 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div>Text1</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>Text1</div>", document.body!!.lastElementChild!!.outerHTML)
}
@Test
@ -51,7 +51,7 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div>TextA</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>TextA</div>", document.body!!.lastElementChild!!.outerHTML)
}
@Test
@ -64,7 +64,7 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div></div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div></div>", document.body!!.lastElementChild!!.outerHTML)
}
@Test
@ -84,7 +84,7 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div></div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div></div>", document.body!!.lastElementChild!!.outerHTML)
assertEquals(false, someIntInvoked, message = "someInt() should never be invoked as `l` is null")
}
@ -107,7 +107,7 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div>Text10</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>Text10</div>", document.body!!.lastElementChild!!.outerHTML)
assertEquals(true, someIntInvoked)
}
@ -123,7 +123,7 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div>Text-SomeText</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>Text-SomeText</div>", document.body!!.lastElementChild!!.outerHTML)
}
@Test
@ -136,6 +136,6 @@ class ComposableLambdaCalls {
}
}
assertEquals("<div>SuperText</div>", document.body!!.firstElementChild!!.outerHTML)
assertEquals("<div>SuperText</div>", document.body!!.lastElementChild!!.outerHTML)
}
}

Loading…
Cancel
Save