11package org .woehlke .java .simpleworklist ;
22
33import lombok .extern .slf4j .Slf4j ;
4+ import org .junit .Ignore ;
45import org .junit .jupiter .api .*;
56import org .springframework .beans .factory .annotation .Autowired ;
7+ import org .springframework .boot .context .properties .EnableConfigurationProperties ;
68import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
79import org .springframework .boot .test .context .SpringBootTest ;
810import org .springframework .boot .web .server .LocalServerPort ;
911import org .springframework .boot .web .servlet .context .ServletWebServerApplicationContext ;
12+ import org .springframework .context .annotation .Configuration ;
1013import org .springframework .context .annotation .Import ;
1114import org .springframework .security .core .context .SecurityContextHolder ;
1215import org .springframework .security .core .userdetails .UsernameNotFoundException ;
1316import org .springframework .security .test .context .support .WithMockUser ;
1417import org .springframework .test .web .servlet .MockMvc ;
1518import org .springframework .test .web .servlet .ResultActions ;
1619import org .springframework .test .web .servlet .request .MockHttpServletRequestBuilder ;
20+ import org .woehlke .java .simpleworklist .config .SimpleworklistProperties ;
1721import org .woehlke .java .simpleworklist .config .UserAccountTestDataService ;
1822
1923import java .net .URL ;
3236@ AutoConfigureMockMvc
3337@ SpringBootTest (webEnvironment = SpringBootTest .WebEnvironment .RANDOM_PORT )
3438@ Import (SimpleworklistApplication .class )
39+ @ EnableConfigurationProperties ({
40+ SimpleworklistProperties .class
41+ })
3542public class SmokeTests {
3643
3744 @ Autowired
@@ -47,7 +54,6 @@ public class SmokeTests {
4754 @ Autowired
4855 private UserAccountTestDataService userAccountTestDataService ;
4956
50-
5157 private final String eyecatcherH1 = "##################################################################" ;
5258 private final String eyecatcherH2 = "------------------------------------------------------------------" ;
5359 private final String eyecatcherH3 = "******************************************************************" ;
@@ -170,6 +176,7 @@ public void testF007AddFirstNewTaskToInbox(){
170176 log .info (eyecatcherH2 );
171177 }
172178
179+
173180 @ WithMockUser (username ="test01@test.de" )
174181 @ DisplayName (F008 )
175182 @ Order (8 )
@@ -180,6 +187,7 @@ public void testF008AddAnotherNewTaskToInbox(){
180187 log .info (eyecatcherH2 );
181188 }
182189
190+
183191 @ WithMockUser (username ="test01@test.de" )
184192 @ DisplayName (F009 )
185193 @ Order (9 )
@@ -190,6 +198,7 @@ public void testF009AddTaskToProjectRoot(){
190198 log .info (eyecatcherH2 );
191199 }
192200
201+
193202 @ WithMockUser (username ="test01@test.de" )
194203 @ DisplayName (F010 )
195204 @ Order (10 )
@@ -200,6 +209,7 @@ public void testF010AddSubProjectToProjectRoot(){
200209 log .info (eyecatcherH2 );
201210 }
202211
212+
203213 @ WithMockUser (username ="test01@test.de" )
204214 @ DisplayName (F011 )
205215 @ Order (11 )
@@ -210,6 +220,7 @@ public void testF011SetFocusOfTask(){
210220 log .info (eyecatcherH2 );
211221 }
212222
223+
213224 @ WithMockUser (username ="test01@test.de" )
214225 @ DisplayName (F012 )
215226 @ Order (12 )
@@ -220,6 +231,7 @@ public void testF012UnSetFocusOfTask(){
220231 log .info (eyecatcherH2 );
221232 }
222233
234+
223235 @ WithMockUser (username ="test01@test.de" )
224236 @ DisplayName (F013 )
225237 @ Order (13 )
@@ -233,7 +245,7 @@ public void testF013ShowTaskstateInbox() throws Exception {
233245 assertNotNull (this .mockMvc );
234246 try {
235247 this .mockMvc .perform (get (base .toString ()))
236- // .andDo(print())
248+ .andDo (print ())
237249 .andExpect (status ().isOk ());
238250 //.andExpect(content().string(containsString("SimpleWorklist")));
239251 } catch (UsernameNotFoundException e ) {
@@ -247,6 +259,7 @@ public void testF013ShowTaskstateInbox() throws Exception {
247259 log .info (eyecatcherH2 );
248260 }
249261
262+
250263 @ WithMockUser (username ="test01@test.de" )
251264 @ DisplayName (F014 )
252265 @ Order (14 )
@@ -259,12 +272,13 @@ public void testF014ShowTaskstateToday() throws Exception {
259272 log .info ("Server URL: " + base .toString ());
260273 assertNotNull (this .mockMvc );
261274 this .mockMvc .perform (get (base .toString ()))
262- // .andDo(print())
275+ .andDo (print ())
263276 .andExpect (status ().isOk ());
264277 //.andExpect(content().string(containsString("SimpleWorklist")));
265278 log .info (eyecatcherH2 );
266279 }
267280
281+
268282 @ WithMockUser (username ="test01@test.de" )
269283 @ DisplayName (F015 )
270284 @ Order (15 )
@@ -287,6 +301,7 @@ public void testF015ShowTaskstateNext() throws Exception {
287301 log .info (eyecatcherH2 );
288302 }
289303
304+
290305 @ WithMockUser (username ="test01@test.de" )
291306 @ DisplayName (F016 )
292307 @ Order (16 )
@@ -305,6 +320,7 @@ public void testF016ShowTaskstateWaiting() throws Exception {
305320 log .info (eyecatcherH2 );
306321 }
307322
323+
308324 @ WithMockUser (username ="test01@test.de" )
309325 @ DisplayName (F017 )
310326 @ Order (17 )
@@ -323,6 +339,7 @@ public void testF017ShowTaskstateScheduled() throws Exception {
323339 log .info (eyecatcherH2 );
324340 }
325341
342+
326343 @ WithMockUser (username ="test01@test.de" )
327344 @ DisplayName (F018 )
328345 @ Order (18 )
@@ -341,6 +358,7 @@ public void testF018ShowTaskstateSomeday() throws Exception {
341358 log .info (eyecatcherH2 );
342359 }
343360
361+
344362 @ WithMockUser (username ="test01@test.de" )
345363 @ DisplayName (F019 )
346364 @ Order (19 )
@@ -359,6 +377,7 @@ public void testF019ShowTaskstateFocus() throws Exception {
359377 log .info (eyecatcherH2 );
360378 }
361379
380+
362381 @ WithMockUser (username ="test01@test.de" )
363382 @ DisplayName (F020 )
364383 @ Order (20 )
@@ -377,6 +396,7 @@ public void testF020ShowTaskstateCompleted() throws Exception {
377396 log .info (eyecatcherH2 );
378397 }
379398
399+
380400 @ WithMockUser (username ="test01@test.de" )
381401 @ DisplayName (F021 )
382402 @ Order (21 )
@@ -395,6 +415,7 @@ public void testF021ShowTaskstateTrash() throws Exception {
395415 log .info (eyecatcherH2 );
396416 }
397417
418+
398419 @ WithMockUser (username ="test01@test.de" )
399420 @ DisplayName (F022 )
400421 @ Order (22 )
@@ -405,6 +426,7 @@ public void testF022TaskEdit(){
405426 log .info (eyecatcherH2 );
406427 }
407428
429+
408430 @ WithMockUser (username ="test01@test.de" )
409431 @ DisplayName (F023 )
410432 @ Order (23 )
@@ -415,6 +437,7 @@ public void testF023TaskEditFormChangeTaskstateViaDropDown(){
415437 log .info (eyecatcherH2 );
416438 }
417439
440+
418441 @ WithMockUser (username ="test01@test.de" )
419442 @ DisplayName (F024 )
420443 @ Order (24 )
@@ -425,6 +448,7 @@ public void testF024TaskComplete(){
425448 log .info (eyecatcherH2 );
426449 }
427450
451+
428452 @ WithMockUser (username ="test01@test.de" )
429453 @ DisplayName (F025 )
430454 @ Order (25 )
@@ -435,6 +459,7 @@ public void testF025TaskIncomplete(){
435459 log .info (eyecatcherH2 );
436460 }
437461
462+
438463 @ WithMockUser (username ="test01@test.de" )
439464 @ DisplayName (F026 )
440465 @ Order (26 )
@@ -445,6 +470,7 @@ public void testF026TaskDelete(){
445470 log .info (eyecatcherH2 );
446471 }
447472
473+
448474 @ WithMockUser (username ="test01@test.de" )
449475 @ DisplayName (F027 )
450476 @ Order (27 )
0 commit comments