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