From 08d5c5f8a2d14804e9d15d1b9f9abae9584e380e Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Mon, 23 Aug 2021 11:04:27 -0400 Subject: [PATCH] fix some test run document issues --- tests/resources/aria-at-harness.mjs | 12 ++++++------ tests/resources/aria-at-test-run.mjs | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/resources/aria-at-harness.mjs b/tests/resources/aria-at-harness.mjs index 0d8ccfa23..eeb6c6e9e 100644 --- a/tests/resources/aria-at-harness.mjs +++ b/tests/resources/aria-at-harness.mjs @@ -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)), @@ -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 */ @@ -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 */ diff --git a/tests/resources/aria-at-test-run.mjs b/tests/resources/aria-at-test-run.mjs index b58435988..855e8995e 100644 --- a/tests/resources/aria-at-test-run.mjs +++ b/tests/resources/aria-at-test-run.mjs @@ -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: { @@ -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)), @@ -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}), }), ], });