5322702b |
require "spec_helper"
describe "Chatting behaviour" do
|
eee69d20 |
#todo change subject in testing roster and chatting window |
5322702b |
subject { page }
|
1ec65f29 |
describe "should show account info" do |
5322702b |
before { visit chat_path }
it { should have_selector('h1', text: 'Cinan Rakosnik') }
it { should have_selector('h2', text: 'frontend developer') }
it { should have_selector('h3', text: 'available') }
end
|
1ec65f29 |
describe "should show contact list" do |
5322702b |
before { visit chat_path }
it { should have_selector('h1', 'Friends') } |
1ec65f29 |
|
5322702b |
it { should have_selector('h1', 'John Savage') }
it { should have_selector('h1', 'Adam Wolsky') } |
eee69d20 |
end
describe "should show tabbar" do
before { visit chat_path }
it { should have_selector(class: 'tabbar') }
it { should have_selector('h1', text: 'Adam and John', class: 'tab') }
end
describe "should a conversation" do
before { visit chat_path }
describe "show some messages" do
it { should have_selector('img') }
it { should have_selector(class: 'date') }
#todo should have a message text
end
describe "should show event dates" do
it { should have_selector(text: 'Monday 13.2.2013') }
end
describe "should allow write a new message" do
it { should have_selector('input', placeholder: 'Type your message here') }
it { should have_button('Send') }
end
end |
5322702b |
end |