saucy 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ This directory was generated by the saucy:features generator. It is recommended
2
+ that you regenerate this directory whenever saucy is upgraded, so you probably
3
+ shouldn't edit these files unless you want to keep them up to date yourself.
@@ -0,0 +1,9 @@
1
+ Feature: edit profile
2
+
3
+ Scenario: Normal users can edit themselves
4
+ Given I am signed in
5
+ When I go to the settings page
6
+ And I fill in "Name" with "Name Change"
7
+ And I press "Update"
8
+ And I go to the settings page
9
+ Then the "Name" field should contain "Name Change"
@@ -0,0 +1,33 @@
1
+ Feature: edit permissions for a project
2
+
3
+ As an admin,
4
+ I can manage permissions for each project in my account, so only project
5
+ members can edit blurbs.
6
+
7
+ Scenario: edit permissions for a project
8
+ Given the following project exists:
9
+ | name | account |
10
+ | Stocknames | name: thoughtbot |
11
+ And the following users exist:
12
+ | name | email |
13
+ | Bill | bill@example.com |
14
+ | Jane | jane@example.com |
15
+ | Jeff | jeff@example.com |
16
+ And I am signed in as an admin of the "Stocknames" project
17
+ And "bill@example.com" is a member of the "Stocknames" project
18
+ And "jane@example.com" is a member of the "thoughtbot" account
19
+ When I go to the settings page for the "thoughtbot" account
20
+ And I follow "Projects"
21
+ And I follow "Stocknames"
22
+ Then the "Bill" checkbox should be checked
23
+ And the "Jane" checkbox should not be checked
24
+ And I should not see "Jeff"
25
+ When I check "Jane"
26
+ And I uncheck "Bill"
27
+ And I press "Update"
28
+ Then I should see "Project was updated"
29
+ When I follow "Stocknames"
30
+ Then the "Bill" checkbox should not be checked
31
+ And the "Jane" checkbox should be checked
32
+ And I should not see "Jeff"
33
+
@@ -0,0 +1,47 @@
1
+ Feature: edit permissions for a user
2
+
3
+ As an admin,
4
+ I can edit permissions for which users are on which projects and vice versa.
5
+
6
+ Scenario: edit permissions for a user
7
+ Given the following projects exists:
8
+ | name | account |
9
+ | Alpha | name: thoughtbot |
10
+ | Beta | name: thoughtbot |
11
+ | Delta | name: other |
12
+ Given the following user exists:
13
+ | name | email |
14
+ | Sam | sam@example.com |
15
+ And I am signed in as an admin of the "thoughtbot" account
16
+ And "sam@example.com" is a member of the "Alpha" project
17
+ When I go to the settings page for the "thoughtbot" account
18
+ And I follow "Users"
19
+ And I follow "Sam"
20
+ Then the "Alpha" checkbox should be checked
21
+ And the "Beta" checkbox should not be checked
22
+ And I should not see "Delta"
23
+ When I check "Beta"
24
+ And I uncheck "Alpha"
25
+ And I press "Update"
26
+ Then I should see "Permissions updated"
27
+ When I follow "Sam"
28
+ Then the "Alpha" checkbox should not be checked
29
+ And the "Beta" checkbox should be checked
30
+ And I should not see "Delta"
31
+
32
+ Scenario: promote a user to an admin
33
+ Given an account exists with a name of "Test"
34
+ And I am signed in as an admin of the "Test" account
35
+ And an email confirmed user exists with a name of "Frank"
36
+ And the following memberships exist:
37
+ | account | user | admin |
38
+ | name: Test | name: Frank | false |
39
+ When I go to the memberships page for the "Test" account
40
+ And I follow "Frank"
41
+ And I check "Admin"
42
+ And I press "Update"
43
+ Then I should see "Permissions updated"
44
+ When I go to the memberships page for the "Test" account
45
+ And I follow "Frank"
46
+ Then the "Admin" checkbox should be checked
47
+
@@ -0,0 +1,27 @@
1
+ Feature: Manage account
2
+ As a user
3
+ In order to properly represent my organization
4
+ I want to be able to edit account details
5
+
6
+ Scenario: Edit account details
7
+ Given an account exists with a name of "Test"
8
+ And I am signed in as an admin of the "Test" account
9
+ When I go to the settings page for the "Test" account
10
+ Then I should see "Settings for Test"
11
+ When I fill in "Account name" with "Name Change"
12
+ And I press "Update"
13
+ When I follow "Name Change"
14
+ Then the "Account name" field should contain "Name Change"
15
+
16
+ Scenario: Account Settings Tab Bar
17
+ Given an account exists with a name of "Test"
18
+ And I am signed in as an admin of the "Test" account
19
+ And a project named "Projection" exists under the "Test" account
20
+ And the user "captain@awesome.com" exists under the "Test" account
21
+ When I go to the settings page for the "Test" account
22
+ And I follow "Projects"
23
+ Then I should see "Projection"
24
+ When I follow "Users"
25
+ Then I should see "captain@awesome.com"
26
+ When I follow "Billing"
27
+ Then I should see "Billing"
@@ -0,0 +1,41 @@
1
+ Feature: Manage Projects
2
+ As a admin user
3
+ I want to be able to manage projects
4
+ In order to have a project for each of my software applications
5
+
6
+ Background:
7
+ Given an account exists with a name of "Test"
8
+ And I have signed in with "joe@example.com/test"
9
+ And "joe@example.com" is an admin of the "Test" account
10
+
11
+ Scenario: Create new project
12
+ When I go to the projects page for the "Test" account
13
+ And I follow "New Project"
14
+ And I fill in "Name" with "Project 1"
15
+ And I press "Create"
16
+ And I go to the projects page for the "Test" account
17
+ Then I should see "Project 1"
18
+
19
+ Scenario: Edit a project
20
+ Given the following project exists:
21
+ | account | name |
22
+ | name: Test | Project 1 |
23
+ When I go to the projects page for the "Test" account
24
+ And I follow "Project 1"
25
+ And I fill in "Name" with "Name Change"
26
+ And I press "Update"
27
+ Then I should see "Name Change"
28
+
29
+ Scenario: View all projects
30
+ Given the following projects exist:
31
+ | account | name |
32
+ | name: Test | Project 1 |
33
+ | name: Test | Project 2 |
34
+ | name: Other | Project 3 |
35
+ | name: Another | Project 4 |
36
+ And "joe@example.com" is a member of the "Other" account
37
+ When I go to the projects page for the "Test" account
38
+ Then I should see "Project 1"
39
+ And I should see "Project 2"
40
+ But I should not see "Project 3"
41
+ And I should not see "Project 4"
@@ -0,0 +1,99 @@
1
+ Feature: Managing users
2
+ As a admin user
3
+ In order to use the site with others
4
+ I want to be able to invite users, edit them and their permissions
5
+
6
+ Background:
7
+ Given an account exists with a name of "Test"
8
+ And I am signed in as an admin of the "Test" account
9
+ And I am on the memberships page for the "Test" account
10
+
11
+ Scenario: Invite new users
12
+ When I follow "Invite user"
13
+ And I fill in "Email" with "invitee@example.com"
14
+ And I press "Invite User"
15
+ Then I should see "invited"
16
+ When I sign out
17
+ And I follow the link sent to "invitee@example.com"
18
+ And I fill in the following new user:
19
+ | Name | Billy |
20
+ | Password | secret |
21
+ | Confirm password | secret |
22
+ And I press "Accept Invitation"
23
+ Then I should be signed in
24
+ And "invitee@example.com" should be a member of the "Test" account
25
+ When I go to the settings page
26
+ Then the "Name" field should contain "Billy"
27
+
28
+ Scenario: Invite existing users
29
+ Given the following email confirmed user exists:
30
+ | email | password | password confirmation |
31
+ | invitee@example.com | secret | secret |
32
+ When I follow "Invite user"
33
+ And I fill in "Email" with "invitee@example.com"
34
+ And I press "Invite User"
35
+ Then I should see "invited"
36
+ When I sign out
37
+ And I follow the link sent to "invitee@example.com"
38
+ And I fill in the following existing user:
39
+ | Password | secret |
40
+ And I press "Accept Invitation"
41
+ Then I should be signed in
42
+ And "invitee@example.com" should be a member of the "Test" account
43
+
44
+ Scenario: Fail to accept an invitation
45
+ Given the following invitation exists:
46
+ | email |
47
+ | invitee@example.com |
48
+ When I follow the link sent to "invitee@example.com"
49
+ And I press "Accept Invitation"
50
+ Then the form should have inline error messages
51
+
52
+ Scenario: Invite admin users
53
+ Given the following email confirmed user exists:
54
+ | email | password | password confirmation |
55
+ | invitee@example.com | secret | secret |
56
+ When I follow "Invite user"
57
+ And I fill in "Email" with "invitee@example.com"
58
+ And I check "Grant administrator privileges"
59
+ And I press "Invite User"
60
+ And I sign out
61
+ And I follow the link sent to "invitee@example.com"
62
+ And I fill in the following existing user:
63
+ | Password | secret |
64
+ And I press "Accept Invitation"
65
+ Then I should be signed in
66
+ And "invitee@example.com" should be an admin member of the "Test" account
67
+
68
+ Scenario: invalid invitation
69
+ When I follow "Invite user"
70
+ And I press "Invite User"
71
+ Then the form should have inline error messages
72
+
73
+ Scenario: view account members
74
+ Given the following email confirmed users exist:
75
+ | name |
76
+ | Bill |
77
+ | John |
78
+ | Frank |
79
+ And the following memberships exist:
80
+ | account | user |
81
+ | name: Test | name: Bill |
82
+ | name: Test | name: Frank |
83
+ When I go to the memberships page for the "Test" account
84
+ Then I should see "Bill"
85
+ And I should see "Frank"
86
+ And I should not see "John"
87
+
88
+ Scenario: remove a user from an account
89
+ Given an email confirmed user exists with a name of "Frank"
90
+ And the following memberships exist:
91
+ | account | user |
92
+ | name: Test | name: Frank |
93
+ When I go to the memberships page for the "Test" account
94
+ And I follow "Frank"
95
+ And I follow "Remove from account"
96
+ Then I should see "User removed"
97
+ When I go to the memberships page for the "Test" account
98
+ Then I should not see "Frank"
99
+
@@ -0,0 +1,46 @@
1
+ Feature: user adds a new account
2
+
3
+ Background:
4
+ Given a plan exists with a name of "Free"
5
+
6
+ Scenario: existing user adds an account
7
+ Given I am signed up and confirmed as "user@example.com/test"
8
+ When I go to the sign up page for the "Free" plan
9
+ And I fill in "Email" with "user@example.com"
10
+ And I fill in "Password" with "test"
11
+ And I fill in "Company Name" with "Robots"
12
+ And I fill in "Account URL" with "robots"
13
+ And I press "Sign up"
14
+ Then I should see "created"
15
+ But I should not see "Instructions for confirming"
16
+ When I go to the settings page
17
+ And I follow "Robots"
18
+ Then the "Url" field should contain "robots"
19
+
20
+ Scenario: sign up for two accounts
21
+ When I go to the sign up page for the "Free" plan
22
+ And I fill in "Email" with "email@person.com"
23
+ And I fill in "Password" with "password"
24
+ And I fill in "Confirm password" with "password"
25
+ And I fill in "Your name" with "Robot"
26
+ And I fill in "Company Name" with "Robots, Inc"
27
+ And I fill in "Account URL" with "robots"
28
+ And I press "Sign up"
29
+ Then I should see "created"
30
+ And I should see "Instructions for confirming"
31
+ When I follow the confirmation link sent to "email@person.com"
32
+ And I go to the settings page
33
+ And I follow "Robots, Inc"
34
+ Then the "Url" field should contain "robots"
35
+ When I go to the settings page
36
+ And I follow "Add new account"
37
+ And I follow "Free"
38
+ And I fill in "Company Name" with "Machines"
39
+ And I fill in "Account URL" with "machines"
40
+ And I press "Sign up"
41
+ Then I should see "created"
42
+ But I should not see "Instructions for confirming"
43
+ When I go to the settings page
44
+ And I follow "Machines"
45
+ Then the "Url" field should contain "machines"
46
+
@@ -0,0 +1,51 @@
1
+ Feature: Sign up
2
+ In order to get access to protected sections of the site
3
+ A user
4
+ Should be able to sign up
5
+
6
+ Background:
7
+ Given a plan exists with a name of "Free"
8
+
9
+ Scenario: User signs up with invalid data
10
+ When I go to the sign up page for the "Free" plan
11
+ And I fill in "Email" with "invalidemail"
12
+ And I fill in "Password" with "password"
13
+ And I fill in "Confirm password" with ""
14
+ And I press "Sign up"
15
+ Then I should see error messages
16
+
17
+ Scenario: User signs up with valid data
18
+ When I go to the sign up page for the "Free" plan
19
+ And I fill in "Email" with "email@person.com"
20
+ And I fill in "Password" with "password"
21
+ And I fill in "Confirm password" with "password"
22
+ And I fill in "Your name" with "Robot"
23
+ And I fill in "Company Name" with "Robots, Inc"
24
+ And I fill in "Account URL" with "robotsinc"
25
+ And I press "Sign up"
26
+ Then I should see "Instructions for confirming"
27
+ And a confirmation message should be sent to "email@person.com"
28
+ And the user "email@person.com" should be an admin of "Robots, Inc"
29
+
30
+ Scenario: User confirms his account
31
+ Given I signed up with "email@person.com/password"
32
+ When I follow the confirmation link sent to "email@person.com"
33
+ Then I should see "Confirmed email and signed in"
34
+ And I should be signed in
35
+
36
+ Scenario: Signed in user clicks confirmation link again
37
+ Given I signed up with "email@person.com/password"
38
+ When I follow the confirmation link sent to "email@person.com"
39
+ Then I should be signed in
40
+ When I follow the confirmation link sent to "email@person.com"
41
+ Then I should see "Confirmed email and signed in"
42
+ And I should be signed in
43
+
44
+ Scenario: Signed out user clicks confirmation link again
45
+ Given I signed up with "email@person.com/password"
46
+ When I follow the confirmation link sent to "email@person.com"
47
+ Then I should be signed in
48
+ When I sign out
49
+ And I follow the confirmation link sent to "email@person.com"
50
+ Then I should see "Already confirmed email. Please sign in."
51
+ And I should be signed out
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saucy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot, inc.
@@ -141,6 +141,15 @@ files:
141
141
  - features/step_definitions/rails_steps.rb
142
142
  - features/support/env.rb
143
143
  - features/support/file.rb
144
+ - lib/generators/saucy/features/templates/features/edit_profile.feature
145
+ - lib/generators/saucy/features/templates/features/edit_project_permissions.feature
146
+ - lib/generators/saucy/features/templates/features/edit_user_permissions.feature
147
+ - lib/generators/saucy/features/templates/features/manage_account.feature
148
+ - lib/generators/saucy/features/templates/features/manage_projects.feature
149
+ - lib/generators/saucy/features/templates/features/manage_users.feature
150
+ - lib/generators/saucy/features/templates/features/new_account.feature
151
+ - lib/generators/saucy/features/templates/features/sign_up.feature
152
+ - lib/generators/saucy/features/templates/README
144
153
  - spec/controllers/accounts_controller_spec.rb
145
154
  - spec/controllers/application_controller_spec.rb
146
155
  - spec/controllers/invitations_controller_spec.rb