markdown.js 672 B

12345678910111213141516171819
  1. module.exports = {
  2. 'markdown': function (browser) {
  3. browser
  4. .url('http://localhost:8080/examples/markdown/')
  5. .waitForElementVisible('#editor', 1000)
  6. .assert.value('textarea', '# hello')
  7. .assert.hasHTML('#editor div', '<h1 id="hello">hello</h1>')
  8. .setValue('textarea', '\n## foo\n\n- bar\n- baz')
  9. // assert the output is not updated yet because of debounce
  10. .assert.hasHTML('#editor div', '<h1 id="hello">hello</h1>')
  11. .waitFor(500)
  12. .assert.hasHTML('#editor div',
  13. '<h1 id="hello">hello</h1>\n' +
  14. '<h2 id="foo">foo</h2>\n' +
  15. '<ul>\n<li>bar</li>\n<li>baz</li>\n</ul>'
  16. )
  17. .end()
  18. }
  19. }