@@ -259,6 +259,10 @@ h4 {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-bottom: 1px dashed var(--brd-color);
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
$bgcolor: var(--tt-color);
|
||||
$fgcolor: var(--fg-color);
|
||||
|
||||
@@ -9,7 +9,7 @@ const styles = {
|
||||
none: { icon: "", class: "" }
|
||||
};
|
||||
|
||||
//TODO: probably have to use a more global state for `test`
|
||||
// TODO: probably have to use a more global state for `test`
|
||||
|
||||
export default function runTestScriptWithVariables(script, variables) {
|
||||
let pw = {
|
||||
@@ -51,7 +51,7 @@ function test(descriptor, func, _testReports) {
|
||||
}
|
||||
_testReports.push({ endBlock: true });
|
||||
|
||||
// TODO: Organieze and generate text report of each {descriptor: true} section in testReports.
|
||||
// TODO: Organize and generate text report of each {descriptor: true} section in testReports.
|
||||
// add checkmark or x depending on if each testReport is pass=true or pass=false
|
||||
}
|
||||
|
||||
@@ -113,10 +113,10 @@ class Expectation {
|
||||
);
|
||||
}
|
||||
toBeLevel2xx() {
|
||||
let code = parseInt(this.expectValue);
|
||||
const code = parseInt(this.expectValue);
|
||||
if (Number.isNaN(code)) {
|
||||
return this._fail(
|
||||
`Expecteded 200-level status but could not parse value ${this.expectValue}`
|
||||
`Expected 200-level status but could not parse value ${this.expectValue}`
|
||||
);
|
||||
}
|
||||
return this._satisfies(code >= 200 && code < 300)
|
||||
@@ -128,7 +128,7 @@ class Expectation {
|
||||
);
|
||||
}
|
||||
toBeLevel3xx() {
|
||||
let code = parseInt(this.expectValue);
|
||||
const code = parseInt(this.expectValue);
|
||||
if (Number.isNaN(code)) {
|
||||
return this._fail(
|
||||
`Expected 300-level status but could not parse value ${this.expectValue}`
|
||||
@@ -143,7 +143,7 @@ class Expectation {
|
||||
);
|
||||
}
|
||||
toBeLevel4xx() {
|
||||
let code = parseInt(this.expectValue);
|
||||
const code = parseInt(this.expectValue);
|
||||
if (Number.isNaN(code)) {
|
||||
return this._fail(
|
||||
`Expected 400-level status but could not parse value ${this.expectValue}`
|
||||
@@ -158,10 +158,10 @@ class Expectation {
|
||||
);
|
||||
}
|
||||
toBeLevel5xx() {
|
||||
let code = parseInt(this.expectValue);
|
||||
const code = parseInt(this.expectValue);
|
||||
if (Number.isNaN(code)) {
|
||||
return this._fail(
|
||||
`Expected 200-level status but could not parse value ${this.expectValue}`
|
||||
`Expected 500-level status but could not parse value ${this.expectValue}`
|
||||
);
|
||||
}
|
||||
return this._satisfies(code >= 500 && code < 600)
|
||||
|
||||
@@ -381,23 +381,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="testReport in testReports">
|
||||
<div v-if="testReport.result" class="flex-wrap">
|
||||
<span :class="testReport.styles.class" class="info">
|
||||
<div v-if="testReport.startBlock" class="info">
|
||||
<h4>{{ testReport.startBlock }}</h4>
|
||||
</div>
|
||||
<p v-else-if="testReport.result" class="flex-wrap info">
|
||||
<span :class="testReport.styles.class">
|
||||
<i class="material-icons">
|
||||
{{ testReport.styles.icon }}
|
||||
</i>
|
||||
<span> {{ testReport.result }}</span>
|
||||
<span v-if="testReport.message">
|
||||
<label> • {{ testReport.message }}</label>
|
||||
</span>
|
||||
</span>
|
||||
<ul v-if="testReport.message">
|
||||
<li>
|
||||
<label>{{ testReport.message }}</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else-if="testReport.startBlock" class="info">
|
||||
<h4>{{ testReport.startBlock }}</h4>
|
||||
</div>
|
||||
<div v-else-if="testReport.endBlock"><br /></div>
|
||||
</p>
|
||||
<div v-else-if="testReport.endBlock"><hr /></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user