Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 121 lines (92 sloc) 3.89 kB
ac065e1 @sarahmei Differentiate between oauth features and non-oauth features for travis.
sarahmei authored
1 @javascript @oauth-group
381b851 Add Chubbies, the oauth sample app, and a cucumber feature for part o…
Raphael Sofaer authored
2 Feature: oauth
3 Exchanging oauth credentials
4
5 Background:
67eaafe @danielgrippi Chubbies no longer saves diaspora_handle from the browser
danielgrippi authored
6 Given Chubbies has been killed
7 And Chubbies is running
6d5169d Chubbies is working with local diaspora-client gem
Raphael Sofaer authored
8 And I visit "/reset" on Chubbies
381b851 Add Chubbies, the oauth sample app, and a cucumber feature for part o…
Raphael Sofaer authored
9 And a user with username "bob" and password "secret"
10
11 Scenario: Authorize Chubbies
6d5169d Chubbies is working with local diaspora-client gem
Raphael Sofaer authored
12 When I try to authorize Chubbies
381b851 Add Chubbies, the oauth sample app, and a cucumber feature for part o…
Raphael Sofaer authored
13
6d5169d Chubbies is working with local diaspora-client gem
Raphael Sofaer authored
14 When I press "Authorize"
381b851 Add Chubbies, the oauth sample app, and a cucumber feature for part o…
Raphael Sofaer authored
15 Then I should be on "/account" on Chubbies
16 And I should see my "profile.birthday"
17 And I should see my "name"
18
27049e5 @danielgrippi connect logic
danielgrippi authored
19 Scenario: Signup+login (Diaspora Connect) with Chubbies
20 When I visit "/reset" on Chubbies
21 And I should have 0 user on Chubbies
22 And I try to authorize Chubbies
23 And I press "Authorize"
24 Then I should be on "/account" on Chubbies
25
26 And I should have 1 user on Chubbies
a63d1ad Sign out the signed in user if a different uid is passed to Authoriza…
Raphael Sofaer authored
27
28 Scenario: Signing up as a user while someone else is logged into Diaspora
559016a @jhass oh well, touching Capybara.app_host resets the session
jhass authored
29 When I change the app_host to Diaspora
a63d1ad Sign out the signed in user if a different uid is passed to Authoriza…
Raphael Sofaer authored
30 Given a user with username "alice"
31 When I sign in as "alice@alice.alice"
32 Then I visit "/new" on Chubbies
33 And I fill in "Diaspora ID" with "bob@localhost:9887"
34 And I press "Connect to Diaspora"
35 Then I should be on the new user session page
dec10e3 Finish setting up sesssions#new prefill when logged out by authorizat…
Raphael Sofaer authored
36 And the "Username" field within "#user_new" should contain "bob"
27049e5 @danielgrippi connect logic
danielgrippi authored
37
381b851 Add Chubbies, the oauth sample app, and a cucumber feature for part o…
Raphael Sofaer authored
38 Scenario: Not authorize Chubbies
6d5169d Chubbies is working with local diaspora-client gem
Raphael Sofaer authored
39 When I try to authorize Chubbies
381b851 Add Chubbies, the oauth sample app, and a cucumber feature for part o…
Raphael Sofaer authored
40
41 When I press "No"
6d5169d Chubbies is working with local diaspora-client gem
Raphael Sofaer authored
42 Then I should be on "/account" on Chubbies
27049e5 @danielgrippi connect logic
danielgrippi authored
43 And I should have 0 user on Chubbies
381b851 Add Chubbies, the oauth sample app, and a cucumber feature for part o…
Raphael Sofaer authored
44
78253b6 resetting the token instead if the app already exists, should move th…
Ilya Zhitomirskiy authored
45 Scenario: Authorize Chubbies when Chubbies is already connected
e121b0f @danielgrippi Chubbies now sees that it has no secret and registers itself.
danielgrippi authored
46 Given Chubbies is registered on my pod
6d5169d Chubbies is working with local diaspora-client gem
Raphael Sofaer authored
47 When I try to authorize Chubbies
48 And there is only one Chubbies
e121b0f @danielgrippi Chubbies now sees that it has no secret and registers itself.
danielgrippi authored
49
6d5169d Chubbies is working with local diaspora-client gem
Raphael Sofaer authored
50 When I press "Authorize"
e121b0f @danielgrippi Chubbies now sees that it has no secret and registers itself.
danielgrippi authored
51 Then I should be on "/account" on Chubbies
52 And I should see my "profile.birthday"
53 And I should see my "name"
78253b6 resetting the token instead if the app already exists, should move th…
Ilya Zhitomirskiy authored
54
55 Scenario: Authorize Chubbies when the pod knows about Chubbies
56 Given Chubbies is registered on my pod
57 When I try to authorize Chubbies
58 And I visit "/reset" on Chubbies
559016a @jhass oh well, touching Capybara.app_host resets the session
jhass authored
59 And I change the app_host to Diaspora
78253b6 resetting the token instead if the app already exists, should move th…
Ilya Zhitomirskiy authored
60 And I go to the destroy user session page
61
62 When I try to authorize Chubbies
63 And there is only one Chubbies
64
65 When I press "Authorize"
66 Then I should be on "/account" on Chubbies
67 And I should see my "profile.birthday"
68 And I should see my "name"
3d77186 added authorizations page where a user can see all of their authorize…
Ilya Zhitomirskiy authored
69
70 Scenario: Authorize Chubbies should place it on the authorized applications page
71 When I try to authorize Chubbies
e121b0f @danielgrippi Chubbies now sees that it has no secret and registers itself.
danielgrippi authored
72
3d77186 added authorizations page where a user can see all of their authorize…
Ilya Zhitomirskiy authored
73 When I press "Authorize"
ef0e48a A user can now revoke an application's token iz ms
Ilya Zhitomirskiy authored
74
559016a @jhass oh well, touching Capybara.app_host resets the session
jhass authored
75 And I change the app_host to Diaspora
3d77186 added authorizations page where a user can see all of their authorize…
Ilya Zhitomirskiy authored
76 And I am on the authorizations page
77 Then I should see "Chubbies"
78 And I should see "The best way to chub."
ef0e48a A user can now revoke an application's token iz ms
Ilya Zhitomirskiy authored
79
80 Scenario: Removing Chubbies from the authorized applications list de-authorizes it
81 When I try to authorize Chubbies
82
83 When I press "Authorize"
84
559016a @jhass oh well, touching Capybara.app_host resets the session
jhass authored
85 And I change the app_host to Diaspora
ef0e48a A user can now revoke an application's token iz ms
Ilya Zhitomirskiy authored
86 And I am on the authorizations page
87 And I preemptively confirm the alert
63125cb Fixed the oauth cucumber features
Ilyaaaaaaaaaaaaa Zhitomirskiy authored
88 And I follow "Revoke Access"
ef0e48a A user can now revoke an application's token iz ms
Ilya Zhitomirskiy authored
89 Then I visit "/account?id=1" on Chubbies
90 Then I should see "Token invalid"
bd84eaa @danielgrippi added cucumber test for re-registering a pod from a client
danielgrippi authored
91
92 Scenario: Re-registering a client if the client recognizes the diaspora pod but the diaspora pod has since been reset
93 Given Chubbies is registered on my pod
94 And I remove all traces of Chubbies on the pod
95
96 When I try to authorize Chubbies
97
98 When I press "Authorize"
99 Then I should be on "/account" on Chubbies
100 And I should see my "profile.birthday"
101 And I should see my "name"
7a5fc11 initial cucumber step
Ilyaaaaaaaaaaaaa Zhitomirskiy authored
102
103 Scenario: Login in with Chubbies when you already authorized it
104 Given Chubbies is registered on my pod
27049e5 @danielgrippi connect logic
danielgrippi authored
105 And I should have 0 user on Chubbies
106
7a5fc11 initial cucumber step
Ilyaaaaaaaaaaaaa Zhitomirskiy authored
107 When I try to authorize Chubbies
108 When I press "Authorize"
109 Then I should be on "/account" on Chubbies
110
27049e5 @danielgrippi connect logic
danielgrippi authored
111 And I should have 1 user on Chubbies
7a5fc11 initial cucumber step
Ilyaaaaaaaaaaaaa Zhitomirskiy authored
112 Then I visit "/new" on Chubbies
27049e5 @danielgrippi connect logic
danielgrippi authored
113 And I fill in my Diaspora ID to connect
7a5fc11 initial cucumber step
Ilyaaaaaaaaaaaaa Zhitomirskiy authored
114 And I press "Connect to Diaspora"
115
116 Then I should be on "/account" on Chubbies
27049e5 @danielgrippi connect logic
danielgrippi authored
117 And I should have 1 user on Chubbies
1c314c9 @maxwell return to diaspora after oauth cukes to prevent failures [ci skip]
maxwell authored
118 When I change the app_host to Diaspora
27049e5 @danielgrippi connect logic
danielgrippi authored
119
7a5fc11 initial cucumber step
Ilyaaaaaaaaaaaaa Zhitomirskiy authored
120
Something went wrong with that request. Please try again.