migrate login rjs to erb and reformat features

This commit is contained in:
Reinier Balt 2010-11-10 17:34:28 +01:00
parent 05b3b7cebc
commit 520e45fe6b
17 changed files with 137 additions and 152 deletions

View file

@ -1,5 +1,4 @@
Feature: Edit a context
In order to work on todos in a context
As a Tracks user
I want to manage todos in a context

View file

@ -1,5 +1,4 @@
Feature: Manage the list of contexts
In order to keep track and manage all of my contexts
As a Tracks user
I want to manage my list of contexts
@ -9,13 +8,13 @@ Feature: Manage the list of contexts
| login | password | is_admin |
| testuser | secret | false |
And I have logged in as "testuser" with password "secret"
@selenium
Scenario: Delete context from context page should update badge
Given I have a context called "@computer"
And I have a context called "@ipad"
When I go to the contexts page
Then the badge should show 2
Then the badge should show 2
And the context list badge for active contexts should show 2
When I delete the context "@computer"
Then he should see that a context named "@computer" is not present
@ -59,20 +58,20 @@ Feature: Manage the list of contexts
@selenium
Scenario Outline: Add a new context with state
Given I have the following contexts
| name | hide |
| @ipad | true |
| @home | false |
| name | hide |
| @ipad | true |
| @home | false |
When I go to the contexts page
And I add a new <state> context "<name>"
Then I should see the context "<name>" under "<state>"
Examples:
| state | name |
| active | @phone |
| hidden | @hidden|
| state | name |
| active | @phone |
| hidden | @hidden |
@selenium
Scenario: Cannot add a context with comma in the name
When I go to the contexts page
And I add a new active context "foo, bar"
Then I should see "Name cannot contain the comma"
Then I should see "Name cannot contain the comma"

View file

@ -1,5 +1,4 @@
Feature: Signup new users
In order to be able to administer Tracks
As a user who just installed Tracks
I want to create an admin account
@ -9,7 +8,7 @@ Feature: Signup new users
| login | password | is_admin |
| testuser | secret | false |
| admin | secret | true |
Scenario: Successful signup
Given no users exists
When I go to the homepage
@ -17,20 +16,20 @@ Feature: Signup new users
When I submit the signup form with username "admin", password "secret" and confirm with "secret"
Then I should be on the homepage
And I should be an admin
Scenario: Signup should be refused when password and confirmation is not the same
Given no users exists
When I go to the signup page
And I submit the signup form with username "admin", password "secret" and confirm with "error"
Then I should be redirected to the signup page
And I should see "Password doesn't match confirmation"
Scenario: With public signups turned off, signup should be refused when an admin user exists
Given public signups are turned off
When I go to the signup page
Then I should see "You don't have permission to sign up for a new account."
Scenario: With public signups turned on, signup should possible when an admin user exists
Given public signups are turned on
When I go to the signup page
Then I should see "Sign up a new user"
Then I should see "Sign up a new user"

View file

