aab_unit_test.rb 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # encoding: utf-8
  2. require 'browser_test_helper'
  3. class AAbUnitTest < TestCase
  4. def test_core
  5. tests = [
  6. {
  7. :name => 'start',
  8. :instance => browser_instance,
  9. :url => browser_url + '/tests-core',
  10. :action => [
  11. {
  12. :execute => 'wait',
  13. :value => 8,
  14. },
  15. {
  16. :execute => 'match',
  17. :css => '.result .failed',
  18. :value => '0',
  19. :match_result => true,
  20. },
  21. ],
  22. },
  23. ]
  24. browser_single_test(tests)
  25. end
  26. def test_ui
  27. tests = [
  28. {
  29. :name => 'start',
  30. :instance => browser_instance,
  31. :url => browser_url + '/tests-ui',
  32. :action => [
  33. {
  34. :execute => 'wait',
  35. :value => 8,
  36. },
  37. {
  38. :execute => 'match',
  39. :css => '.result .failed',
  40. :value => '0',
  41. :match_result => true,
  42. },
  43. ],
  44. },
  45. ]
  46. browser_single_test(tests)
  47. end
  48. def test_model
  49. tests = [
  50. {
  51. :name => 'start',
  52. :instance => browser_instance,
  53. :url => browser_url + '/tests-model',
  54. :action => [
  55. {
  56. :execute => 'wait',
  57. :value => 8,
  58. },
  59. {
  60. :execute => 'match',
  61. :css => '.result .failed',
  62. :value => '0',
  63. :match_result => true,
  64. },
  65. ],
  66. },
  67. ]
  68. browser_single_test(tests)
  69. end
  70. def test_form
  71. tests = [
  72. {
  73. :name => 'start',
  74. :instance => browser_instance,
  75. :url => browser_url + '/tests-form',
  76. :action => [
  77. {
  78. :execute => 'wait',
  79. :value => 8,
  80. },
  81. {
  82. :execute => 'match',
  83. :css => '.result .failed',
  84. :value => '0',
  85. :match_result => true,
  86. },
  87. ],
  88. },
  89. ]
  90. browser_single_test(tests)
  91. end
  92. def test_table
  93. tests = [
  94. {
  95. :name => 'start',
  96. :instance => browser_instance,
  97. :url => browser_url + '/tests-table',
  98. :action => [
  99. {
  100. :execute => 'wait',
  101. :value => 8,
  102. },
  103. {
  104. :execute => 'match',
  105. :css => '.result .failed',
  106. :value => '0',
  107. :match_result => true,
  108. },
  109. ],
  110. },
  111. ]
  112. browser_single_test(tests)
  113. end
  114. end