Commit eb7e3c1f8e3c1ee0f9b538fc113e7612b1ba4a4b
1 parent
f83032b7
Exists in
master
and in
29 other branches
Added highlight option on suggested article approval
(ActionItem1857)
Showing
3 changed files
with
34 additions
and
0 deletions
Show diff stats
app/views/tasks/_suggest_article_accept_details.rhtml
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | <%= labelled_form_field(_("Source URL"), f.text_field(:source)) %> |
6 | 6 | |
7 | 7 | <%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task]", 'article_parent_id', task.target) %> |
8 | +<%= labelled_form_field(_('Highlight this article'), f.check_box(:highlighted)) %> | |
8 | 9 | |
9 | 10 | <div> |
10 | 11 | <%= labelled_form_field(_('Lead'), f.text_area(:article_abstract, :style => 'width: 482px; height: 200px;')) %> | ... | ... |
features/step_definitions/noosfero_steps.rb
... | ... | @@ -337,3 +337,13 @@ Given /^the community "(.+)" is closed$/ do |community| |
337 | 337 | community.closed = true |
338 | 338 | community.save |
339 | 339 | end |
340 | + | |
341 | +Given /^someone suggested the following article to be published$/ do |table| | |
342 | + SuggestArticle.skip_captcha! | |
343 | + table.hashes.map{|item| item.dup}.each do |item| | |
344 | + target = Community[item.delete('target')] | |
345 | + task = SuggestArticle.create!(:target => target, :data => item) | |
346 | + end | |
347 | +end | |
348 | + | |
349 | + | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +Feature: suggest article | |
2 | + As a not logged user | |
3 | + I want to suggest an article | |
4 | + In order to share it with other users | |
5 | + | |
6 | + Background: | |
7 | + Given the following users | |
8 | + | login | name | | |
9 | + | joaosilva | Joao Silva | | |
10 | + And the following communities | |
11 | + | identifier | name | | |
12 | + | sample-community | Sample Community | | |
13 | + And "Joao Silva" is admin of "Sample Community" | |
14 | + | |
15 | + Scenario: highlight an article before approval of a suggested article | |
16 | + Given someone suggested the following article to be published | |
17 | + | target | article_name | article_body | name | email | | |
18 | + | sample-community | A suggested article | this is an article about whales | jose | jose@example.org | | |
19 | + When I am logged in as "joaosilva" | |
20 | + And I go to Sample Community's control panel | |
21 | + And I follow "Process requests" | |
22 | + And I should see "suggested the publication of the article" | |
23 | + Then I should see "Highlight this article" within ".task_box" | ... | ... |