Sha256: bbc747b4c4eb304214b9b2d73eab201818b54823706178d2049d8dc10240d19c

Contents?: true

Size: 1.91 KB

Versions: 17

Compression:

Stored size: 1.91 KB

Contents

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

feature 'ツッコミの表示' do
	scenario 'ツッコミを隠す' do
		append_default_diary
		append_default_comment

		visit '/'
		click_link '追記'
		click_button "この日付の日記を編集"
		uncheck 'commentcheckboxr0'
		click_button 'ツッコミ表示状態変更'
		visit '/'
		page.should have_no_content "alpha"
		page.should have_no_content "こんにちは!こんにちは!"

		today = Date.today.strftime("%Y年%m月%d日")
		page.find('h2', :text => today).click_link today
		page.should have_no_content "alpha"
		page.should have_no_content "こんにちは!こんにちは!"
	end

	scenario "日付表示だと絵文字を表示できる", :exclude_selenium do
		append_default_diary

		visit "/"
		click_link 'ツッコミを入れる'
		fill_in "name", :with => "寿司"
		fill_in "body", :with => <<-BODY
:sushi: は美味しい
BODY
		click_button '投稿'

		visit "/"
		today = Date.today.strftime("%Y年%m月%d日")
		page.find('h2', :text => today).click_link today
		within('div.day div.comment div.commentbody') {
			page.body.should be_include "<img src='http://www.emoji-cheat-sheet.com/graphics/emojis/sushi.png' width='20' height='20' title='sushi' alt='sushi' class='emoji' /> は美味しい"
		}
	end

	scenario "一覧表示でも絵文字を表示できる", :exclude_selenium do
		append_default_diary

		visit "/"
		click_link 'ツッコミを入れる'
		fill_in "name", :with => "寿司"
		fill_in "body", :with => <<-BODY
:sushi: は美味しい
BODY
		click_button '投稿'

		visit "/"
		within('div.day div.comment div.commentshort') {
			page.body.should be_include "<img src='http://www.emoji-cheat-sheet.com/graphics/emojis/sushi.png' width='20' height='20' title='sushi' alt='sushi' class='emoji' /> は美味しい"
		}
	end
end

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

Version data entries

17 entries across 17 versions & 1 rubygems

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