diff --git a/app/views/login/_redirect_to_login.js.erb b/app/views/login/_redirect_to_login.js.erb
new file mode 100644
index 00000000..9840134c
--- /dev/null
+++ b/app/views/login/_redirect_to_login.js.erb
@@ -0,0 +1 @@
+window.location.href = '<%= login_path %>';
\ No newline at end of file
diff --git a/app/views/login/_redirect_to_login.rjs b/app/views/login/_redirect_to_login.rjs
deleted file mode 100644
index ccb2e26a..00000000
--- a/app/views/login/_redirect_to_login.rjs
+++ /dev/null
@@ -1 +0,0 @@
-page.redirect_to :controller => 'login', :action => 'login'
\ No newline at end of file
diff --git a/app/views/login/check_expiry.js.erb b/app/views/login/check_expiry.js.erb
new file mode 100644
index 00000000..9076531b
--- /dev/null
+++ b/app/views/login/check_expiry.js.erb
@@ -0,0 +1,9 @@
+<% if @session_expired
+ theHtml = content_tag(
+ :div,
+ t('login.session_time_out', :link => link_to(t('login.log_in_again'), :controller => "login", :action => "login")),
+ :"class" => "warning")
+ -%>
+ $('div#navcontainer').remove();
+ $('div#content').html('<%=theHtml%>');
+<% end -%>
\ No newline at end of file
diff --git a/app/views/login/check_expiry.js.rjs b/app/views/login/check_expiry.js.rjs
deleted file mode 100644
index 2a019d5d..00000000
--- a/app/views/login/check_expiry.js.rjs
+++ /dev/null
@@ -1,9 +0,0 @@
-if @session_expired
- page << "console.log('expired');"
- page << "$('div#navcontainer').hide();"
- page << "theHtml = \'
" +
- t('login.session_time_out', :link => link_to(
- t('login.log_in_again'), :controller => "login", :action => "login"),
- "class" => "warning")
- page << "$('div#content').html(theHtml);"
-end
\ No newline at end of file
diff --git a/features/context_edit.feature b/features/context_edit.feature
index 3a248d59..bc91e689 100644
--- a/features/context_edit.feature
+++ b/features/context_edit.feature
@@ -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
diff --git a/features/context_list.feature b/features/context_list.feature
index b80da7b1..a396da32 100644
--- a/features/context_list.feature
+++ b/features/context_list.feature
@@ -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
context ""
Then I should see the context "" under ""
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"
\ No newline at end of file
+ Then I should see "Name cannot contain the comma"
diff --git a/features/create_admin.feature b/features/create_admin.feature
index da6cf05e..7420f8f1 100644
--- a/features/create_admin.feature
+++ b/features/create_admin.feature
@@ -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"
\ No newline at end of file
+ Then I should see "Sign up a new user"
diff --git a/features/dependencies.feature b/features/dependencies.feature
index 7597459b..6cd6594a 100644
--- a/features/dependencies.feature
+++ b/features/dependencies.feature
@@ -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
\ No newline at end of file
+ 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
diff --git a/features/logging_in.feature b/features/logging_in.feature
index 3c742423..1e07dc20 100644
--- a/features/logging_in.feature
+++ b/features/logging_in.feature
@@ -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 ""
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 ""
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) |
diff --git a/features/manage_users.feature b/features/manage_users.feature
index 6d716853..892f310d 100644
--- a/features/manage_users.feature
+++ b/features/manage_users.feature
@@ -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
diff --git a/features/notes_manage.feature b/features/notes_manage.feature
index c0e07406..dca28671 100644
--- a/features/notes_manage.feature
+++ b/features/notes_manage.feature
@@ -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
diff --git a/features/project_edit.feature b/features/project_edit.feature
index b9ee5b1a..446b7675 100644
--- a/features/project_edit.feature
+++ b/features/project_edit.feature
@@ -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"
\ No newline at end of file
diff --git a/features/project_list.feature b/features/project_list.feature
index a73de6f6..397b0d4f 100644
--- a/features/project_list.feature
+++ b/features/project_list.feature
@@ -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"
\ No newline at end of file
+ Then I should see "Name cannot contain the comma"
diff --git a/features/recurring_todos.feature b/features/recurring_todos.feature
index 98d54c82..9cb1e70b 100644
--- a/features/recurring_todos.feature
+++ b/features/recurring_todos.feature
@@ -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
\ No newline at end of file
+ Then I should see the form for "Daily" recurrence pattern
diff --git a/features/shared_add_new_todo.feature b/features/shared_add_new_todo.feature
index ad67f6ca..bb8e7f04 100644
--- a/features/shared_add_new_todo.feature
+++ b/features/shared_add_new_todo.feature
@@ -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 the
- And I submit a new action with description "a new next action"
- Then I should "a new next action"
+ Scenario Outline: I can add a todo from several pages
+ When I the
+ And I submit a new action with description "a new next action"
+ Then I should "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 the
- 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 "one new next action"
- And I should "another new next action"
- And the badge should show
- And the number of actions should be
+ When I the
+ 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 "one new next action"
+ And I should "another new next action"
+ And the badge should show
+ And the number of actions should be
- 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"
diff --git a/features/show_integration_options.feature b/features/show_integration_options.feature
index 2cea081d..5a3f3bc8 100644
--- a/features/show_integration_options.feature
+++ b/features/show_integration_options.feature
@@ -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 "