prefereces_test.rb 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 => 'watch_for',
  32. :area => 'body',
  33. :value => 'Sprache',
  34. },
  35. {
  36. :execute => 'select',
  37. :css => '.language_item select[name="locale"]',
  38. :value => 'English (United States)',
  39. },
  40. {
  41. :execute => 'click',
  42. :css => '.content button[type="submit"]',
  43. },
  44. {
  45. :execute => 'watch_for',
  46. :area => 'body',
  47. :value => 'Language',
  48. },
  49. ],
  50. },
  51. ]
  52. browser_signle_test_with_login(tests)
  53. end
  54. end