From fc12b1243505736c445534824358a3d0eda5c9a3 Mon Sep 17 00:00:00 2001 From: Mireille Raad Date: Mon, 13 Apr 2020 00:16:34 -0400 Subject: [PATCH 1/2] init data regtests --- _layouts/regtests.html | 39 +++++++++++++++++++++++++++++++++++ pages/test-dashboard.markdown | 8 +++++++ 2 files changed, 47 insertions(+) create mode 100644 _layouts/regtests.html create mode 100644 pages/test-dashboard.markdown diff --git a/_layouts/regtests.html b/_layouts/regtests.html new file mode 100644 index 000000000..3fc5c767a --- /dev/null +++ b/_layouts/regtests.html @@ -0,0 +1,39 @@ +--- +layout: default +--- + + + +
+
+ failed, passed, warning +
+
+ + +
+
+
+ {% for test in site.data.regrtests_results.suites %} + {% for result in test %} + {% if result.name %}
name: {{result.name }}
{% endif %} + {% if result.class %}
class: {{result.class }}
{% endif %} + {% if result.module %}
module: {{result.module }}
{% endif %} + {% if result.description %}
description: {{result.description }}
{% endif %} + {% for cases in result.cases %} +
    + {% for case in cases %} + {% if case.casename %}
  • casename: {{case.casename }}
  • {% endif %} + {% if case.method %}
  • method: {{case.method }}
  • {% endif %} + {% if case.result %}
  • result: {{case.result }}
  • {% endif %} + {% if case.caseexecutiontime %}
  • caseexecutiontime: {{case.caseexecutiontime }}
  • {% endif %} + {% endfor %} +
+ {% endfor %} + {% endfor %} + {% endfor %} +
+
+
+ + diff --git a/pages/test-dashboard.markdown b/pages/test-dashboard.markdown new file mode 100644 index 000000000..83583b36a --- /dev/null +++ b/pages/test-dashboard.markdown @@ -0,0 +1,8 @@ +--- +layout: regtests +title: "Regtest" +date: 2020-04-05 01:45:00 +0900 +categories: numbers +--- + +a \ No newline at end of file From cdcebabe9e75a0070f606742e2b66fb7102d14b1 Mon Sep 17 00:00:00 2001 From: mireille Date: Fri, 15 May 2020 20:23:38 -0400 Subject: [PATCH 2/2] add page for reg test results --- _layouts/regrtests_results.html | 100 +++++++++++++ _layouts/regtests.html | 39 ----- assets/js/regrtests_results.js | 25 ++++ assets/media.css | 16 ++ assets/style.css | 186 ++++++++++++++++++++---- pages/regression-tests-results.markdown | 6 + pages/test-dashboard.markdown | 8 - 7 files changed, 301 insertions(+), 79 deletions(-) create mode 100644 _layouts/regrtests_results.html delete mode 100644 _layouts/regtests.html create mode 100644 assets/js/regrtests_results.js create mode 100644 pages/regression-tests-results.markdown delete mode 100644 pages/test-dashboard.markdown diff --git a/_layouts/regrtests_results.html b/_layouts/regrtests_results.html new file mode 100644 index 000000000..827656661 --- /dev/null +++ b/_layouts/regrtests_results.html @@ -0,0 +1,100 @@ +--- +layout: default +--- + +
+
+
+ +
+
+
{{ site.title }}
+
{{ page.title }}
+
+
+
+ +
+
Filters
+
+
All
+
Passed
+
Skipped
+
Empty
+
+
+ + +
+
+ {% for test in site.data.regrtests_results.suites %} +
+ {% for result in test %} +
+ + {% if result.module %} +
+ Module: + {{result.module }} +
+ {% endif %} + + {% if result.name %} +
+ Name: + {{result.name }} +
+ {% endif %} + + {% if result.class %} +
+ Class: + {{result.class }} +
+ {% endif %} + +
+ {% for cases in result.cases %} +
+
+ + {% for case in cases %} +
+ + {% if case.method %} +
+ METHOD: + {{case.method }} +
+ {% endif %} + + {% if case.result %} +
+ RESULT: + {{case.result }} +
+ {% endif %} + + {% if case.execution_time %} +
+ EXEC TIME: + {{case.execution_time }} +
+ {% endif %} + +
+ {% endfor %} + +
+
+ {% endfor %} +
+ +
+ {% endfor %} +
+ {% endfor %} +
+
+ + \ No newline at end of file diff --git a/_layouts/regtests.html b/_layouts/regtests.html deleted file mode 100644 index 3fc5c767a..000000000 --- a/_layouts/regtests.html +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: default ---- - - - -
-
- failed, passed, warning -
-
- - -
-
-
- {% for test in site.data.regrtests_results.suites %} - {% for result in test %} - {% if result.name %}
name: {{result.name }}
{% endif %} - {% if result.class %}
class: {{result.class }}
{% endif %} - {% if result.module %}
module: {{result.module }}
{% endif %} - {% if result.description %}
description: {{result.description }}
{% endif %} - {% for cases in result.cases %} -
    - {% for case in cases %} - {% if case.casename %}
  • casename: {{case.casename }}
  • {% endif %} - {% if case.method %}
  • method: {{case.method }}
  • {% endif %} - {% if case.result %}
  • result: {{case.result }}
  • {% endif %} - {% if case.caseexecutiontime %}
  • caseexecutiontime: {{case.caseexecutiontime }}
  • {% endif %} - {% endfor %} -
