nested-props.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. casper.test.begin('Nested Properties', 13, function (test) {
  2. casper
  3. .start('./fixtures/nested-props.html', function () {
  4. test.assertSelectorHasText('h1 span', '')
  5. test.assertSelectorHasText('h2 span', '555')
  6. test.assertSelectorHasText('h3 span', 'Yoyoyo555')
  7. this.click('.one')
  8. test.assertSelectorHasText('h1 span', 'one')
  9. test.assertSelectorHasText('h2 span', '1')
  10. test.assertSelectorHasText('h3 span', 'Yoyoyoone1')
  11. this.click('.two')
  12. test.assertSelectorHasText('h1 span', 'two')
  13. test.assertSelectorHasText('h2 span', '2')
  14. test.assertSelectorHasText('h3 span', 'Yoyoyotwo2')
  15. this.click('.three')
  16. test.assertSelectorHasText('h1 span', 'three')
  17. test.assertSelectorHasText('h2 span', '3')
  18. test.assertSelectorHasText('h3 span', 'Yoyoyothree3')
  19. this.fill('#form', {
  20. msg: 'Oh yeah '
  21. })
  22. test.assertSelectorHasText('h3 span', 'Oh yeah three3')
  23. })
  24. .run(function () {
  25. test.done()
  26. })
  27. })