2222import org .json .simple .parser .JSONParser ;
2323import org .json .simple .parser .ParseException ;
2424
25+ import java .awt .*;
2526import java .io .*;
2627import java .nio .charset .StandardCharsets ;
2728import java .text .SimpleDateFormat ;
@@ -200,10 +201,21 @@ private Html buildHtml() throws IOException, ParseException {
200201 new Div (this ,
201202 new ClassAttribute ("row" )) {{
202203 new Div (this ,
203- new Style ("background-color: rgb(0,191,255); color: white; padding: 10px;" )) {{
204- new H1 (this , new Style ("font-size:22px; font-weight: 200;" )) {{
204+ new Style ("background-color: rgb(0,191,255); color: white; padding: 10px; height: 90px" )) {{
205+ new H1 (this , new Style ("font-size:22px; font-weight: 200;" ),
206+ new ClassAttribute ("col-md-10" )) {{
205207 new NoTag (this , String .format ("Results from: %s" , new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" ).format (new Date ())));
206208 }};
209+ // new com.webfirmframework.wffweb.tag.html.formsandinputs.Button(this,
210+ // new Style("margin: 10px"),
211+ // new ClassAttribute("col-md-1 btn btn-success")){{
212+ // new NoTag(this, "Passed");
213+ // }};
214+ // new com.webfirmframework.wffweb.tag.html.formsandinputs.Button(this,
215+ // new Style("margin: 10px"),
216+ // new ClassAttribute("col-md-1 btn btn-danger")){{
217+ // new NoTag(this, "Failed");
218+ // }};
207219 }};
208220 }};
209221
@@ -233,15 +245,18 @@ private Html buildHtml() throws IOException, ParseException {
233245 boolean isFailed = (Boolean ) jsonObject .get ("error" );
234246
235247 counter ++;
236-
248+ String className ;
237249 if (isFailed ) {
238250 failuresCounter ++;
251+ className = "failed" ;
239252 } else {
240253 successCounter ++;
254+ className = "passed" ;
241255 }
242256
243257 barDuration += String .format ("%s, " , ((String ) jsonObject .get (TIME_EXECUTION )).split (" " )[0 ]);
244258 barScenariosNames += String .format ("'%d. %s', " , counter , jsonObject .get (SCENARIO ));
259+ String finalClassName = className ;
245260 new Div (this ,
246261 new ClassAttribute ("row" )) {
247262 {
@@ -251,7 +266,7 @@ private Html buildHtml() throws IOException, ParseException {
251266 }
252267 new Div (this ,
253268 new Style ("margin-top:2px;" + bgColor ),
254- new ClassAttribute ("accordion" )) {{
269+ new ClassAttribute ("accordion " + finalClassName )) {{
255270 new H1 (this ,
256271 new Style ("color: rgb(47,79,79); font-size:24px; font-size:18px; font-weight: 300; text-decoration: underline;" )) {{
257272 new NoTag (this , String .format ("Scenario: \" %s\" " , jsonObject .get (SCENARIO )));
0 commit comments