- {% endfor %} - {% endfor %} - {% endfor %} -
-
-
- - diff --git a/assets/js/regrtests_results.js b/assets/js/regrtests_results.js new file mode 100644 index 000000000..e10548073 --- /dev/null +++ b/assets/js/regrtests_results.js @@ -0,0 +1,25 @@ +(function () { + + var filter = function () { + // simply blast through the list and update the display + criteria = this.dataset.filter; + document.querySelector(".active").classList.remove("active"); + + this.classList.add("active"); + el = document.querySelectorAll('div[data-status]'); + for (var i = 0; i < el.length; i++) { + if (el[i].dataset.status == criteria || criteria == "all") { + el[i].style.display = "flex" + } else { + el[i].style.display = "none" + } + } + }; + + // attach a click event to each filter and call the filter function + var elements = document.getElementsByClassName("filter"); + for (var i = 0; i < elements.length; i++) { + elements[i].addEventListener('click', filter, false); + } + +})(); \ No newline at end of file diff --git a/assets/media.css b/assets/media.css index ff86a92fa..bf226569a 100644 --- a/assets/media.css +++ b/assets/media.css @@ -23,6 +23,14 @@ font-size: 1em; } + .d-mobile-none { + display: none; + } + + .text-mobile-right { + text-align: right; + } + } @@ -63,7 +71,15 @@ .float-md-right { float: right; } + + .row .cell { + line-height: 30px; + } + .text-md-right { + text-align: right; + } + } /* fixes for ipad */ diff --git a/assets/style.css b/assets/style.css index 103159840..040f7116a 100644 --- a/assets/style.css +++ b/assets/style.css @@ -6,44 +6,68 @@ body { } section { - padding: 2em; + padding: 2em; } a { color: #000; } -p , li { +p, +li { line-height: 1.75em; font-size: 1.1em; } hr { - border: 0px; - border-top: 1px solid #000; + border: 0px; + border-top: 1px solid #000; } hr.dashed { - border: 0px; - border-top: 1px dashed #ccc; + border: 0px; + border-top: 1px dashed #ccc; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: 'Sen', sans-serif; +} + +.font-secondary { + font-family: 'Sen', sans-serif; +} + +.text-small { + font-size: 0.9rem; } -h1, h2, h3, h4, h5, h6 { - font-family: 'Sen', sans-serif; +.text-muted { + color: darkslategray; +} + +.text-uppercase { + text-transform: uppercase; } h1 { - font-size: 1.5em; - margin-top: 2em; + font-size: 1.5em; + margin-top: 2em; } -mark.post-date , mark.highlight { - background-color: #F74C00; - color: #fff; - padding: 5px 15px 5px 15px; +mark.post-date, +mark.highlight { + background-color: #F74C00; + color: #fff; + padding: 5px 15px 5px 15px; } -.code , code { +.code, +code { background-color: #F6F8FA; letter-spacing: 2px; line-height: 1.75em; @@ -75,12 +99,16 @@ mark.post-date , mark.highlight { /* alignment */ -.m-auto{ +.d-flex-space-between { + justify-content: space-between; +} + +.m-auto { margin: auto; } .d-table { - display: table; + display: table; } .text-center { @@ -89,17 +117,21 @@ mark.post-date , mark.highlight { .justify-center { justify-content: center; - align-items: center; + align-items: center; } .float-left { - float: left; + float: left; } /* margins and padding */ +.padding-small { + padding: 5px; +} + .mb-1 { - margin-bottom: 1em; + margin-bottom: 1em; } .mt-1 { @@ -113,8 +145,10 @@ mark.post-date , mark.highlight { .mt-4 { margin-top: 4em; } + + .pl-1 { - padding-left: 1em; + padding-left: 1em; } .pl-2 { @@ -130,7 +164,7 @@ mark.post-date , mark.highlight { } .m-2 { - margin: 2em; + margin: 2em; } .pr-1 { @@ -142,13 +176,13 @@ mark.post-date , mark.highlight { ul.list-inline { list-style: none; display: inline-block; - padding:0; + padding: 0; } .list-unstyled { list-style: none; margin: 0; - padding:0; + padding: 0; } .list-contributors { @@ -164,7 +198,7 @@ ul.list-inline { margin-top: 1em; } -.post-link { +.post-link { font-size: 1.2em; } @@ -173,8 +207,8 @@ ul.list-inline { } .post-date a { - background-color: #000; - color: #fff; + background-color: #000; + color: #fff; } .border { @@ -207,9 +241,97 @@ ul.list-inline { } .blog-intro { - background-color: #F6F8FA; - padding-left: 2em; - padding-right: 2em; - padding-top: 1em; - padding-bottom: 1em; + background-color: #F6F8FA; + padding-left: 2em; + padding-right: 2em; + padding-top: 1em; + padding-bottom: 1em; +} + +/* test results */ + +.results-test { + margin-top: 50px; + color: #fff; + font-size: 1.1rem; + background-color: #F74C00; + word-wrap: anywhere; } + +.results-test-title { + font-family: 'Sen', sans-serif; + font-weight: bold; + text-transform: capitalize; +} + +.results-case-wrapper>div { + padding-left: 10px; + padding-right: 10px; +} + +.results-case { + background-color: white; + border-left: 1px solid #000; + border-right: 1px solid #000; + pointer-events: auto; +} + +.results-case-list-item { + background-color: white; + color: #000; +} + +/* flex table for results */ +.tbl { + display: flex; + flex-direction: column; +} + +.row { + display: flex; +} + +.cell { + flex: 4; + border-bottom: 1px solid lightslategray; + align-self: end; +} + +.cell:nth-child(1) { + flex: 2; +} + +.cell:nth-child(2) { + flex: 2; +} + +.cell:nth-child(3) { + flex: 1; +} + + +.row .cell { + box-sizing: border-box; + padding: 5px; +} + +.passed::after { + content: " 🚀 👌"; + padding: 5px; +} + +.skipped::after { + content: " 🤷‍♀️"; +} + +/* filters */ + +.filter { + cursor: pointer; + padding: 5px; + margin: 5px; +} + +.filter.active { + background-color: #FFD43B; +} \ No newline at end of file diff --git a/pages/regression-tests-results.markdown b/pages/regression-tests-results.markdown new file mode 100644 index 000000000..b20537748 --- /dev/null +++ b/pages/regression-tests-results.markdown @@ -0,0 +1,6 @@ +--- +layout: regrtests_results +title: "Regression test results" +date: 2020-04-05 01:45:00 +0900 +categories: numbers +--- \ No newline at end of file diff --git a/pages/test-dashboard.markdown b/pages/test-dashboard.markdown deleted file mode 100644 index 83583b36a..000000000 --- a/pages/test-dashboard.markdown +++ /dev/null @@ -1,8 +0,0 @@ ---- -layout: regtests -title: "Regtest" -date: 2020-04-05 01:45:00 +0900 -categories: numbers ---- - -a \ No newline at end of file