14
14
#fill_in "banner", :with => "http://sho.tdiary.net/images/banner.png"
15
15
# TODO x_frame_open の設定
18
within('title') { page.should have_content('(設定完了)') }
17
page.all('div.saveconf').first.click_button "OK"
18
# within('title') { page.should have_content('(設定完了)') }
21
21
# TODO その他の項目の反映を確認
22
within('title') { page.should have_content('ただの日記') }
22
# within('title') { page.should have_content('ただの日記') }
24
24
visit '/update.rb?conf=default'
25
25
page.should have_field "author_name", :with => "ただただし"
81
81
fill_in 'latest_limit', :with => 1
82
82
select '非表示', :from => 'show_nyear'
85
within('title') { page.should have_content('(設定完了)') }
84
page.all('div.saveconf').first.click_button "OK"
85
# within('title') { page.should have_content('(設定完了)') }
88
88
page.should have_content('★')
111
111
visit '/update.rb?conf=timezone'
112
112
fill_in 'hour_offset', :with => '-24'
115
within('title') { page.should have_content('(設定完了)') }
114
page.all('div.saveconf').first.click_button "OK"
115
# within('title') { page.should have_content('(設定完了)') }
118
118
y, m, d = (Date.today - 1).to_s.split('-').map {|t| t.sub(/^0+/, "") }
119
within('div.day div.form') {
120
within('span.year') { page.should have_field('year', :with => y) }
121
within('span.month') { page.should have_field('month', :with => m) }
122
within('span.day') { page.should have_field('day', :with => d) }
119
within('span.year') { page.should have_field('year', :with => y) }
120
within('span.month') { page.should have_field('month', :with => m) }
121
within('span.day') { page.should have_field('day', :with => d) }
126
124
click_link '時差調整'
127
125
page.should have_field('hour_offset', :with => '-24.0')
130
scenario 'Rack 環境でテーマ選択が保存される', :exclude_selenium => true do
131
visit '/update.rb?conf=theme'
132
select 'Tdiary1', :from => 'theme'
135
within('title') { page.should have_content('(設定完了)') }
139
page.should have_css('link[href="assets/base.css"]')
140
page.should have_css('link[href="assets/tdiary1/tdiary1.css"]')
143
visit '/update.rb?conf=theme'
144
within('select option[selected]'){
145
page.should have_content 'Tdiary1'
128
if RUBY_VERSION > '1.9'
129
scenario 'Rack 環境でテーマ選択が保存される', :exclude_selenium do
130
visit '/update.rb?conf=theme'
131
select 'Tdiary1', :from => 'theme'
133
page.all('div.saveconf').first.click_button "OK"
136
page.body.should be_include('href="assets/base.css"')
137
page.body.should be_include('href="assets/tdiary1/tdiary1.css"')
139
visit '/update.rb?conf=theme'
140
within('select option[selected]'){
141
page.should have_content 'Tdiary1'
149
scenario 'Webrick 環境でテーマ選択が保存される', :exclude_rack => true do
146
scenario 'Webrick 環境でテーマ選択が保存される', :exclude_rack do
150
147
visit '/update.rb?conf=theme'
151
148
select 'Tdiary1', :from => 'theme'
154
within('title') { page.should have_content('(設定完了)') }
150
page.all('div.saveconf').first.click_button "OK"