Improve the conversation test a bit
This commit is contained in:
parent
fe93fd5c91
commit
9c99331bb7
2 changed files with 11 additions and 5 deletions
|
|
@ -15,12 +15,13 @@ Feature: private messages
|
||||||
Scenario: send a message
|
Scenario: send a message
|
||||||
Given I follow "New Message"
|
Given I follow "New Message"
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
And I fill in "contact_autocomplete" with "Alice"
|
And I fill in "contact_autocomplete" with "Alice" in the modal window
|
||||||
And I press the first ".as-result-item" within ".as-results"
|
And I press the first ".as-result-item" within ".as-results" in the modal window
|
||||||
And I fill in "conversation_subject" with "Greetings"
|
And I fill in "conversation_subject" with "Greetings" in the modal window
|
||||||
And I fill in "conversation_text" with "hello, alice!"
|
And I fill in "conversation_text" with "hello, alice!" in the modal window
|
||||||
And I press "Send"
|
And I press "Send" in the modal window
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
Then I should see "Greetings" within "#conversation_inbox"
|
Then I should see "Greetings" within "#conversation_inbox"
|
||||||
And I should see "Greetings" within "#conversation_show"
|
And I should see "Greetings" within "#conversation_show"
|
||||||
|
And "Alice Awesome" should be part of active conversation
|
||||||
And I should see "hello, alice!" within ".stream"
|
And I should see "hello, alice!" within ".stream"
|
||||||
|
|
|
||||||
5
features/step_definitions/conversations_steps.rb
Normal file
5
features/step_definitions/conversations_steps.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
Then /^"([^"]*)" should be part of active conversation$/ do |name|
|
||||||
|
within(".conversation_participants") do
|
||||||
|
find("img.avatar[title^='#{name} ']").should_not be_nil
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in a new issue