@ -1,5 +1,4 @@
Feature: dependencies
As a Tracks user
In order to keep track of complex todos
I want to assign and manage todo dependencies
@ -12,27 +11,27 @@ Feature: dependencies
@selenium
Scenario: Adding dependency to dependency
Given I have a project "dependencies" with 3 todos
And "Todo 2" depends on "Todo 1"
When I visit the "dependencies" project
And I drag "Todo 3" to "Todo 2"
Then the dependencies of "Todo 2" should include "Todo 1"
And the dependencies of "Todo 3" should include "Todo 2"
When I expand the dependencies of "Todo 1"
Then I should see "Todo 2" within the dependencies of "Todo 1"
And I should see "Todo 3" within the dependencies of "Todo 1"
When I expand the dependencies of "Todo 2"
Then I should see "Todo 3" within the dependencies of "Todo 2"
Given I have a project "dependencies" with 3 todos
And "Todo 2" depends on "Todo 1"
When I visit the "dependencies" project
And I drag "Todo 3" to "Todo 2"
Then the dependencies of "Todo 2" should include "Todo 1"
And the dependencies of "Todo 3" should include "Todo 2"
When I expand the dependencies of "Todo 1"
Then I should see "Todo 2" within the dependencies of "Todo 1"
And I should see "Todo 3" within the dependencies of "Todo 1"
When I expand the dependencies of "Todo 2"
Then I should see "Todo 3" within the dependencies of "Todo 2"
@selenium @wip
Scenario: Adding dependency with comma to todo # for #975
Given I have a context called "@pc"
And I have a project "dependencies" that has the following todos
| description | context |
| test,1, 2,3 | @pc |
| test me | @pc |
When I visit the "dependencies" project
And I drag "test me" to "test,1, 2,3"
Then the dependencies of "test me" should include "test,1, 2,3"
When I edit the dependency of "test me" to '"test,1, 2,3" <"@pc"; "dependencies">,"test,1, 2,3" <"@pc"; "dependencies">'
Then there should not be an error
Given I have a context called "@pc"
And I have a project "dependencies" that has the following todos
| description | context |
| test,1, 2,3 | @pc |
| test me | @pc |
When I visit the "dependencies" project
And I drag "test me" to "test,1, 2,3"
Then the dependencies of "test me" should include "test,1, 2,3"
When I edit the dependency of "test me" to '"test,1, 2,3" <"@pc"; "dependencies">,"test,1, 2,3" <"@pc"; "dependencies">'
Then there should not be an error

View file

@ -1,5 +1,4 @@
Feature: Existing user logging in
Feature: Existing user logging in
In order to keep my things private
As an existing user
I want to log in with my username and password
@ -17,9 +16,9 @@ Feature: Existing user logging in
And I should see "<message>"
Examples:
| user | password | there | message |
| admin | secret | redirected to the home page | Login successful |
| admin | wrong | on the login page | Login unsuccessful |
| user | password | there | message |
| admin | secret | redirected to the home page | Login successful |
| admin | wrong | on the login page | Login unsuccessful |
Scenario Outline: Unauthorized users cannot access Tracks and need to log in first
Given there exists a project called "top secret" for user "testuser"
@ -31,22 +30,22 @@ Feature: Existing user logging in
And I should see "<logout>"
Examples:
| page | next page | logout |
| home page | home page | Logout (Test User) |
| contexts page | contexts page | Logout (Test User) |
| projects page | projects page | Logout (Test User) |
| notes page | notes page | Logout (Test User) |
| repeating todos page | repeating todos page | Logout (Test User) |
| statistics page | statistics page | Logout (Test User) |
| manage users page | manage users page | 401 Unauthorized |
| integrations page | integrations page | Logout (Test User) |
| starred page | starred page | Logout (Test User) |
| tickler page | tickler page | Logout (Test User) |
| calendar page | calendar page | Logout (Test User) |
| feeds page | feeds page | Logout (Test User) |
| preference page | preference page | Logout (Test User) |
| export page | export page | Logout (Test User) |
| rest api docs page | rest api docs page | Logout (Test User) |
| search page | search page | Logout (Test User) |
| "top secret" project for user "testuser" | "top secret" project for user "testuser" | Logout (Test User) |
| context page for "@secret location" for user "testuser" | context page for "@secret location" for user "testuser" | Logout (Test User) |
| page | next page | logout |
| home page | home page | Logout (Test User) |
| contexts page | contexts page | Logout (Test User) |
| projects page | projects page | Logout (Test User) |
| notes page | notes page | Logout (Test User) |
| repeating todos page | repeating todos page | Logout (Test User) |
| statistics page | statistics page | Logout (Test User) |
| manage users page | manage users page | 401 Unauthorized |
| integrations page | integrations page | Logout (Test User) |
| starred page | starred page | Logout (Test User) |
| tickler page | tickler page | Logout (Test User) |
| calendar page | calendar page | Logout (Test User) |
| feeds page | feeds page | Logout (Test User) |
| preference page | preference page | Logout (Test User) |
| export page | export page | Logout (Test User) |
| rest api docs page | rest api docs page | Logout (Test User) |
| search page | search page | Logout (Test User) |
| "top secret" project for user "testuser" | "top secret" project for user "testuser" | Logout (Test User) |
| context page for "@secret location" for user "testuser" | context page for "@secret location" for user "testuser" | Logout (Test User) |

