share-data.js 637 B

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