1 | Feature: 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 .local" 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 .local" element |
---|
50 | When I fill in "Add a word" with "Other word" |
---|
51 | And I check "Global word (used for all blogs)" |
---|
52 | And I press "Add" |
---|
53 | Then I should see "Other word" in the ".antispam .global" element |
---|
54 | # try to add to other blog |
---|
55 | When I switch to blog "My first blog" |
---|
56 | And I go to "/admin/plugin.php?p=antispam&f=dcFilterWords" |
---|
57 | When I fill in "Add a word" with "MyWord" |
---|
58 | And I check "Global word (used for all blogs)" |
---|
59 | And I press "Add" |
---|
60 | Then I should not see "This word exists" |
---|
61 | And I should see "MyWord" in the ".antispam .global" element |
---|