-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy patharia-at-file.js
113 lines (101 loc) · 4.08 KB
/
aria-at-file.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/// <reference path="./aria-at-csv.js" />
/**
* Data written by scripts as json or used to render another format like HTML.
* @namespace AriaATFile
*/
/**
* @typedef AriaATFile.AT
* @property {string} name
* @property {string} key
*/
/**
* @typedef AriaATFile.Support
* @property {object[]} ats
* @property {string} ats[].name
* @property {string} ats[].key
* @property {object} applies_to
* @property {string[]} applies_to.system
* @property {object[]} examples
* @property {string} examples[].directory
* @property {string} examples[].name
*/
/**
* 1 or 2 member tuples of strings.
* @typedef {string[]} AriaATFile.CommandExtraInstructionTuple
*/
/**
* @typedef {Object<string, AriaATFile.CommandExtraInstructionTuple[]>} AriaATFile.CommandTuplesATLookup
*/
/**
* @typedef {Object<string, AriaATFile.CommandTuplesATLookup>} AriaATFile.CommandTuplesATModeLookup
*/
/**
* An object with keys that have sentence-long descriptions of their value.
* @typedef {Object<string, AriaATFile.CommandTuplesATModeLookup>} AriaATFile.CommandTuplesATModeTaskLookup
*/
/**
* @typedef {number | string} AriaATFile.StringNumber
*/
/** @typedef {"reading" | "interaction"} AriaATFile.ATMode */
/**
* @typedef AriaATFile.Behavior
* @property {string} setup_script_description
* @property {string} setupTestPage
* @property {string} assertionResponseQuestion
* @property {string[]} applies_to
* @property {AriaATFile.ATMode | AriaATFile.ATMode[]} mode
* @property {string} task
* @property {string} specific_user_instruction
* @property {string[][]} [output_assertions]
* @property {Object<string, AriaATFile.StringNumber[][]>} [additional_assertions]
* @property {Object<string, AriaATCSV.AssertionCommandInfo[]>} commandsInfo
*/
/**
* All the data collected into one file needed to run a test.
* @typedef AriaATFile.CollectedTest
* @property {object} info
* @property {number} info.testId
* @property {string} info.title
* @property {string} info.task
* @property {string} [info.presentationNumber]
* @property {object[]} info.references
* @property {string} info.references[].refId
* @property {string} info.references[].value
* @property {object} instructions
* @property {string[]} instructions.user
* @property {string} [instructions.mode]
* @property {string} instructions.raw
* @property {object} target
* @property {object} target.at
* @property {string} target.at.key
* @property {string} target.at.raw original test plan file assistive tech id
* @property {string} target.at.name
* @property {"interaction" | "reading"} target.mode
* @property {string} target.referencePage
* @property {object} [target.setupScript]
* @property {string} target.setupScript.name
* @property {string} target.setupScript.description
* @property {string} target.setupScript.source load with `new Function` if supported
* @property {string} target.setupScript.modulePath load with `import(...)` if supported
* @property {string} target.setupScript.jsonpPath load with `<script src="...">`
* @property {object[]} commands
* @property {string} commands[].id
* @property {string} commands[].keystroke human-readable sequence of key and key chord presses
* @property {object[]} commands[].keypresses
* @property {string} commands[].keypresses[].id
* @property {string} commands[].keypresses[].keystroke single human-readable key or key chord press
* @property {string} [commands[].extraInstruction] human-readable additional instruction to follow
* @property {string} [commands[].settings] this property only exists on v2 tests
* @property {object[]} assertions[]
* @property {1 | 2} assertions[].priority
* @property {string} [assertions[].expectation] assertion statement string, this property only exists on v1 tests
* @property {string} [assertions[].assertionStatement] assertion statement string, this property only exists on v2 tests
*/
/**
* @typedef AriaATFile.TestHTML
* @property {AriaATFile.Behavior} testJson
* @property {AriaATFile.CommandStore} commandsJson
* @property {AriaATCSV.Reference[]} testReferences
* @property {string} referencePage
* @property {AriaATFile.ScriptSource[]} scripts
*/