@@ -28,7 +28,7 @@ function step() {
28
28
}
29
29
30
30
step();
31
- }" , 50 ) ; // Adjust speed (in milliseconds) between steps
31
+ }" , 100 ) ; // Adjust speed (in milliseconds) between steps
32
32
}
33
33
34
34
private async Task ScrollSmothlyToTop ( )
@@ -49,7 +49,7 @@ function step() {
49
49
}
50
50
51
51
step();
52
- }" , 50 ) ; // Adjust speed (in milliseconds) between steps
52
+ }" , 100 ) ; // Adjust speed (in milliseconds) between steps
53
53
}
54
54
55
55
private async Task Register ( TestAuthor testAuthor )
@@ -128,9 +128,9 @@ public async Task DemoOfNormalFeatures()
128
128
. WithPassword ( "password" )
129
129
. GetTestAuthor ( ) ;
130
130
131
- var userToBeFolowowedByExternalUser = new TestAuthorBuilder ( RazorFactory . GetUserManager ( ) )
132
- . WithUsernameAndEmail ( "UserToBeFolowowedByExternalUser " )
133
- . GetTestAuthor ( ) ;
131
+ var userToBeFolowowedByMRTest = new TestAuthorBuilder ( RazorFactory . GetUserManager ( ) )
132
+ . WithUsernameAndEmail ( "UserToBeFolowowedByMRTest " )
133
+ . Create ( ) ;
134
134
135
135
var mrAuthor = new TestAuthorBuilder ( RazorFactory . GetUserManager ( ) )
136
136
. WithUsernameAndEmail ( "Mr. Author" )
@@ -144,26 +144,32 @@ public async Task DemoOfNormalFeatures()
144
144
. WithUsernameAndEmail ( "RandomUser" )
145
145
. Create ( ) ;
146
146
147
+ var userWhoWasFollowed = new TestAuthorBuilder ( RazorFactory . GetUserManager ( ) )
148
+ . WithUsernameAndEmail ( "UserWhoWasFollowed" )
149
+ . GetTestAuthor ( ) ;
150
+
147
151
148
- userToFollowOtherUSer . AddFollow ( userToBeFolowowedByExternalUser ) ;
152
+ userToFollowOtherUSer . AddFollow ( userWhoWasFollowed ) ;
149
153
150
154
userToFollowOtherUSer . Create ( ) ;
151
155
152
156
var test = RazorFactory . GetDbContext ( ) . Authors . Select ( a => new { a . UserName , a . Email , a . PasswordHash } ) . ToList ( ) ;
153
157
154
158
await GenerateCheeps ( randomUser . Author , 300 , "Random message" ) ;
155
- await GenerateCheep ( userToBeFolowowedByExternalUser . Author , $ "Hello there people, im { userToBeFolowowedByExternalUser . UserName } ") ;
156
- await GenerateCheep ( userToBeFolowowedByExternalUser . Author , $ "This is my second message") ;
159
+ await GenerateCheep ( userToBeFolowowedByMRTest . Author , $ "Hello there people, im { userToBeFolowowedByMRTest . UserName } ") ;
160
+ await GenerateCheep ( userToBeFolowowedByMRTest . Author , $ "This is my second message") ;
157
161
await GenerateCheep ( mrAuthor . Author , "This is amazing!" ) ;
158
162
159
163
#endregion
160
164
161
165
//go to public timeline
162
- await Page . GotoAsync ( RazorBaseUrl ) ;
166
+ await Page . GotoAsync ( "/" ) ;
167
+ await Page . WaitForURLAsync ( $ "{ RazorBaseUrl } /**") ;
168
+ Thread . Sleep ( 5000 ) ;
163
169
//scroll to bottom
164
- await ScrollSmothlyToBottom ( ) ;
170
+ // await ScrollSmothlyToBottom();
165
171
//scroll to top
166
- await ScrollSmothlyToTop ( ) ;
172
+ // await ScrollSmothlyToTop();
167
173
//Register user with external login
168
174
await RegisterViaExternalProvider ( externalAuthor ) ;
169
175
await Page . WaitForURLAsync ( $ "{ RazorBaseUrl } /**") ;
@@ -180,60 +186,75 @@ public async Task DemoOfNormalFeatures()
180
186
await RazorPageUtils . Login ( testAuthorToRegister ) ;
181
187
//See private timeline
182
188
await RazorPageUtils . GoToPrivateTimeline ( ) ;
189
+ Thread . Sleep ( 700 ) ;
183
190
//Cheep From pirvate timeline
184
191
await PostCheep ( "This is my first message!" ) ;
192
+ Thread . Sleep ( 700 ) ;
185
193
//Go to public timeline
186
194
await RazorPageUtils . GoToPublicTimeline ( ) ;
187
195
//Cheep empty from public timeline
188
196
await PostCheep ( "" ) ;
197
+ Thread . Sleep ( 700 ) ;
189
198
//Cheep from public timeline
190
199
await PostCheep ( "This is my second message!" ) ;
200
+ Thread . Sleep ( 700 ) ;
191
201
//Go to private timeline
192
202
await RazorPageUtils . GoToPrivateTimeline ( ) ;
203
+ Thread . Sleep ( 700 ) ;
193
204
//Go to public timeline
194
205
await RazorPageUtils . GoToPublicTimeline ( ) ;
195
206
//Follow user
196
- await FollowAuthor ( userToBeFolowowedByExternalUser ) ;
207
+ await FollowAuthor ( userToBeFolowowedByMRTest ) ;
208
+ Thread . Sleep ( 700 ) ;
197
209
await FollowAuthor ( mrAuthor ) ;
210
+ Thread . Sleep ( 700 ) ;
198
211
await FollowAuthor ( randomUser ) ;
212
+ Thread . Sleep ( 700 ) ;
199
213
//Unfollow user
200
214
await UnfollowAuthor ( randomUser ) ;
215
+ Thread . Sleep ( 700 ) ;
201
216
//Go to private timeline
202
217
await RazorPageUtils . GoToPrivateTimeline ( ) ;
203
218
//Unfollow user
204
- await UnfollowAuthor ( userToBeFolowowedByExternalUser ) ;
219
+ await UnfollowAuthor ( userToBeFolowowedByMRTest ) ;
220
+ Thread . Sleep ( 700 ) ;
205
221
//Refollow user
206
- await FollowAuthor ( userToBeFolowowedByExternalUser ) ;
222
+ await FollowAuthor ( userToBeFolowowedByMRTest ) ;
223
+ Thread . Sleep ( 700 ) ;
207
224
//Unfollow user
208
225
await UnfollowAuthor ( mrAuthor ) ;
226
+ Thread . Sleep ( 700 ) ;
209
227
//Refresh page
210
228
await Page . ReloadAsync ( ) ;
229
+ Thread . Sleep ( 700 ) ;
211
230
//Go to about page
212
231
await GoToAboutPage ( ) ;
232
+ Thread . Sleep ( 2000 ) ;
213
233
//Forget user
214
234
await ForgetAuthor ( ) ;
215
235
//Try to login
216
236
await RazorPageUtils . Login ( testAuthorToRegister ) ;
237
+ Thread . Sleep ( 300 ) ;
217
238
//login third user, who was followed by external user
218
- await RazorPageUtils . Login ( userToBeFolowowedByExternalUser ) ;
239
+ await RazorPageUtils . Login ( userToBeFolowowedByMRTest ) ;
219
240
//go to about me and see that there is now no followers
220
241
await GoToAboutPage ( ) ;
242
+ Thread . Sleep ( 2000 ) ;
221
243
//forget me
222
244
await ForgetAuthor ( ) ;
223
245
//login 4th user
224
- await RazorPageUtils . Login ( userToFollowOtherUSer ) ;
246
+ await RazorPageUtils . Login ( userWhoWasFollowed ) ;
225
247
//go to about me and see that there is now no one following
226
248
await GoToAboutPage ( ) ;
249
+ Thread . Sleep ( 2000 ) ;
227
250
//sleep for 10 seconds
228
- // Thread.Sleep(10000);
251
+ //Thread.Sleep(10000);
229
252
Assert . True ( true ) ;
230
253
}
231
254
232
255
[ Test ]
233
256
public async Task DemoOfExtraFeatures ( )
234
257
{
235
-
236
-
237
258
Assert . True ( true ) ;
238
259
}
239
260
}
0 commit comments