Sha256: 7034b5fda46d48a7a001518d853e6392bbb18a2f591f8b2ba7c3c9a45209cb96

Contents?: true

Size: 1.84 KB

Versions: 15

Compression:

Stored size: 1.84 KB

Contents

# -*- coding: utf-8 -*-
require 'acceptance_helper'

feature 'リンク元設定の利用' do
	scenario 'リンク元の非表示設定', :exclude_rdb do
		append_default_diary
		visit '/update.rb?conf=referer'
		select('非表示', :from => 'show_referer')

		page.all('div.saveconf').first.click_button "OK"
		# within('title') { page.should have_content('(設定完了)') }

		click_link '最新'
		today = Date.today.strftime("%Y年%m月%d日")
		page.find('h2', :text => today).click_link today
		within('div.day') { page.should have_no_css('div[class="refererlist"]') }
	end

	scenario 'リンク元記録の除外設定が動いている', :exclude_rdb do
		append_default_diary
		visit '/update.rb?conf=referer'
		fill_in 'no_referer', :with => '^http://www\.example\.com/.*'

		page.all('div.saveconf').first.click_button('OK')
		# within('title') { page.should have_content('(設定完了)') }

		click_link '最新'
		today = Date.today.strftime('%Y年%m月%d日')
		page.find('h2', :text => today).click_link today
		within('div.day div.refererlist') { page.should have_no_link('http://www.example.com') }
	end

	scenario 'リンク元の置換が動いている', :exclude_selenium, :exclude_rdb do
		append_default_diary
		visit '/update.rb?conf=referer'
		fill_in 'referer_table', :with => <<-REFERER
^http://www\.example\.com/.* alice
^http://www\.example\.net/.* bob
REFERER

		page.all('div.saveconf').first.click_button('OK')
		# within('title') { page.should have_content('(設定完了)') }

		click_link '最新'
		today = Date.today.strftime('%Y年%m月%d日')
		page.find('h2', :text => today).click_link today
		within('div.day div.refererlist') {
			page.should have_link "alice"
			page.should have_no_link "http://www.example.com"
		}
	end
end

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tdiary-4.0.1.20130929 spec/acceptance/save_conf_referer_spec.rb
tdiary-4.0.1.20130903 spec/acceptance/save_conf_referer_spec.rb
tdiary-4.0.1 spec/acceptance/save_conf_referer_spec.rb
tdiary-4.0.0.20130826 spec/acceptance/save_conf_referer_spec.rb
tdiary-4.0.0 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130727 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130722 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130720 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130617 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130614 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130604 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130527 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130518 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130508 spec/acceptance/save_conf_referer_spec.rb
tdiary-3.2.2.20130507 spec/acceptance/save_conf_referer_spec.rb