Add about page with feedback functionality
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
Feature: A user can submit feedback
|
||||
|
||||
@javascript
|
||||
Scenario: A user submits feedback
|
||||
Given I am signed in as a user
|
||||
And the user is on the homepage
|
||||
When the user opens the side menu
|
||||
And the user clicks on the about link in the side menu
|
||||
And the user fills in the feedback field
|
||||
And the user clicks on the submit feedback button
|
||||
Then the user should see the feedback submitted message
|
||||
And a user feedback should be created containing the feedback
|
||||
@@ -0,0 +1,15 @@
|
||||
step "the user fills in the feedback field" do
|
||||
find('.feedback-field').set "Nice app!"
|
||||
end
|
||||
|
||||
step "the user clicks on the submit feedback button" do
|
||||
find(".submit-feedback-button").click
|
||||
end
|
||||
|
||||
step "the user should see the feedback submitted message" do
|
||||
page.should have_content I18n.t('user.about.feedback.received')
|
||||
end
|
||||
|
||||
step "a user feedback should be created containing the feedback" do
|
||||
expect( UserFeedback.find_all_by_user_id_and_content(@user.id, 'Nice app!').size ).to eq 1
|
||||
end
|
||||
@@ -2,6 +2,7 @@ step "the user opens the side menu" do
|
||||
page.execute_script %|$('.toggle-side-menu').click()|
|
||||
sleep 1
|
||||
end
|
||||
|
||||
step "the user opens the side menu again" do
|
||||
step "the user opens the side menu"
|
||||
end
|
||||
@@ -10,6 +11,10 @@ step "the user clicks on the lists link in the side menu" do
|
||||
page.execute_script %|$('.side-menu-lists').click()|
|
||||
end
|
||||
|
||||
step "the user clicks on the about link in the side menu" do
|
||||
page.execute_script %|$('.side-menu-about').click()|
|
||||
end
|
||||
|
||||
step "the user clicks on the active list link in the side menu" do
|
||||
page.execute_script %|$('.side-menu-active-list').click()|
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user