Dotclear

source: features/plugins/antispam.feature @ 2986:1e5a2d6a0074

Revision 2986:1e5a2d6a0074, 2.1 KB checked in by Nicolas <nikrou77@…>, 11 years ago (diff)

Fix #1647
Allow user to add the same word for severals blogs not necessary global.
Add behat tests for that feature.

Line 
1Feature: Manage comment
2  In order to manage my blog
3  As an administrator
4  I need to be able to manage antispam
5
6  Background: init
7    Given a user:
8      | username | password | status |
9      | user1    | pass1    | admin  |
10    Given a blog:
11      | blog_id   | blog_name  | blog_url          |
12      | other_blog| Other Blog | http://other.blog |
13
14  Scenario: Add a new badword
15    Given I am on "/admin/"
16    And I am logged in as "user1" with password "pass1"
17    When I go to "/admin/plugin.php?p=antispam&f=dcFilterWords"
18    Then I should see "No word in list."
19    When I fill in "Add a word" with "MyWord"
20    And I press "Add"
21    Then I should see "MyWord" in the ".antispam .local" element
22
23  # bug #1647
24  Scenario: Can add a badword to severals blogs
25    Given I am on "/admin/"
26    And I am logged in as "user1" with password "pass1"
27    # add word to first blog
28    When I switch to blog "Other Blog"
29    And I go to "/admin/plugin.php?p=antispam&f=dcFilterWords"
30    When I fill in "Add a word" with "MyWord"
31    And I press "Add"
32    Then I should see "MyWord" in the ".antispam" element
33    # try to add to other blog
34    When I switch to blog "My first blog"
35    And I go to "/admin/plugin.php?p=antispam&f=dcFilterWords"
36    When I fill in "Add a word" with "MyWord"
37    And I press "Add"
38    Then I should not see "This word exists"
39    And I should see "MyWord" in the ".antispam .local" element
40
41  Scenario: Can add a badword to all blogs even if its already local to one
42    Given I am on "/admin/"
43    And I am logged in as "user1" with password "pass1"
44    # add word to first blog
45    When I switch to blog "Other Blog"
46    And I go to "/admin/plugin.php?p=antispam&f=dcFilterWords"
47    When I fill in "Add a word" with "MyWord"
48    And I press "Add"
49    Then I should see "MyWord" in the ".antispam" element
50    # try to add to other blog
51    When I switch to blog "My first blog"
52    And I go to "/admin/plugin.php?p=antispam&f=dcFilterWords"
53    When I fill in "Add a word" with "MyWord"
54    And I check "Global word (used for all blogs)"
55    And I press "Add"
56    Then I should not see "This word exists"
57    And I should see "MyWord" in the ".antispam" element
Note: See TracBrowser for help on using the repository browser.

Sites map