aab_unit_test.rb 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. require 'browser_test_helper'
  2. class AAbUnitTest < TestCase
  3. def test_core
  4. @browser = browser_instance
  5. location(url: browser_url + '/tests_core')
  6. sleep 5
  7. watch_for(
  8. css: '.result',
  9. value: 'Tests completed',
  10. timeout: 4,
  11. )
  12. match(
  13. css: '.result .failed',
  14. value: '0',
  15. )
  16. end
  17. def test_ui
  18. @browser = browser_instance
  19. location(url: browser_url + '/tests_ui')
  20. watch_for(
  21. css: '.result',
  22. value: 'Tests completed',
  23. timeout: 8,
  24. )
  25. match(
  26. css: '.result .failed',
  27. value: '0',
  28. )
  29. location(url: browser_url + '/tests_model')
  30. sleep 5
  31. watch_for(
  32. css: '.result',
  33. value: 'Tests completed',
  34. timeout: 3,
  35. )
  36. match(
  37. css: '.result .failed',
  38. value: '0',
  39. )
  40. location(url: browser_url + '/tests_model_binding')
  41. watch_for(
  42. css: '.result',
  43. value: 'Tests completed',
  44. timeout: 8,
  45. )
  46. match(
  47. css: '.result .failed',
  48. value: '0',
  49. )
  50. location(url: browser_url + '/tests_model_ui')
  51. watch_for(
  52. css: '.result',
  53. value: 'Tests completed',
  54. timeout: 8,
  55. )
  56. match(
  57. css: '.result .failed',
  58. value: '0',
  59. )
  60. location(url: browser_url + '/tests_ticket_selector')
  61. watch_for(
  62. css: '.result',
  63. value: 'Tests completed',
  64. timeout: 8,
  65. )
  66. match(
  67. css: '.result .failed',
  68. value: '0',
  69. )
  70. end
  71. def test_form
  72. @browser = browser_instance
  73. location(url: browser_url + '/tests_form')
  74. sleep 5
  75. watch_for(
  76. css: '.result',
  77. value: 'Tests completed',
  78. timeout: 2,
  79. )
  80. match(
  81. css: '.result .failed',
  82. value: '0',
  83. )
  84. location(url: browser_url + '/tests_form_trim')
  85. watch_for(
  86. css: '.result',
  87. value: 'Tests completed',
  88. timeout: 8,
  89. )
  90. match(
  91. css: '.result .failed',
  92. value: '0',
  93. )
  94. location(url: browser_url + '/tests_form_find')
  95. watch_for(
  96. css: '.result',
  97. value: 'Tests completed',
  98. timeout: 8,
  99. )
  100. match(
  101. css: '.result .failed',
  102. value: '0',
  103. )
  104. location(url: browser_url + '/tests_form_timer')
  105. watch_for(
  106. css: '.result',
  107. value: 'Tests completed',
  108. timeout: 8,
  109. )
  110. match(
  111. css: '.result .failed',
  112. value: '0',
  113. )
  114. location(url: browser_url + '/tests_form_extended')
  115. watch_for(
  116. css: '.result',
  117. value: 'Tests completed',
  118. timeout: 8,
  119. )
  120. match(
  121. css: '.result .failed',
  122. value: '0',
  123. )
  124. location(url: browser_url + '/tests_form_searchable_select')
  125. watch_for(
  126. css: '.result',
  127. value: 'Tests completed',
  128. timeout: 8,
  129. )
  130. match(
  131. css: '.result .failed',
  132. value: '0',
  133. )
  134. location(url: browser_url + '/tests_form_tree_select')
  135. watch_for(
  136. css: '.result',
  137. value: 'Tests completed',
  138. timeout: 8,
  139. )
  140. match(
  141. css: '.result .failed',
  142. value: '0',
  143. )
  144. location(url: browser_url + '/tests_form_column_select')
  145. watch_for(
  146. css: '.result',
  147. value: 'Tests completed',
  148. timeout: 8,
  149. )
  150. match(
  151. css: '.result .failed',
  152. value: '0',
  153. )
  154. location(url: browser_url + '/tests_form_validation')
  155. watch_for(
  156. css: '.result',
  157. value: 'Tests completed',
  158. timeout: 8,
  159. )
  160. match(
  161. css: '.result .failed',
  162. value: '0',
  163. )
  164. end
  165. def test_table
  166. @browser = browser_instance
  167. location(url: browser_url + '/tests_table')
  168. watch_for(
  169. css: '.result',
  170. value: 'Tests completed',
  171. timeout: 8,
  172. )
  173. match(
  174. css: '.result .failed',
  175. value: '0',
  176. )
  177. location(url: browser_url + '/tests_table_extended')
  178. watch_for(
  179. css: '.result',
  180. value: 'Tests completed',
  181. timeout: 8,
  182. )
  183. match(
  184. css: '.result .failed',
  185. value: '0',
  186. )
  187. location(url: browser_url + '/tests_html_utils')
  188. watch_for(
  189. css: '.result',
  190. value: 'Tests completed',
  191. timeout: 8,
  192. )
  193. match(
  194. css: '.result .failed',
  195. value: '0',
  196. )
  197. location(url: browser_url + '/tests_taskbar')
  198. sleep 5
  199. watch_for(
  200. css: '.result',
  201. value: 'Tests completed',
  202. timeout: 3,
  203. )
  204. match(
  205. css: '.result .failed',
  206. value: '0',
  207. )
  208. end
  209. end