Skip to content

Commit

Permalink
fix some test run document issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mzgoddard committed Aug 23, 2021
1 parent 36bc1bc commit 08d5c5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions tests/resources/aria-at-harness.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ function renderVirtualTestPage(doc) {
? div(
section(
id("errors"),
style({display: doc.errors ? "block" : "none"}),
style({display: doc.errors.visible ? "block" : "none"}),
h2("Test cannot be performed due to error(s)!"),
ul(...(doc.errors ? doc.errors.map(error => li(error)) : [])),
ul(...(doc.errors.errors ? doc.errors.errors.map(error => li(error)) : [])),
hr()
),
section(id("instructions"), renderVirtualInstructionDocument(doc.instructions)),
Expand Down Expand Up @@ -524,9 +524,9 @@ function renderVirtualResultsTable(results) {
}
}

/** @typedef {import('./aria-at-test-io-format.js').SupportJSON} SupportJSON */
/** @typedef {import('./aria-at-test-io-format.js').CommandsJSON} CommandsJSON */
/** @typedef {import('./aria-at-test-io-format.js').BehaviorJSON} BehaviorJSON */
/** @typedef {import('./aria-at-test-io-format.mjs').SupportJSON} SupportJSON */
/** @typedef {import('./aria-at-test-io-format.mjs').CommandsJSON} CommandsJSON */
/** @typedef {import('./aria-at-test-io-format.mjs').BehaviorJSON} BehaviorJSON */

/** @typedef {import('./aria-at-test-run.mjs').TestRunState} TestRunState */

Expand All @@ -545,5 +545,5 @@ function renderVirtualResultsTable(results) {
/** @typedef {import('./aria-at-test-run.mjs').ResultsTableDocument} ResultsTableDocument */

/**
* @typedef {import('./aria-at-test-io-format.js').TestPageAndResultsDocument} TestPageAndResultsDocument
* @typedef {import('./aria-at-test-io-format.mjs').TestPageAndResultsDocument} TestPageAndResultsDocument
*/
10 changes: 5 additions & 5 deletions tests/resources/aria-at-test-run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function instructionDocument(resultState, hooks) {
return {
errors: {
visible: false,
header: "",
header: "Test cannot be performed due to error(s)!",
errors: [],
},
instructions: {
Expand Down Expand Up @@ -218,9 +218,9 @@ export function instructionDocument(resultState, hooks) {
change: atOutput => hooks.setCommandOutput({commandIndex, atOutput}),
},
assertionsHeader: {
descriptionHeader: "",
passHeader: "",
failHeader: "",
descriptionHeader: "Assertion",
passHeader: "Success case",
failHeader: "Failure cases",
},
assertions: [
...assertions.map(bind(assertionResult, commandIndex)),
Expand Down Expand Up @@ -363,7 +363,7 @@ export function instructionDocument(resultState, hooks) {
},
],
click: () =>
hooks.setCommandAssertion({commandIndex, assertionIndex, result: AssertionResultMap.FAIL_MISSING}),
hooks.setCommandAssertion({commandIndex, assertionIndex, result: AssertionResultMap.FAIL_INCORRECT}),
}),
],
});
Expand Down

0 comments on commit 08d5c5f

Please sign in to comment.