@@ -11,35 +11,20 @@ public class ImageWebReporter implements EnvironmentAwareReporter
1111 public void report (String received , String approved )
1212 {
1313 //language=HTML
14- String text = "<html>\n " +
15- "<script>\n " +
16- " function copyToClipboard() {\n " +
17- " const copyText = document.getElementById(\" moveText\" );\n " +
18- " navigator.clipboard.writeText(copyText.textContent);\n " +
19- " }\n " +
20- "</script>\n " +
21- "<body>\n " +
22- "<center>\n " +
23- " <table border=1>\n " +
24- " <tr>\n " +
25- " <td><img src=\" file:///%s\" ></td>\n " +
26- " <td><img src=\" file:///%s\" ></td>\n " +
27- " </tr>\n " +
28- " <tr>\n " +
29- " <td>approved</td>\n " +
30- " <td>received</td>\n " +
31- " </tr>\n " +
32- " </table>\n " +
33- " %s <br/> <b>to approve :</b> copy clipboard to command window <br/> <font size=1 id=\" moveText\" >%s</font>\n " +
34- " <br /><button onclick=\" copyToClipboard()\" >Copy to clipboard</button>\n " +
35- "</center>\n " +
36- "</body>\n " +
37- "</html>\n " ;
14+ String text = "<html>\n " + "<script>\n " + " function copyToClipboard() {\n "
15+ + " const copyText = document.getElementById(\" moveText\" );\n "
16+ + " navigator.clipboard.writeText(copyText.textContent);\n " + " }\n " + "</script>\n " + "<body>\n "
17+ + "<center>\n " + " <table border=1>\n " + " <tr>\n "
18+ + " <td><img src=\" file:///%s\" ></td>\n " + " <td><img src=\" file:///%s\" ></td>\n "
19+ + " </tr>\n " + " <tr>\n " + " <td>approved</td>\n "
20+ + " <td>received</td>\n " + " </tr>\n " + " </table>\n "
21+ + " %s <br/> <b>to approve :</b> copy clipboard to command window <br/> <font size=1 id=\" moveText\" >%s</font>\n "
22+ + " <br /><button onclick=\" copyToClipboard()\" >Copy to clipboard</button>\n " + "</center>\n "
23+ + "</body>\n " + "</html>\n " ;
3824 String moveText = ClipboardReporter .getAcceptApprovalText (received , approved );
3925 text = String .format (text , approved , received , received , moveText );
4026 TestUtils .displayHtml (text );
4127 }
42-
4328 /**
4429 * We assume any environment that is not headless will have a web browser to display the image in a web page.
4530 */
0 commit comments