1
1
package org .woehlke .java .simpleworklist ;
2
2
3
3
import lombok .extern .slf4j .Slf4j ;
4
+ import org .junit .Ignore ;
4
5
import org .junit .jupiter .api .*;
5
6
import org .springframework .beans .factory .annotation .Autowired ;
7
+ import org .springframework .boot .context .properties .EnableConfigurationProperties ;
6
8
import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
7
9
import org .springframework .boot .test .context .SpringBootTest ;
8
10
import org .springframework .boot .web .server .LocalServerPort ;
9
11
import org .springframework .boot .web .servlet .context .ServletWebServerApplicationContext ;
12
+ import org .springframework .context .annotation .Configuration ;
10
13
import org .springframework .context .annotation .Import ;
11
14
import org .springframework .security .core .context .SecurityContextHolder ;
12
15
import org .springframework .security .core .userdetails .UsernameNotFoundException ;
13
16
import org .springframework .security .test .context .support .WithMockUser ;
14
17
import org .springframework .test .web .servlet .MockMvc ;
15
18
import org .springframework .test .web .servlet .ResultActions ;
16
19
import org .springframework .test .web .servlet .request .MockHttpServletRequestBuilder ;
20
+ import org .woehlke .java .simpleworklist .config .SimpleworklistProperties ;
17
21
import org .woehlke .java .simpleworklist .config .UserAccountTestDataService ;
18
22
19
23
import java .net .URL ;
32
36
@ AutoConfigureMockMvc
33
37
@ SpringBootTest (webEnvironment = SpringBootTest .WebEnvironment .RANDOM_PORT )
34
38
@ Import (SimpleworklistApplication .class )
39
+ @ EnableConfigurationProperties ({
40
+ SimpleworklistProperties .class
41
+ })
35
42
public class SmokeTests {
36
43
37
44
@ Autowired
@@ -47,7 +54,6 @@ public class SmokeTests {
47
54
@ Autowired
48
55
private UserAccountTestDataService userAccountTestDataService ;
49
56
50
-
51
57
private final String eyecatcherH1 = "##################################################################" ;
52
58
private final String eyecatcherH2 = "------------------------------------------------------------------" ;
53
59
private final String eyecatcherH3 = "******************************************************************" ;
@@ -170,6 +176,7 @@ public void testF007AddFirstNewTaskToInbox(){
170
176
log .info (eyecatcherH2 );
171
177
}
172
178
179
+
173
180
@ WithMockUser (username ="test01@test.de" )
174
181
@ DisplayName (F008 )
175
182
@ Order (8 )
@@ -180,6 +187,7 @@ public void testF008AddAnotherNewTaskToInbox(){
180
187
log .info (eyecatcherH2 );
181
188
}
182
189
190
+
183
191
@ WithMockUser (username ="test01@test.de" )
184
192
@ DisplayName (F009 )
185
193
@ Order (9 )
@@ -190,6 +198,7 @@ public void testF009AddTaskToProjectRoot(){
190
198
log .info (eyecatcherH2 );
191
199
}
192
200
201
+
193
202
@ WithMockUser (username ="test01@test.de" )
194
203
@ DisplayName (F010 )
195
204
@ Order (10 )
@@ -200,6 +209,7 @@ public void testF010AddSubProjectToProjectRoot(){
200
209
log .info (eyecatcherH2 );
201
210
}
202
211
212
+
203
213
@ WithMockUser (username ="test01@test.de" )
204
214
@ DisplayName (F011 )
205
215
@ Order (11 )
@@ -210,6 +220,7 @@ public void testF011SetFocusOfTask(){
210
220
log .info (eyecatcherH2 );
211
221
}
212
222
223
+
213
224
@ WithMockUser (username ="test01@test.de" )
214
225
@ DisplayName (F012 )
215
226
@ Order (12 )
@@ -220,6 +231,7 @@ public void testF012UnSetFocusOfTask(){
220
231
log .info (eyecatcherH2 );
221
232
}
222
233
234
+
223
235
@ WithMockUser (username ="test01@test.de" )
224
236
@ DisplayName (F013 )
225
237
@ Order (13 )
@@ -233,7 +245,7 @@ public void testF013ShowTaskstateInbox() throws Exception {
233
245
assertNotNull (this .mockMvc );
234
246
try {
235
247
this .mockMvc .perform (get (base .toString ()))
236
- // .andDo(print())
248
+ .andDo (print ())
237
249
.andExpect (status ().isOk ());
238
250
//.andExpect(content().string(containsString("SimpleWorklist")));
239
251
} catch (UsernameNotFoundException e ) {
@@ -247,6 +259,7 @@ public void testF013ShowTaskstateInbox() throws Exception {
247
259
log .info (eyecatcherH2 );
248
260
}
249
261
262
+
250
263
@ WithMockUser (username ="test01@test.de" )
251
264
@ DisplayName (F014 )
252
265
@ Order (14 )
@@ -259,12 +272,13 @@ public void testF014ShowTaskstateToday() throws Exception {
259
272
log .info ("Server URL: " + base .toString ());
260
273
assertNotNull (this .mockMvc );
261
274
this .mockMvc .perform (get (base .toString ()))
262
- // .andDo(print())
275
+ .andDo (print ())
263
276
.andExpect (status ().isOk ());
264
277
//.andExpect(content().string(containsString("SimpleWorklist")));
265
278
log .info (eyecatcherH2 );
266
279
}
267
280
281
+
268
282
@ WithMockUser (username ="test01@test.de" )
269
283
@ DisplayName (F015 )
270
284
@ Order (15 )
@@ -287,6 +301,7 @@ public void testF015ShowTaskstateNext() throws Exception {
287
301
log .info (eyecatcherH2 );
288
302
}
289
303
304
+
290
305
@ WithMockUser (username ="test01@test.de" )
291
306
@ DisplayName (F016 )
292
307
@ Order (16 )
@@ -305,6 +320,7 @@ public void testF016ShowTaskstateWaiting() throws Exception {
305
320
log .info (eyecatcherH2 );
306
321
}
307
322
323
+
308
324
@ WithMockUser (username ="test01@test.de" )
309
325
@ DisplayName (F017 )
310
326
@ Order (17 )
@@ -323,6 +339,7 @@ public void testF017ShowTaskstateScheduled() throws Exception {
323
339
log .info (eyecatcherH2 );
324
340
}
325
341
342
+
326
343
@ WithMockUser (username ="test01@test.de" )
327
344
@ DisplayName (F018 )
328
345
@ Order (18 )
@@ -341,6 +358,7 @@ public void testF018ShowTaskstateSomeday() throws Exception {
341
358
log .info (eyecatcherH2 );
342
359
}
343
360
361
+
344
362
@ WithMockUser (username ="test01@test.de" )
345
363
@ DisplayName (F019 )
346
364
@ Order (19 )
@@ -359,6 +377,7 @@ public void testF019ShowTaskstateFocus() throws Exception {
359
377
log .info (eyecatcherH2 );
360
378
}
361
379
380
+
362
381
@ WithMockUser (username ="test01@test.de" )
363
382
@ DisplayName (F020 )
364
383
@ Order (20 )
@@ -377,6 +396,7 @@ public void testF020ShowTaskstateCompleted() throws Exception {
377
396
log .info (eyecatcherH2 );
378
397
}
379
398
399
+
380
400
@ WithMockUser (username ="test01@test.de" )
381
401
@ DisplayName (F021 )
382
402
@ Order (21 )
@@ -395,6 +415,7 @@ public void testF021ShowTaskstateTrash() throws Exception {
395
415
log .info (eyecatcherH2 );
396
416
}
397
417
418
+
398
419
@ WithMockUser (username ="test01@test.de" )
399
420
@ DisplayName (F022 )
400
421
@ Order (22 )
@@ -405,6 +426,7 @@ public void testF022TaskEdit(){
405
426
log .info (eyecatcherH2 );
406
427
}
407
428
429
+
408
430
@ WithMockUser (username ="test01@test.de" )
409
431
@ DisplayName (F023 )
410
432
@ Order (23 )
@@ -415,6 +437,7 @@ public void testF023TaskEditFormChangeTaskstateViaDropDown(){
415
437
log .info (eyecatcherH2 );
416
438
}
417
439
440
+
418
441
@ WithMockUser (username ="test01@test.de" )
419
442
@ DisplayName (F024 )
420
443
@ Order (24 )
@@ -425,6 +448,7 @@ public void testF024TaskComplete(){
425
448
log .info (eyecatcherH2 );
426
449
}
427
450
451
+
428
452
@ WithMockUser (username ="test01@test.de" )
429
453
@ DisplayName (F025 )
430
454
@ Order (25 )
@@ -435,6 +459,7 @@ public void testF025TaskIncomplete(){
435
459
log .info (eyecatcherH2 );
436
460
}
437
461
462
+
438
463
@ WithMockUser (username ="test01@test.de" )
439
464
@ DisplayName (F026 )
440
465
@ Order (26 )
@@ -445,6 +470,7 @@ public void testF026TaskDelete(){
445
470
log .info (eyecatcherH2 );
446
471
}
447
472
473
+
448
474
@ WithMockUser (username ="test01@test.de" )
449
475
@ DisplayName (F027 )
450
476
@ Order (27 )
0 commit comments