cirandas.net

ref: master

features/suggest_article.feature


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Feature: suggest article
  As a not logged user
  I want to suggest an article
  In order to share it with other users

  Background:
    Given the following users
      | login | name |
      | joaosilva | Joao Silva |
    And the following communities
      | identifier | name |
      | sample-community | Sample Community |
    And "Joao Silva" is admin of "Sample Community"

  @selenium
  Scenario: highlight an article before approval of a suggested article
    Given I am on Sample Community's blog
    And I follow "Suggest an article"
    And I fill in "Title" with "Suggestion"
    And I fill in "Your name" with "Some Guy"
    And I fill in "Email" with "someguy@somewhere.com"
    And I press "Save"
    When I am logged in as "joaosilva"
    And I go to sample-community's control panel
    And I follow "Process requests"
    And I choose "Accept"
    And I should see "suggested the publication of the article"
    Then I should see "Highlight this article" within ".task_box"

  @selenium-fixme
  Scenario: an article is suggested and the admin approve it
    Given I am on Sample Community's blog
    And I follow "Suggest an article"
    And I fill in "Title" with "Suggestion"
    And I fill in "Your name" with "Some Guy"
    And I fill in "Email" with "someguy@somewhere.com"
    And I type "This is my suggestion's lead" in TinyMCE field "task_article_abstract"
    And I type "I like free software" in TinyMCE field "task_article_body"
    And I press "Save"
    And I am logged in as "joaosilva"
    And I go to Sample Community's control panel
    When I follow "Process requests" and wait
    Then I should see "suggested the publication of the article: Suggestion."
    When I choose "Accept"
    And I select "sample-community/Blog" from "Select the folder where the article must be published"
    And I press "Apply!"
    And I go to Sample Community's blog
    And I refresh the page
    Then I should see "Suggestion"
    Then I should see "I like free software"