File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
dom/src/test/scala/com/thoughtworks/binding Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ import org.scalajs.dom.html.Div
10
10
class ComponentModel extends FreeSpec with Matchers {
11
11
12
12
" @dom method component" in {
13
- @ dom def dialog : Binding [Div ] = <div class =" dialog" />
13
+ @ dom def dialog ( id : String ) : Binding [Div ] = <div id ={id} class =" dialog" />
14
14
15
- @ dom val html = <div >{dialog.bind}</div >
15
+ @ dom val html = <div >{dialog( " message " ) .bind}</div >
16
16
html.watch()
17
17
18
- assert(html.value.outerHTML == """ <div><div class="dialog"/></div>""" )
18
+ assert(html.value.outerHTML == """ <div><div class="dialog" id="message" /></div>""" )
19
19
}
20
20
21
21
" user defined tag component" in {
@@ -29,10 +29,10 @@ class ComponentModel extends FreeSpec with Matchers {
29
29
}
30
30
}
31
31
32
- @ dom val html = <div ><dialog /></div >
32
+ @ dom val html = <div ><dialog id = " message " /></div >
33
33
html.watch()
34
34
35
- assert(html.value.outerHTML == """ <div><div class="dialog"/></div>""" )
35
+ assert(html.value.outerHTML == """ <div><div class="dialog" id="message" /></div>""" )
36
36
}
37
37
38
38
}
You can’t perform that action at this time.
0 commit comments