share-data.js 709 B

1234567891011121314151617181920212223242526272829
  1. casper.test.begin('Sharing Data between VMs', 7, function (test) {
  2. casper
  3. .start('./fixtures/share-data.html')
  4. .then(function () {
  5. test.assertSelectorHasText('#a', 'hello')
  6. test.assertSelectorHasText('#b', 'hello')
  7. test.assertField('input', 'hello')
  8. test.assertSelectorHasText('#d pre', '{"msg":"hello"}')
  9. })
  10. .then(function () {
  11. this.fill('#c', {
  12. input: 'durrr'
  13. })
  14. })
  15. .then(function () {
  16. test.assertSelectorHasText('#a', 'durrr')
  17. test.assertSelectorHasText('#b', 'durrr')
  18. test.assertSelectorHasText('#d pre', '{"msg":"durrr"}')
  19. })
  20. .run(function () {
  21. test.done()
  22. })
  23. })