diff --git a/web/core/src/jsTest/kotlin/elements/AttributesTests.kt b/web/core/src/jsTest/kotlin/elements/AttributesTests.kt index 119e4bfb96..587b04dd63 100644 --- a/web/core/src/jsTest/kotlin/elements/AttributesTests.kt +++ b/web/core/src/jsTest/kotlin/elements/AttributesTests.kt @@ -125,4 +125,28 @@ class AttributesTests { actual = div.getAttribute("class") ) } + + @Test + fun attributesRecreated() = runTest { + var flag by mutableStateOf(true) + + composition { + Div({ + if (flag) { + attr("a", "aa") + attr("b", "bb") + } else { + attr("b", "pp") + attr("c", "cc") + } + }) + } + + assertEquals("
", root.innerHTML) + + flag = false + + waitChanges() + assertEquals("
", root.innerHTML) + } } \ No newline at end of file