-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented initial badge nomination and approval; paths mapped named…
… pages specified in feature background; section-constrained content search
- Loading branch information
Showing
19 changed files
with
358 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Feature: Awarding badges | ||
As a nice person | ||
I want to be able to award badges | ||
In order to reward interesting behavior | ||
|
||
Background: | ||
Given a user named "user1" | ||
And a user named "user2" | ||
And a user named "user3" | ||
And the "create badge" page is at "/badges/create" | ||
And the "browse badges" page is at "/badges/" | ||
|
||
Scenario: Badge creator approves a nomination to award a badge | ||
Given "user1" creates a badge entitled "Nifty badge" | ||
And "user2" nominates "user3" for a badge entitled "Nifty badge" because "user3 is Nifty" | ||
And I am logged in as "user1" | ||
And I go to the "badge detail" page for "Nifty badge" | ||
When I click on "user3" in the "Nominations" section | ||
Then I should see a page whose title contains "Badge nomination" | ||
When I press "Approve" | ||
Then I should see a page whose title contains "Badge detail" | ||
And I should see "user3" somewhere in the "Awarded to" section | ||
And I should not see "user3" anywhere in the "Nominations" section | ||
And "user3" should be awarded the badge "Nifty badge" | ||
And "user3" should receive a "Badge Awarded" notification | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Feature: Basic management of badges | ||
As a nice person | ||
I want to be able to create badges | ||
In order to reward interesting behavior | ||
|
||
Background: | ||
Given a user named "user1" | ||
And a user named "user2" | ||
And a user named "user3" | ||
And the "create badge" page is at "/badges/create" | ||
And the "browse badges" page is at "/badges/" | ||
|
||
Scenario: Create a new badge | ||
Given I am logged in as "user1" | ||
And I go to the "create badge" page | ||
When I fill in "Title" with "Awesome Tester" | ||
And I fill in "Description" with "This is an awesome badge for awesome testers" | ||
And I press "Create" | ||
Then I should see no form validation errors | ||
And I should see a page entitled "Badge details" | ||
And I should see "Awesome Tester" somewhere on the page | ||
|
||
Scenario: Look for a badge on the browse badges page | ||
Given "user1" creates a badge entitled "More awesome badge" | ||
When I go to the "browse badges" page | ||
Then I should see "More awesome badge" somewhere on the page |
23 changes: 7 additions & 16 deletions
23
apps/badges/features/basics.feature → .../badges/features/badge_nomination.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,26 @@ | ||
Feature: Basic creation and awarding of badges | ||
Feature: Nominating users to be awarded badges | ||
As a nice person | ||
I want to be able to create and award badges | ||
I want to be able to nominate people to be awarded badges | ||
In order to reward interesting behavior | ||
|
||
Background: | ||
Given a user named "user1" | ||
And a user named "user2" | ||
And a user named "user3" | ||
And the "create badge" page is at "/badges/create" | ||
And the "browse badges" page is at "/badges/" | ||
|
||
Scenario: Create a new badge | ||
Given I am logged in as "user1" | ||
And I go to the "create badge" page | ||
When I fill in "Title" with "Awesome Tester" | ||
And I fill in "Description" with "This is an awesome badge for awesome testers" | ||
And I press "Create" | ||
Then I should see no form validation errors | ||
And I should see a page entitled "Badge details" | ||
And I should see "Awesome Tester" somewhere on the page | ||
|
||
Scenario: Nominate someone to receive a badge | ||
Scenario: A user nominates someone to be awarded a badge | ||
Given "user1" creates a badge entitled "Awesome badge" | ||
And I am logged in as "user2" | ||
And I go to the badge detail page for "Awesome badge" | ||
And I go to the "badge detail" page for "Awesome badge" | ||
When I fill in "Nominee" with "user3" | ||
And I fill in "Reason why" with "user3 is awesome" | ||
And I press "Nominate for badge" | ||
Then I should see no form validation errors | ||
And I should see "user3 nominated" somewhere on the page | ||
And I should see "user3" somewhere in the "Nominations" section | ||
And "user3" should be nominated by "user2" for badge "Awesome badge" because "user3 is awesome" | ||
And "user1" should receive a "Badge Nomination Proposed" notification | ||
And "user2" should receive a "Badge Nomination Sent" notification | ||
And "user3" should receive a "Badge Nomination Received" notification | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.