Test-Drive ComponentJS with Model, View and Controller components
← Back
cs("//login3/model").value("data:username", "foo")
cs("//login3/model").value("data:password", "foo!bar!quux")
cs("//login3/model").value("event:button-clicked", true)
...the model of login dialog named "login3" was manipulated which
as a result both updated the view and triggered a business service
which in turn causes the following console output:
STATUS: login from "/ui/panel/model/view/login3" with realm "foo", username "foo" and password "foo!bar!quux"Finally, the
index.js was started on the shell with Node.js which
also performed a similar scripted interaction with another instance of the Demo App, but this time
running in a true head-less mode, i.e., without any DOM at all!