aac_basic_richtext_test.rb 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. require 'browser_test_helper'
  2. class AACBasicRichtextTest < TestCase
  3. def test_richtext
  4. @browser = browser_instance
  5. login(
  6. username: 'master@example.com',
  7. password: 'test',
  8. url: browser_url,
  9. )
  10. click(css: 'a[href="#current_user"]')
  11. click(css: 'a[href="#layout_ref"]')
  12. click(css: 'a[href="#layout_ref/richtext"]')
  13. click(css: 'a[href="#current_user"]')
  14. # richtext single line
  15. set(
  16. css: '#content .text-1',
  17. value: 'some test for browser ',
  18. slow: true,
  19. )
  20. sleep 1
  21. sendkey(value: :enter)
  22. sendkey(value: 'and some other for browser')
  23. sleep 1
  24. match(
  25. css: '#content .text-1',
  26. value: 'some test for browser and some other for browser',
  27. )
  28. # text multi line
  29. set(
  30. css: '#content .text-3',
  31. value: 'some test for browser ',
  32. slow: true,
  33. )
  34. sleep 1
  35. sendkey(value: :enter)
  36. sendkey(value: 'and some other for browser')
  37. sleep 1
  38. match(
  39. css: '#content .text-3',
  40. value: "some test for browser\nand some other for browser",
  41. cleanup: true,
  42. )
  43. # richtext multi line
  44. set(
  45. css: '#content .text-5',
  46. value: 'some test for browser ',
  47. slow: true,
  48. )
  49. sleep 1
  50. sendkey(value: :enter)
  51. sendkey(value: 'and some other for browser2')
  52. sleep 1
  53. match(
  54. css: '#content .text-5',
  55. value: "some test for browser\nand some other for browser2",
  56. cleanup: true,
  57. )
  58. end
  59. end