extra functions, new test from amplify lessons

This commit is contained in:
metacryst
2024-09-25 22:03:32 -05:00
parent 71b08bd184
commit 6e2b4dcdbd
2 changed files with 119 additions and 12 deletions

View File

@@ -38,4 +38,42 @@ window.testSuites.push( class testStacks {
}
}
NestedStacks() {
register(class File extends Shadow {
$name
render = () => {
VStack(() => {
HStack(() => {
p("hi")
})
})
}
}, randomName("file"))
const file = File("asdf")
console.log(file)
let fileStyle = Registry.styles.children[Registry.styles.children.length-1].sheet.cssRules
if(fileStyle[0].cssText.includes("row")) {
return "Should not be horizontal"
}
console.log(file.innerHTML)
if(!file.children[0].matches("div.HStack")) {
return "The child is not an HStack"
}
file.rerender()
if(!file.children[0].matches("div.HStack")) {
return "The child is not an HStack"
}
let fileStyle2 = Registry.styles.children[Registry.styles.children.length-1].sheet.cssRules
if(fileStyle2[0].cssText.includes("row")) {
return "Should not be horizontal"
}
}
})

File diff suppressed because one or more lines are too long