View file

@ -1,5 +1,4 @@
Feature: Manage users
In order to be able to manage the users able to use Tracks
As the administrator of this installed Tracks
I want to add and delete accounts of users

View file

@ -1,5 +1,4 @@
Feature: View, add, remove notes
In order to manage my notes
As a Tracks user
I want to view, add, and remove notes

View file

@ -1,5 +1,4 @@
Feature: Edit a project
In order to reach a goal by doing several related todos
As a Tracks user
I want to manage these todos in a project
@ -63,6 +62,3 @@ Feature: Edit a project
Then the badge should show 2 # "manage me" and "test"
When I try to edit the project name of "manage me" to "test"
Then I should see "Name already exists"
# No scenario is needed for adding a todo to the project. This is covered in
# shared_add_new_todo.feature "I can add a todo from several pages"

View file

@ -1,5 +1,4 @@
Feature: Manage the list of projects
In order to keep track and manage of all my projects
As a Tracks user
I want to manage my list of projects
@ -112,4 +111,4 @@ Feature: Manage the list of projects
Scenario: Cannot add a project with comma in the name
When I go to the projects page
And I submit a new project with name "foo,bar"
Then I should see "Name cannot contain the comma"
Then I should see "Name cannot contain the comma"

View file

@ -1,5 +1,4 @@
Feature: Manage recurring todos
In order to manage repeating todos
As a Tracks user
I want to view, edit, add, or remove recurrence patterns of repeating todos
@ -22,4 +21,4 @@ Feature: Manage recurring todos
When I select "Yearly" recurrence pattern
Then I should see the form for "Yearly" recurrence pattern
When I select "Daily" recurrence pattern
Then I should see the form for "Daily" recurrence pattern
Then I should see the form for "Daily" recurrence pattern

View file

