Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Fix indentation issue in Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nmcc1212 committed Apr 11, 2024
1 parent cde5c3a commit 92d1507
Show file tree
Hide file tree
Showing 2 changed files with 262 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pipeline {
dir ('next/news-aggregation') {
sh 'npm test'
}
}
}
post {
always {
archiveArtifacts artifacts: 'next/news-aggregation/__tests__/coverage/lcov-report/**', allowEmptyArchive: true
Expand Down
260 changes: 260 additions & 0 deletions next/news-aggregation/test-report.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
<html><head><meta charset="utf-8"/><title>Nial's Amazing Test Report</title><style type="text/css">html,
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 1rem;
margin: 0;
padding: 0;
color: #333;
}
body {
padding: 2rem 1rem;
font-size: 0.85rem;
}
.jesthtml-content {
margin: 0 auto;
max-width: 70rem;
}
header {
display: flex;
align-items: center;
}
#title {
margin: 0;
flex-grow: 1;
}
#logo {
height: 4rem;
}
#timestamp {
color: #777;
margin-top: 0.5rem;
}

/** SUMMARY */
#summary {
color: #333;
margin: 2rem 0;
display: flex;
font-family: monospace;
font-size: 1rem;
}
#summary > div {
margin-right: 2rem;
background: #eee;
padding: 1rem;
min-width: 15rem;
}
#summary > div:last-child {
margin-right: 0;
}
@media only screen and (max-width: 720px) {
#summary {
flex-direction: column;
}
#summary > div {
margin-right: 0;
margin-top: 2rem;
}
#summary > div:first-child {
margin-top: 0;
}
}

.summary-total {
font-weight: bold;
margin-bottom: 0.5rem;
}
.summary-passed {
color: #4f8a10;
border-left: 0.4rem solid #4f8a10;
padding-left: 0.5rem;
}
.summary-failed,
.summary-obsolete-snapshots {
color: #d8000c;
border-left: 0.4rem solid #d8000c;
padding-left: 0.5rem;
}
.summary-pending {
color: #9f6000;
border-left: 0.4rem solid #9f6000;
padding-left: 0.5rem;
}
.summary-empty {
color: #999;
border-left: 0.4rem solid #999;
}

.test-result {
padding: 1rem;
margin-bottom: 0.25rem;
}
.test-result:last-child {
border: 0;
}
.test-result.passed {
background-color: #dff2bf;
color: #4f8a10;
}
.test-result.failed {
background-color: #ffbaba;
color: #d8000c;
}
.test-result.pending {
background-color: #ffdf61;
color: #9f6000;
}

.test-info {
display: flex;
justify-content: space-between;
}
.test-suitename {
width: 20%;
text-align: left;
font-weight: bold;
word-break: break-word;
}
.test-title {
width: 40%;
text-align: left;
font-style: italic;
}
.test-status {
width: 20%;
text-align: right;
}
.test-duration {
width: 10%;
text-align: right;
font-size: 0.75rem;
}

.failureMessages {
padding: 0 1rem;
margin-top: 1rem;
border-top: 1px dashed #d8000c;
}
.failureMessages.suiteFailure {
border-top: none;
}
.failureMsg {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}

.suite-container {
margin-bottom: 2rem;
}
.suite-container > input[type="checkbox"] {
position: absolute;
left: -100vw;
}
.suite-container label {
display: block;
}
.suite-container .suite-tests {
overflow-y: hidden;
height: 0;
}
.suite-container > input[type="checkbox"]:checked ~ .suite-tests {
height: auto;
overflow: visible;
}
.suite-info {
padding: 1rem;
background-color: #eee;
color: #777;
display: flex;
align-items: center;
margin-bottom: 0.25rem;
}
.suite-info:hover {
background-color: #ddd;
cursor: pointer;
}
.suite-info .suite-path {
word-break: break-all;
flex-grow: 1;
font-family: monospace;
font-size: 1rem;
}
.suite-info .suite-time {
margin-left: 0.5rem;
padding: 0.2rem 0.3rem;
font-size: 0.75rem;
}
.suite-info .suite-time.warn {
background-color: #d8000c;
color: #fff;
}
.suite-info:before {
content: "\2303";
display: inline-block;
margin-right: 0.5rem;
transform: rotate(0deg);
}
.suite-container > input[type="checkbox"]:checked ~ label .suite-info:before {
transform: rotate(180deg);
}

/* CONSOLE LOGS */
.suite-consolelog {
margin-bottom: 0.25rem;
padding: 1rem;
background-color: #efefef;
}
.suite-consolelog-header {
font-weight: bold;
}
.suite-consolelog-item {
padding: 0.5rem;
}
.suite-consolelog-item pre {
margin: 0.5rem 0;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-consolelog-item-origin {
color: #777;
font-weight: bold;
}
.suite-consolelog-item-message {
color: #000;
font-size: 1rem;
padding: 0 0.5rem;
}

/* OBSOLETE SNAPSHOTS */
.suite-obsolete-snapshots {
margin-bottom: 0.25rem;
padding: 1rem;
background-color: #ffbaba;
color: #d8000c;
}
.suite-obsolete-snapshots-header {
font-weight: bold;
}
.suite-obsolete-snapshots-item {
padding: 0.5rem;
}
.suite-obsolete-snapshots-item pre {
margin: 0.5rem 0;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-obsolete-snapshots-item-message {
color: #000;
font-size: 1rem;
padding: 0 0.5rem;
}
</style></head><body><div class="jesthtml-content"><header><h1 id="title">Nial's Amazing Test Report</h1></header><div id="metadata-container"><div id="timestamp">Started: 2024-04-11 15:38:16</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (3)</div><div class="summary-passed ">3 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (9)</div><div class="summary-passed ">9 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><input id="collapsible-0" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-0"><div class="suite-info"><div class="suite-path">/Users/nial/TSI/next/news-aggregation/test/test_navBar.test.js</div><div class="suite-time">3.468s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">NavBar component</div><div class="test-title">renders the navbar</div><div class="test-status">passed</div><div class="test-duration">0.024s</div></div></div></div></div><div id="suite-2" class="suite-container"><input id="collapsible-1" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-1"><div class="suite-info"><div class="suite-path">/Users/nial/TSI/next/news-aggregation/test/test_newsList.test.js</div><div class="suite-time">3.546s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">NewsList</div><div class="test-title">renders loading state initially</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">NewsList</div><div class="test-title">renders news items after data fetching</div><div class="test-status">passed</div><div class="test-duration">0.086s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">NewsList</div><div class="test-title">should console.error on failed axios request</div><div class="test-status">passed</div><div class="test-duration">0.008s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">NewsList</div><div class="test-title">should filter news items by search query</div><div class="test-status">passed</div><div class="test-duration">0.007s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">NewsList</div><div class="test-title">should set treding words to commoun words</div><div class="test-status">passed</div><div class="test-duration">0.013s</div></div></div></div></div><div id="suite-3" class="suite-container"><input id="collapsible-2" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-2"><div class="suite-info"><div class="suite-path">/Users/nial/TSI/next/news-aggregation/test/test_app.test.js</div><div class="suite-time">3.932s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">App component</div><div class="test-title">renders App component</div><div class="test-status">passed</div><div class="test-duration">0.033s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">App component</div><div class="test-title">navigates to Ukraine News when the route is changed</div><div class="test-status">passed</div><div class="test-duration">0.074s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">App component</div><div class="test-title">navigates to World News when the route is changed</div><div class="test-status">passed</div><div class="test-duration">0.044s</div></div></div></div></div></div></body></html>

0 comments on commit 92d1507

Please sign in to comment.