prefereces_test.rb 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # encoding: utf-8
  2. require 'browser_test_helper'
  3. class PreferencesTest < TestCase
  4. def test_preferences
  5. tests = [
  6. {
  7. :name => 'preferences',
  8. :action => [
  9. {
  10. :execute => 'click',
  11. :css => 'a[href="#current_user"]',
  12. },
  13. {
  14. :execute => 'click',
  15. :css => 'a[href="#profile"]',
  16. },
  17. {
  18. :execute => 'click',
  19. :css => 'a[href="#profile/language"]',
  20. },
  21. {
  22. :execute => 'select',
  23. :css => '.language_item select[name="locale"]',
  24. :value => 'Deutsch',
  25. },
  26. {
  27. :execute => 'click',
  28. :css => '.content button[type="submit"]',
  29. },
  30. {
  31. :execute => 'wait',
  32. :value => 6,
  33. },
  34. {
  35. :execute => 'match',
  36. :css => 'body',
  37. :value => 'Sprache',
  38. :match_result => true,
  39. },
  40. {
  41. :execute => 'select',
  42. :css => '.language_item select[name="locale"]',
  43. :value => 'English (United States)',
  44. },
  45. {
  46. :execute => 'click',
  47. :css => '.content button[type="submit"]',
  48. },
  49. {
  50. :execute => 'wait',
  51. :value => 4,
  52. },
  53. {
  54. :execute => 'match',
  55. :css => 'body',
  56. :value => 'Language',
  57. :match_result => true,
  58. },
  59. ],
  60. },
  61. ]
  62. browser_signle_test_with_login(tests)
  63. end
  64. end