@ -1,5 +1,4 @@
Feature: Add new next action from every page
In order to quickly add a new next action
As a Tracks user
I want to to be able to add one or more new next actions from every page
@ -19,13 +18,13 @@ Feature: Add new next action from every page
When I follow "« Hide form"
Then the single action form should not be visible
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project"|
| visit | context page for "test context"|
| visit | tag page for "starred" |
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project" |
| visit | context page for "test context" |
| visit | tag page for "starred" |
@selenium
Scenario Outline: I can hide the input form for multiple next actions
@ -37,13 +36,13 @@ Feature: Add new next action from every page
Then the single action form should not be visible
And the multiple action form should not be visible
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project"|
| visit | context page for "test context"|
| visit | tag page for "starred" |
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project" |
| visit | context page for "test context" |
| visit | tag page for "starred" |
@selenium
Scenario Outline: I can hide the input form and then choose both input forms
@ -57,13 +56,13 @@ Feature: Add new next action from every page
Then the single action form should not be visible
And the multiple action form should not be visible
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project"|
| visit | context page for "test context"|
| visit | tag page for "starred" |
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project" |
| visit | context page for "test context" |
| visit | tag page for "starred" |
@selenium
Scenario Outline: I can switch forms for single next action to multiple next actions
@ -76,49 +75,49 @@ Feature: Add new next action from every page
Then the single action form should be visible
And the multiple action form should not be visible
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project"|
| visit | context page for "test context"|
| visit | tag page for "starred" |
Scenarios:
| action | page |
| go to | home page |
| go to | tickler page |
| visit | project page for "test project" |
| visit | context page for "test context" |
| visit | tag page for "starred" |
@selenium
Scenario Outline: I can add a todo from several pages
When I <action> the <page>
And I submit a new action with description "a new next action"
Then I should <see> "a new next action"
Scenario Outline: I can add a todo from several pages
When I <action> the <page>
And I submit a new action with description "a new next action"
Then I should <see> "a new next action"
Scenarios:
| action | page | see |
| go to | home page | see |
| go to | tickler page | not see|
| visit | project page for "test project"| see |
| visit | context page for "test context"| see |
| visit | tag page for "starred" | not see|
Scenarios:
| action | page | see |
| go to | home page | see |
| go to | tickler page | not see |
| visit | project page for "test project" | see |
| visit | context page for "test context" | see |
| visit | tag page for "starred" | not see |
@selenium
Scenario Outline: I can add multiple todos from several pages
When I <action> the <page>
And I follow "Add multiple next actions"
And I submit multiple actions with using
"""
one new next action
another new next action
"""
Then I should <see> "one new next action"
And I should <see> "another new next action"
And the badge should show <badge>
And the number of actions should be <count>
When I <action> the <page>
And I follow "Add multiple next actions"
And I submit multiple actions with using
"""
one new next action
another new next action
"""
Then I should <see> "one new next action"
And I should <see> "another new next action"
And the badge should show <badge>
And the number of actions should be <count>
Scenarios:
| action | page | see | badge | count |
| go to | home page | see | 3 | 3 |
| go to | tickler page | not see| 0 | 3 |
| visit | project page for "test project"| see | 3 | 3 |
| visit | context page for "test context"| see | 2 | 3 |
| visit | tag page for "starred" | not see| 0 | 3 |
Scenarios:
| action | page | see | badge | count |
| go to | home page | see | 3 | 3 |
| go to | tickler page | not see | 0 | 3 |
| visit | project page for "test project" | see | 3 | 3 |
| visit | context page for "test context" | see | 2 | 3 |
| visit | tag page for "starred" | not see | 0 | 3 |
@selenium
Scenario: I need to fill in at least one description and a context
@ -130,8 +129,8 @@ Feature: Add new next action from every page
Then I should see "Context can't be blank"
When I fill the multiple actions form with "", "a project", "test context", "tag"
And I submit the new multiple actions form with
"""
"""
"""
"""
Then I should see "You need to submit at least one next action"

View file

@ -1,5 +1,4 @@
Feature: Integrate Tracks in various ways
In order to use tracks with other software
As a Tracks user
I want to be informed about the various ways to integrate tracks
@ -40,7 +39,7 @@ Feature: Integrate Tracks in various ways
Then I should see a script "<script>" for "<context2>"
Examples:
| context1 | context2 | context-list | script |
| @home | @boss | applescript1-contexts | applescript1 |
| @shops | @home | applescript2-contexts | applescript2 |
| @boss | @shops | quicksilver-contexts | quicksilver |
| context1 | context2 | context-list | script |
| @home | @boss | applescript1-contexts | applescript1 |
| @shops | @home | applescript2-contexts | applescript2 |
| @boss | @shops | quicksilver-contexts | quicksilver |

View file

@ -24,13 +24,13 @@ Feature: Show statistics
And I should see "You have 7 incomplete actions"
And I should see "of which 2 are deferred actions"
And I should see "you have a total of 9 actions"
And I should see "2 of these are completed"
And I should see "2 of these are completed"
Then I should see "Totals"
And I should see "Actions"
And I should see "Contexts"
And I should see "Projects"
And I should see "Tags"
Scenario: Click through to see chart of all actions per month
Given I have logged in as "testuser" with password "secret"
And I have 5 todos
@ -38,7 +38,7 @@ Feature: Show statistics
And I click on the chart for actions done in the last 12 months
Then I should see a chart
And I should see "to return to the statistics page"
Scenario: Click through to see all incomplete actions of a week
Given I have logged in as "testuser" with password "secret"
And I have 5 todos