nested-vms.js 889 B

123456789101112131415161718192021
  1. casper.test.begin('Nested Viewmodels', 7, function (test) {
  2. casper
  3. .start('./fixtures/nested-vms.html')
  4. .then(function () {
  5. test.assertSelectorHasText('.ancestor', 'Andy Johnson')
  6. test.assertSelectorHasText('.jack', 'Jack, son of Andy')
  7. test.assertSelectorHasText('.mike', 'Mike, son of Jack')
  8. test.assertSelectorHasText('.jason', 'Jason, son of Jack')
  9. test.assertSelectorHasText('.tim', 'Tim, son of Mike, grandson of Jack, great-grandson of Andy, and offspring of family Johnson.')
  10. test.assertSelectorHasText('.tom', 'Tom, son of Mike, grandson of Jack, great-grandson of Andy, and offspring of family Johnson.')
  11. test.assertSelectorHasText('.andrew', 'Andrew, son of Jason, grandson of Jack, great-grandson of Andy, and offspring of family Johnson.')
  12. })
  13. .run(function () {
  14. test.done()
  15. })
  16. })