@citolab/qti-components 7.17.0 → 7.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +629 -278
- package/custom-elements.json +139 -1950
- package/dist/base.d.ts +11 -11
- package/dist/base.js +1 -1
- package/dist/{chunk-VEV4DGPH.js → chunk-3OCDS5FG.js} +2 -2
- package/dist/{chunk-C2HQFI2C.js → chunk-5D7GD3JS.js} +763 -481
- package/dist/chunk-5D7GD3JS.js.map +1 -0
- package/dist/{chunk-W4SQRNWO.js → chunk-5J5P5GJY.js} +4 -8
- package/dist/{chunk-W4SQRNWO.js.map → chunk-5J5P5GJY.js.map} +1 -1
- package/dist/{chunk-RI47B4ZT.js → chunk-DO3QY5GP.js} +2 -2
- package/dist/{chunk-DWIRLYDS.js → chunk-FOWDOLXY.js} +2 -2
- package/dist/{chunk-INKI27D5.js → chunk-GMNH42S6.js} +27 -36
- package/dist/chunk-GMNH42S6.js.map +1 -0
- package/dist/{chunk-2DOYPVF5.js → chunk-HRVIMT5Y.js} +4 -4
- package/dist/{chunk-O4XIWHTF.js → chunk-IDW2ETV2.js} +27 -12
- package/dist/chunk-IDW2ETV2.js.map +1 -0
- package/dist/{chunk-F44CI35W.js → chunk-L4TXKTUA.js} +2 -2
- package/dist/{chunk-JEUY3MYB.js → chunk-VUSGFL4B.js} +21 -17
- package/dist/chunk-VUSGFL4B.js.map +1 -0
- package/dist/{chunk-352OTVTY.js → chunk-YAPCC4BO.js} +37 -25
- package/dist/chunk-YAPCC4BO.js.map +1 -0
- package/dist/{computed-item.context-CiddHLPz.d.ts → computed-item.context-DfsW_96S.d.ts} +1 -1
- package/dist/{computed.context-CH09_LCR.d.ts → computed.context-DHbxad0N.d.ts} +2 -2
- package/dist/{config.context-DAdkDDf5.d.ts → config.context-DUz2-kxN.d.ts} +1 -1
- package/dist/elements.d.ts +5 -3
- package/dist/elements.js +4 -4
- package/dist/index.d.ts +10 -10
- package/dist/index.js +11 -11
- package/dist/{interaction-C5Up6-68.d.ts → interaction-BLQjAZqN.d.ts} +4 -4
- package/dist/interactions.d.ts +50 -119
- package/dist/interactions.js +4 -4
- package/dist/{item.context-BRKXBC3m.d.ts → item.context-CkUeDcaO.d.ts} +6 -1
- package/dist/item.css +1 -5
- package/dist/item.d.ts +3 -3
- package/dist/item.js +5 -5
- package/dist/loader.d.ts +3 -3
- package/dist/loader.js +2 -2
- package/dist/processing.d.ts +4 -4
- package/dist/processing.js +2 -2
- package/dist/qti-components-jsx.d.ts +6448 -2802
- package/dist/{qti-feedback-B4cMzOcq.d.ts → qti-feedback-BNXgxua1.d.ts} +2 -2
- package/dist/{qti-rule-base-dL4opfvi.d.ts → qti-rule-base-BZSb0WTW.d.ts} +4 -4
- package/dist/{qti-transform-test-Bz9A3hmD.d.ts → qti-transform-test-C2fL4PtU.d.ts} +1 -1
- package/dist/{test.context-Bpw1HNAZ.d.ts → test.context-Oc_8ovbV.d.ts} +3 -3
- package/dist/test.d.ts +28 -28
- package/dist/test.js +7 -7
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +1 -1
- package/dist/{variables-CusMRnyJ.d.ts → variables-CMYcDbyW.d.ts} +2 -1
- package/package.json +9 -9
- package/dist/chunk-352OTVTY.js.map +0 -1
- package/dist/chunk-C2HQFI2C.js.map +0 -1
- package/dist/chunk-INKI27D5.js.map +0 -1
- package/dist/chunk-JEUY3MYB.js.map +0 -1
- package/dist/chunk-O4XIWHTF.js.map +0 -1
- package/dist/vscode.css-custom-data.json +0 -11
- package/dist/vscode.html-custom-data.json +0 -960
- /package/dist/{chunk-VEV4DGPH.js.map → chunk-3OCDS5FG.js.map} +0 -0
- /package/dist/{chunk-RI47B4ZT.js.map → chunk-DO3QY5GP.js.map} +0 -0
- /package/dist/{chunk-DWIRLYDS.js.map → chunk-FOWDOLXY.js.map} +0 -0
- /package/dist/{chunk-2DOYPVF5.js.map → chunk-HRVIMT5Y.js.map} +0 -0
- /package/dist/{chunk-F44CI35W.js.map → chunk-L4TXKTUA.js.map} +0 -0
package/custom-elements.json
CHANGED
|
@@ -347,6 +347,14 @@
|
|
|
347
347
|
"text": "showCorrectResponse(show: boolean) => void"
|
|
348
348
|
}
|
|
349
349
|
},
|
|
350
|
+
{
|
|
351
|
+
"kind": "field",
|
|
352
|
+
"name": "state",
|
|
353
|
+
"type": {
|
|
354
|
+
"text": "ItemContext['state']"
|
|
355
|
+
},
|
|
356
|
+
"privacy": "public"
|
|
357
|
+
},
|
|
350
358
|
{
|
|
351
359
|
"kind": "field",
|
|
352
360
|
"name": "timeDependent",
|
|
@@ -2099,9 +2107,18 @@
|
|
|
2099
2107
|
"declarations": [
|
|
2100
2108
|
{
|
|
2101
2109
|
"kind": "class",
|
|
2102
|
-
"description": "",
|
|
2110
|
+
"description": "QTI Custom Interaction component for legacy CES-based interactions.\n\nThis component implements support for custom interactions originally built for the CES\n(Custom Element Standard) player - the predecessor to FACET and the Trifork QTI Player.",
|
|
2103
2111
|
"name": "QtiCustomInteraction",
|
|
2104
2112
|
"members": [
|
|
2113
|
+
{
|
|
2114
|
+
"kind": "field",
|
|
2115
|
+
"name": "_contentBlobUrl",
|
|
2116
|
+
"type": {
|
|
2117
|
+
"text": "string"
|
|
2118
|
+
},
|
|
2119
|
+
"privacy": "private",
|
|
2120
|
+
"default": "null"
|
|
2121
|
+
},
|
|
2105
2122
|
{
|
|
2106
2123
|
"kind": "field",
|
|
2107
2124
|
"name": "_errorMessage",
|
|
@@ -2111,6 +2128,24 @@
|
|
|
2111
2128
|
"privacy": "private",
|
|
2112
2129
|
"default": "null"
|
|
2113
2130
|
},
|
|
2131
|
+
{
|
|
2132
|
+
"kind": "field",
|
|
2133
|
+
"name": "_manifestUrl",
|
|
2134
|
+
"type": {
|
|
2135
|
+
"text": "string"
|
|
2136
|
+
},
|
|
2137
|
+
"privacy": "private",
|
|
2138
|
+
"default": "null"
|
|
2139
|
+
},
|
|
2140
|
+
{
|
|
2141
|
+
"kind": "field",
|
|
2142
|
+
"name": "_resourceBaseUrl",
|
|
2143
|
+
"type": {
|
|
2144
|
+
"text": "string"
|
|
2145
|
+
},
|
|
2146
|
+
"privacy": "private",
|
|
2147
|
+
"default": "null"
|
|
2148
|
+
},
|
|
2114
2149
|
{
|
|
2115
2150
|
"kind": "field",
|
|
2116
2151
|
"name": "baseItemUrl",
|
|
@@ -2135,6 +2170,16 @@
|
|
|
2135
2170
|
},
|
|
2136
2171
|
"attribute": "data"
|
|
2137
2172
|
},
|
|
2173
|
+
{
|
|
2174
|
+
"kind": "method",
|
|
2175
|
+
"name": "getBaseCandidates",
|
|
2176
|
+
"privacy": "private",
|
|
2177
|
+
"return": {
|
|
2178
|
+
"type": {
|
|
2179
|
+
"text": "string[]"
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2138
2183
|
{
|
|
2139
2184
|
"kind": "method",
|
|
2140
2185
|
"name": "getIFrames",
|
|
@@ -2160,6 +2205,26 @@
|
|
|
2160
2205
|
}
|
|
2161
2206
|
]
|
|
2162
2207
|
},
|
|
2208
|
+
{
|
|
2209
|
+
"kind": "method",
|
|
2210
|
+
"name": "getManifestBaseUrl",
|
|
2211
|
+
"privacy": "private",
|
|
2212
|
+
"return": {
|
|
2213
|
+
"type": {
|
|
2214
|
+
"text": "string | null"
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
"kind": "method",
|
|
2220
|
+
"name": "getManifestParentBaseUrl",
|
|
2221
|
+
"privacy": "private",
|
|
2222
|
+
"return": {
|
|
2223
|
+
"type": {
|
|
2224
|
+
"text": "string | null"
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
},
|
|
2163
2228
|
{
|
|
2164
2229
|
"kind": "method",
|
|
2165
2230
|
"name": "handlePostMessage",
|
|
@@ -2218,6 +2283,37 @@
|
|
|
2218
2283
|
"privacy": "private",
|
|
2219
2284
|
"default": "''"
|
|
2220
2285
|
},
|
|
2286
|
+
{
|
|
2287
|
+
"kind": "method",
|
|
2288
|
+
"name": "resolveResourceWithFallback",
|
|
2289
|
+
"privacy": "private",
|
|
2290
|
+
"return": {
|
|
2291
|
+
"type": {
|
|
2292
|
+
"text": "Promise<{ url: string; baseUrl: string | null; text?: string }>"
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2295
|
+
"parameters": [
|
|
2296
|
+
{
|
|
2297
|
+
"name": "ref",
|
|
2298
|
+
"type": {
|
|
2299
|
+
"text": "string"
|
|
2300
|
+
}
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
"name": "baseCandidates",
|
|
2304
|
+
"type": {
|
|
2305
|
+
"text": "string[]"
|
|
2306
|
+
}
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
"name": "options",
|
|
2310
|
+
"default": "{}",
|
|
2311
|
+
"type": {
|
|
2312
|
+
"text": "{ returnText?: boolean }"
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
]
|
|
2316
|
+
},
|
|
2221
2317
|
{
|
|
2222
2318
|
"kind": "field",
|
|
2223
2319
|
"name": "response",
|
|
@@ -2228,6 +2324,7 @@
|
|
|
2228
2324
|
{
|
|
2229
2325
|
"kind": "method",
|
|
2230
2326
|
"name": "setupCES",
|
|
2327
|
+
"description": "Sets up the CES custom interaction by creating the iframe structure and\nhandling the CES API communication via postMessage.\n\nFor interactions that use CES, this method:\n1. Fetches the original bootstrap.js and checks if it uses CES\n2. If CES is used, fetches index.html and injects the registerCES proxy\n3. Creates a blob URL for the modified HTML (stored in _contentBlobUrl)\n4. Replaces bootstrap.js with ciBootstrap that loads the blob URL\n5. Sets up postMessage listeners for CES API calls",
|
|
2231
2328
|
"type": {
|
|
2232
2329
|
"text": "setupCES() => void"
|
|
2233
2330
|
}
|
|
@@ -3866,12 +3963,6 @@
|
|
|
3866
3963
|
"declarations": [],
|
|
3867
3964
|
"exports": []
|
|
3868
3965
|
},
|
|
3869
|
-
{
|
|
3870
|
-
"kind": "javascript-module",
|
|
3871
|
-
"path": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction-iframe.ts",
|
|
3872
|
-
"declarations": [],
|
|
3873
|
-
"exports": []
|
|
3874
|
-
},
|
|
3875
3966
|
{
|
|
3876
3967
|
"kind": "javascript-module",
|
|
3877
3968
|
"path": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts",
|
|
@@ -3901,8 +3992,12 @@
|
|
|
3901
3992
|
},
|
|
3902
3993
|
{
|
|
3903
3994
|
"kind": "field",
|
|
3904
|
-
"name": "
|
|
3905
|
-
"
|
|
3995
|
+
"name": "_iframeMessageOrigin",
|
|
3996
|
+
"type": {
|
|
3997
|
+
"text": "string | null"
|
|
3998
|
+
},
|
|
3999
|
+
"privacy": "protected",
|
|
4000
|
+
"default": "null"
|
|
3906
4001
|
},
|
|
3907
4002
|
{
|
|
3908
4003
|
"kind": "field",
|
|
@@ -3940,15 +4035,6 @@
|
|
|
3940
4035
|
"privacy": "private",
|
|
3941
4036
|
"default": "null"
|
|
3942
4037
|
},
|
|
3943
|
-
{
|
|
3944
|
-
"kind": "field",
|
|
3945
|
-
"name": "_responseCheckInterval",
|
|
3946
|
-
"type": {
|
|
3947
|
-
"text": "number | null"
|
|
3948
|
-
},
|
|
3949
|
-
"privacy": "private",
|
|
3950
|
-
"default": "null"
|
|
3951
|
-
},
|
|
3952
4038
|
{
|
|
3953
4039
|
"kind": "field",
|
|
3954
4040
|
"name": "_value",
|
|
@@ -3998,34 +4084,6 @@
|
|
|
3998
4084
|
"text": "Record<string, QtiVariableJSON>"
|
|
3999
4085
|
}
|
|
4000
4086
|
},
|
|
4001
|
-
{
|
|
4002
|
-
"kind": "method",
|
|
4003
|
-
"name": "buildRequireConfig",
|
|
4004
|
-
"description": "DIRECT MODE: Build RequireJS configuration",
|
|
4005
|
-
"type": {
|
|
4006
|
-
"text": "buildRequireConfig() => void"
|
|
4007
|
-
}
|
|
4008
|
-
},
|
|
4009
|
-
{
|
|
4010
|
-
"kind": "method",
|
|
4011
|
-
"name": "combineRequireResolvePaths",
|
|
4012
|
-
"privacy": "private",
|
|
4013
|
-
"parameters": [
|
|
4014
|
-
{
|
|
4015
|
-
"name": "path1",
|
|
4016
|
-
"type": {
|
|
4017
|
-
"text": "string | string[]"
|
|
4018
|
-
}
|
|
4019
|
-
},
|
|
4020
|
-
{
|
|
4021
|
-
"name": "path2",
|
|
4022
|
-
"type": {
|
|
4023
|
-
"text": "string | string[]"
|
|
4024
|
-
}
|
|
4025
|
-
}
|
|
4026
|
-
],
|
|
4027
|
-
"description": "DIRECT MODE: Helper method to combine require paths"
|
|
4028
|
-
},
|
|
4029
4087
|
{
|
|
4030
4088
|
"kind": "field",
|
|
4031
4089
|
"name": "context",
|
|
@@ -4076,14 +4134,6 @@
|
|
|
4076
4134
|
"text": "disable() => void"
|
|
4077
4135
|
}
|
|
4078
4136
|
},
|
|
4079
|
-
{
|
|
4080
|
-
"kind": "field",
|
|
4081
|
-
"name": "dom",
|
|
4082
|
-
"type": {
|
|
4083
|
-
"text": "HTMLElement"
|
|
4084
|
-
},
|
|
4085
|
-
"privacy": "private"
|
|
4086
|
-
},
|
|
4087
4137
|
{
|
|
4088
4138
|
"kind": "method",
|
|
4089
4139
|
"name": "enable",
|
|
@@ -4176,16 +4226,6 @@
|
|
|
4176
4226
|
},
|
|
4177
4227
|
"description": "Parse the require shim JSON string into an object"
|
|
4178
4228
|
},
|
|
4179
|
-
{
|
|
4180
|
-
"kind": "field",
|
|
4181
|
-
"name": "getResolvablePath",
|
|
4182
|
-
"description": "DIRECT MODE: Helper method to get resolvable path"
|
|
4183
|
-
},
|
|
4184
|
-
{
|
|
4185
|
-
"kind": "field",
|
|
4186
|
-
"name": "getResolvablePathString",
|
|
4187
|
-
"description": "DIRECT MODE: Helper method to get resolvable path string"
|
|
4188
|
-
},
|
|
4189
4229
|
{
|
|
4190
4230
|
"kind": "field",
|
|
4191
4231
|
"name": "handleIframeMessage",
|
|
@@ -4206,11 +4246,6 @@
|
|
|
4206
4246
|
"privacy": "private",
|
|
4207
4247
|
"description": "IFRAME MODE: Initialize the interaction"
|
|
4208
4248
|
},
|
|
4209
|
-
{
|
|
4210
|
-
"kind": "field",
|
|
4211
|
-
"name": "loadConfig",
|
|
4212
|
-
"description": "DIRECT MODE: Load config from URL"
|
|
4213
|
-
},
|
|
4214
4249
|
{
|
|
4215
4250
|
"kind": "field",
|
|
4216
4251
|
"name": "module",
|
|
@@ -4219,50 +4254,12 @@
|
|
|
4219
4254
|
},
|
|
4220
4255
|
"attribute": "module"
|
|
4221
4256
|
},
|
|
4222
|
-
{
|
|
4223
|
-
"kind": "field",
|
|
4224
|
-
"name": "pci",
|
|
4225
|
-
"type": {
|
|
4226
|
-
"text": "IMSpci<ConfigProperties<unknown>>"
|
|
4227
|
-
},
|
|
4228
|
-
"privacy": "private"
|
|
4229
|
-
},
|
|
4230
4257
|
{
|
|
4231
4258
|
"kind": "method",
|
|
4232
4259
|
"name": "processPendingMessages",
|
|
4233
4260
|
"privacy": "private",
|
|
4234
4261
|
"description": "IFRAME MODE: Process pending messages"
|
|
4235
4262
|
},
|
|
4236
|
-
{
|
|
4237
|
-
"kind": "method",
|
|
4238
|
-
"name": "register",
|
|
4239
|
-
"parameters": [
|
|
4240
|
-
{
|
|
4241
|
-
"name": "pci",
|
|
4242
|
-
"type": {
|
|
4243
|
-
"text": "IMSpci<ConfigProperties<unknown>>"
|
|
4244
|
-
}
|
|
4245
|
-
}
|
|
4246
|
-
],
|
|
4247
|
-
"description": "DIRECT MODE: Register PCI instance",
|
|
4248
|
-
"type": {
|
|
4249
|
-
"text": "register(pci: IMSpci<ConfigProperties<unknown>>) => void"
|
|
4250
|
-
}
|
|
4251
|
-
},
|
|
4252
|
-
{
|
|
4253
|
-
"kind": "method",
|
|
4254
|
-
"name": "removeDoubleSlashes",
|
|
4255
|
-
"privacy": "private",
|
|
4256
|
-
"parameters": [
|
|
4257
|
-
{
|
|
4258
|
-
"name": "str",
|
|
4259
|
-
"type": {
|
|
4260
|
-
"text": "string"
|
|
4261
|
-
}
|
|
4262
|
-
}
|
|
4263
|
-
],
|
|
4264
|
-
"description": "DIRECT MODE: Helper method to remove double slashes"
|
|
4265
|
-
},
|
|
4266
4263
|
{
|
|
4267
4264
|
"kind": "field",
|
|
4268
4265
|
"name": "requireJsUrl",
|
|
@@ -4294,9 +4291,9 @@
|
|
|
4294
4291
|
"kind": "field",
|
|
4295
4292
|
"name": "response",
|
|
4296
4293
|
"type": {
|
|
4297
|
-
"text": "string | string[]"
|
|
4294
|
+
"text": "string | string[] | null"
|
|
4298
4295
|
},
|
|
4299
|
-
"default": "
|
|
4296
|
+
"default": "null"
|
|
4300
4297
|
},
|
|
4301
4298
|
{
|
|
4302
4299
|
"kind": "method",
|
|
@@ -4355,17 +4352,6 @@
|
|
|
4355
4352
|
],
|
|
4356
4353
|
"description": "IFRAME MODE: Send message to iframe"
|
|
4357
4354
|
},
|
|
4358
|
-
{
|
|
4359
|
-
"kind": "method",
|
|
4360
|
-
"name": "stopResponseCheck",
|
|
4361
|
-
"privacy": "private",
|
|
4362
|
-
"return": {
|
|
4363
|
-
"type": {
|
|
4364
|
-
"text": "void"
|
|
4365
|
-
}
|
|
4366
|
-
},
|
|
4367
|
-
"description": "Stop checking for response changes"
|
|
4368
|
-
},
|
|
4369
4355
|
{
|
|
4370
4356
|
"kind": "method",
|
|
4371
4357
|
"name": "toggleInternalCorrectResponse",
|
|
@@ -4444,15 +4430,6 @@
|
|
|
4444
4430
|
"default": "false",
|
|
4445
4431
|
"attribute": "data-use-default-shims"
|
|
4446
4432
|
},
|
|
4447
|
-
{
|
|
4448
|
-
"kind": "field",
|
|
4449
|
-
"name": "useIframe",
|
|
4450
|
-
"type": {
|
|
4451
|
-
"text": "boolean"
|
|
4452
|
-
},
|
|
4453
|
-
"default": "false",
|
|
4454
|
-
"attribute": "data-use-iframe"
|
|
4455
|
-
},
|
|
4456
4433
|
{
|
|
4457
4434
|
"kind": "method",
|
|
4458
4435
|
"name": "validate",
|
|
@@ -4529,14 +4506,6 @@
|
|
|
4529
4506
|
"default": "false",
|
|
4530
4507
|
"fieldName": "useDefaultShims"
|
|
4531
4508
|
},
|
|
4532
|
-
{
|
|
4533
|
-
"name": "data-use-iframe",
|
|
4534
|
-
"type": {
|
|
4535
|
-
"text": "boolean"
|
|
4536
|
-
},
|
|
4537
|
-
"default": "false",
|
|
4538
|
-
"fieldName": "useIframe"
|
|
4539
|
-
},
|
|
4540
4509
|
{
|
|
4541
4510
|
"name": "module",
|
|
4542
4511
|
"type": {
|
|
@@ -4611,8 +4580,12 @@
|
|
|
4611
4580
|
},
|
|
4612
4581
|
{
|
|
4613
4582
|
"kind": "field",
|
|
4614
|
-
"name": "
|
|
4615
|
-
"
|
|
4583
|
+
"name": "_iframeMessageOrigin",
|
|
4584
|
+
"type": {
|
|
4585
|
+
"text": "string | null"
|
|
4586
|
+
},
|
|
4587
|
+
"privacy": "protected",
|
|
4588
|
+
"default": "null",
|
|
4616
4589
|
"inheritedFrom": {
|
|
4617
4590
|
"name": "QtiPortableCustomInteraction",
|
|
4618
4591
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
@@ -4679,19 +4652,6 @@
|
|
|
4679
4652
|
"privacy": "private",
|
|
4680
4653
|
"default": "false"
|
|
4681
4654
|
},
|
|
4682
|
-
{
|
|
4683
|
-
"kind": "field",
|
|
4684
|
-
"name": "_responseCheckInterval",
|
|
4685
|
-
"type": {
|
|
4686
|
-
"text": "number | null"
|
|
4687
|
-
},
|
|
4688
|
-
"privacy": "private",
|
|
4689
|
-
"default": "null",
|
|
4690
|
-
"inheritedFrom": {
|
|
4691
|
-
"name": "QtiPortableCustomInteraction",
|
|
4692
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
4693
|
-
}
|
|
4694
|
-
},
|
|
4695
4655
|
{
|
|
4696
4656
|
"kind": "field",
|
|
4697
4657
|
"name": "_value",
|
|
@@ -4761,42 +4721,6 @@
|
|
|
4761
4721
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
4762
4722
|
}
|
|
4763
4723
|
},
|
|
4764
|
-
{
|
|
4765
|
-
"kind": "method",
|
|
4766
|
-
"name": "buildRequireConfig",
|
|
4767
|
-
"description": "DIRECT MODE: Build RequireJS configuration",
|
|
4768
|
-
"inheritedFrom": {
|
|
4769
|
-
"name": "QtiPortableCustomInteraction",
|
|
4770
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
4771
|
-
},
|
|
4772
|
-
"type": {
|
|
4773
|
-
"text": "buildRequireConfig() => void"
|
|
4774
|
-
}
|
|
4775
|
-
},
|
|
4776
|
-
{
|
|
4777
|
-
"kind": "method",
|
|
4778
|
-
"name": "combineRequireResolvePaths",
|
|
4779
|
-
"privacy": "private",
|
|
4780
|
-
"parameters": [
|
|
4781
|
-
{
|
|
4782
|
-
"name": "path1",
|
|
4783
|
-
"type": {
|
|
4784
|
-
"text": "string | string[]"
|
|
4785
|
-
}
|
|
4786
|
-
},
|
|
4787
|
-
{
|
|
4788
|
-
"name": "path2",
|
|
4789
|
-
"type": {
|
|
4790
|
-
"text": "string | string[]"
|
|
4791
|
-
}
|
|
4792
|
-
}
|
|
4793
|
-
],
|
|
4794
|
-
"description": "DIRECT MODE: Helper method to combine require paths",
|
|
4795
|
-
"inheritedFrom": {
|
|
4796
|
-
"name": "QtiPortableCustomInteraction",
|
|
4797
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
4798
|
-
}
|
|
4799
|
-
},
|
|
4800
4724
|
{
|
|
4801
4725
|
"kind": "field",
|
|
4802
4726
|
"name": "context",
|
|
@@ -4867,18 +4791,6 @@
|
|
|
4867
4791
|
"text": "disable() => void"
|
|
4868
4792
|
}
|
|
4869
4793
|
},
|
|
4870
|
-
{
|
|
4871
|
-
"kind": "field",
|
|
4872
|
-
"name": "dom",
|
|
4873
|
-
"type": {
|
|
4874
|
-
"text": "HTMLElement"
|
|
4875
|
-
},
|
|
4876
|
-
"privacy": "private",
|
|
4877
|
-
"inheritedFrom": {
|
|
4878
|
-
"name": "QtiPortableCustomInteraction",
|
|
4879
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
4880
|
-
}
|
|
4881
|
-
},
|
|
4882
4794
|
{
|
|
4883
4795
|
"kind": "method",
|
|
4884
4796
|
"name": "enable",
|
|
@@ -5022,27 +4934,9 @@
|
|
|
5022
4934
|
},
|
|
5023
4935
|
{
|
|
5024
4936
|
"kind": "field",
|
|
5025
|
-
"name": "
|
|
5026
|
-
"
|
|
5027
|
-
"
|
|
5028
|
-
"name": "QtiPortableCustomInteraction",
|
|
5029
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5030
|
-
}
|
|
5031
|
-
},
|
|
5032
|
-
{
|
|
5033
|
-
"kind": "field",
|
|
5034
|
-
"name": "getResolvablePathString",
|
|
5035
|
-
"description": "DIRECT MODE: Helper method to get resolvable path string",
|
|
5036
|
-
"inheritedFrom": {
|
|
5037
|
-
"name": "QtiPortableCustomInteraction",
|
|
5038
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5039
|
-
}
|
|
5040
|
-
},
|
|
5041
|
-
{
|
|
5042
|
-
"kind": "field",
|
|
5043
|
-
"name": "handleIframeMessage",
|
|
5044
|
-
"privacy": "protected",
|
|
5045
|
-
"description": "IFRAME MODE: Handle iframe messages",
|
|
4937
|
+
"name": "handleIframeMessage",
|
|
4938
|
+
"privacy": "protected",
|
|
4939
|
+
"description": "IFRAME MODE: Handle iframe messages",
|
|
5046
4940
|
"inheritedFrom": {
|
|
5047
4941
|
"name": "QtiPortableCustomInteraction",
|
|
5048
4942
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
@@ -5223,15 +5117,6 @@
|
|
|
5223
5117
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5224
5118
|
}
|
|
5225
5119
|
},
|
|
5226
|
-
{
|
|
5227
|
-
"kind": "field",
|
|
5228
|
-
"name": "loadConfig",
|
|
5229
|
-
"description": "DIRECT MODE: Load config from URL",
|
|
5230
|
-
"inheritedFrom": {
|
|
5231
|
-
"name": "QtiPortableCustomInteraction",
|
|
5232
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5233
|
-
}
|
|
5234
|
-
},
|
|
5235
5120
|
{
|
|
5236
5121
|
"kind": "field",
|
|
5237
5122
|
"name": "module",
|
|
@@ -5244,18 +5129,6 @@
|
|
|
5244
5129
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5245
5130
|
}
|
|
5246
5131
|
},
|
|
5247
|
-
{
|
|
5248
|
-
"kind": "field",
|
|
5249
|
-
"name": "pci",
|
|
5250
|
-
"type": {
|
|
5251
|
-
"text": "IMSpci<ConfigProperties<unknown>>"
|
|
5252
|
-
},
|
|
5253
|
-
"privacy": "private",
|
|
5254
|
-
"inheritedFrom": {
|
|
5255
|
-
"name": "QtiPortableCustomInteraction",
|
|
5256
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5257
|
-
}
|
|
5258
|
-
},
|
|
5259
5132
|
{
|
|
5260
5133
|
"kind": "method",
|
|
5261
5134
|
"name": "processPendingMessages",
|
|
@@ -5280,44 +5153,6 @@
|
|
|
5280
5153
|
"text": "recreateIframe() => void"
|
|
5281
5154
|
}
|
|
5282
5155
|
},
|
|
5283
|
-
{
|
|
5284
|
-
"kind": "method",
|
|
5285
|
-
"name": "register",
|
|
5286
|
-
"parameters": [
|
|
5287
|
-
{
|
|
5288
|
-
"name": "pci",
|
|
5289
|
-
"type": {
|
|
5290
|
-
"text": "IMSpci<ConfigProperties<unknown>>"
|
|
5291
|
-
}
|
|
5292
|
-
}
|
|
5293
|
-
],
|
|
5294
|
-
"description": "DIRECT MODE: Register PCI instance",
|
|
5295
|
-
"inheritedFrom": {
|
|
5296
|
-
"name": "QtiPortableCustomInteraction",
|
|
5297
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5298
|
-
},
|
|
5299
|
-
"type": {
|
|
5300
|
-
"text": "register(pci: IMSpci<ConfigProperties<unknown>>) => void"
|
|
5301
|
-
}
|
|
5302
|
-
},
|
|
5303
|
-
{
|
|
5304
|
-
"kind": "method",
|
|
5305
|
-
"name": "removeDoubleSlashes",
|
|
5306
|
-
"privacy": "private",
|
|
5307
|
-
"parameters": [
|
|
5308
|
-
{
|
|
5309
|
-
"name": "str",
|
|
5310
|
-
"type": {
|
|
5311
|
-
"text": "string"
|
|
5312
|
-
}
|
|
5313
|
-
}
|
|
5314
|
-
],
|
|
5315
|
-
"description": "DIRECT MODE: Helper method to remove double slashes",
|
|
5316
|
-
"inheritedFrom": {
|
|
5317
|
-
"name": "QtiPortableCustomInteraction",
|
|
5318
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5319
|
-
}
|
|
5320
|
-
},
|
|
5321
5156
|
{
|
|
5322
5157
|
"kind": "field",
|
|
5323
5158
|
"name": "requireJsUrl",
|
|
@@ -5361,9 +5196,9 @@
|
|
|
5361
5196
|
"kind": "field",
|
|
5362
5197
|
"name": "response",
|
|
5363
5198
|
"type": {
|
|
5364
|
-
"text": "string | string[]"
|
|
5199
|
+
"text": "string | string[] | null"
|
|
5365
5200
|
},
|
|
5366
|
-
"default": "
|
|
5201
|
+
"default": "null",
|
|
5367
5202
|
"inheritedFrom": {
|
|
5368
5203
|
"name": "QtiPortableCustomInteraction",
|
|
5369
5204
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
@@ -5459,21 +5294,6 @@
|
|
|
5459
5294
|
"text": "setTestContext(newContext: ItemContext) => void"
|
|
5460
5295
|
}
|
|
5461
5296
|
},
|
|
5462
|
-
{
|
|
5463
|
-
"kind": "method",
|
|
5464
|
-
"name": "stopResponseCheck",
|
|
5465
|
-
"privacy": "private",
|
|
5466
|
-
"return": {
|
|
5467
|
-
"type": {
|
|
5468
|
-
"text": "void"
|
|
5469
|
-
}
|
|
5470
|
-
},
|
|
5471
|
-
"description": "Stop checking for response changes",
|
|
5472
|
-
"inheritedFrom": {
|
|
5473
|
-
"name": "QtiPortableCustomInteraction",
|
|
5474
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5475
|
-
}
|
|
5476
|
-
},
|
|
5477
5297
|
{
|
|
5478
5298
|
"kind": "method",
|
|
5479
5299
|
"name": "toggleInternalCorrectResponse",
|
|
@@ -5572,19 +5392,6 @@
|
|
|
5572
5392
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5573
5393
|
}
|
|
5574
5394
|
},
|
|
5575
|
-
{
|
|
5576
|
-
"kind": "field",
|
|
5577
|
-
"name": "useIframe",
|
|
5578
|
-
"type": {
|
|
5579
|
-
"text": "boolean"
|
|
5580
|
-
},
|
|
5581
|
-
"default": "true",
|
|
5582
|
-
"attribute": "data-use-iframe",
|
|
5583
|
-
"inheritedFrom": {
|
|
5584
|
-
"name": "QtiPortableCustomInteraction",
|
|
5585
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5586
|
-
}
|
|
5587
|
-
},
|
|
5588
5395
|
{
|
|
5589
5396
|
"kind": "method",
|
|
5590
5397
|
"name": "validate",
|
|
@@ -5703,18 +5510,6 @@
|
|
|
5703
5510
|
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5704
5511
|
}
|
|
5705
5512
|
},
|
|
5706
|
-
{
|
|
5707
|
-
"name": "data-use-iframe",
|
|
5708
|
-
"type": {
|
|
5709
|
-
"text": "boolean"
|
|
5710
|
-
},
|
|
5711
|
-
"default": "false",
|
|
5712
|
-
"fieldName": "useIframe",
|
|
5713
|
-
"inheritedFrom": {
|
|
5714
|
-
"name": "QtiPortableCustomInteraction",
|
|
5715
|
-
"module": "packages/qti-interactions/src/components/qti-portable-custom-interaction/qti-portable-custom-interaction.ts"
|
|
5716
|
-
}
|
|
5717
|
-
},
|
|
5718
5513
|
{
|
|
5719
5514
|
"name": "module",
|
|
5720
5515
|
"type": {
|
|
@@ -6690,110 +6485,6 @@
|
|
|
6690
6485
|
}
|
|
6691
6486
|
]
|
|
6692
6487
|
},
|
|
6693
|
-
{
|
|
6694
|
-
"kind": "javascript-module",
|
|
6695
|
-
"path": "packages/qti-item/src/components/item-container/item-container.stories.ts",
|
|
6696
|
-
"declarations": [
|
|
6697
|
-
{
|
|
6698
|
-
"kind": "variable",
|
|
6699
|
-
"name": "ItemDoc",
|
|
6700
|
-
"type": {
|
|
6701
|
-
"text": "Story"
|
|
6702
|
-
},
|
|
6703
|
-
"default": "{ render: (_, { loaded: { itemDoc } }) => { return html` <qti-item> <item-container .itemDoc=${itemDoc}></item-container> </qti-item> `; }, loaders: [ async ({ args }) => { const itemDoc = qtiTransformItem() .load(args['item-url']) .then(api => api.htmlDoc()); return { itemDoc }; } ], play: ItemURL.play, tags: ['!autodocs'] }"
|
|
6704
|
-
},
|
|
6705
|
-
{
|
|
6706
|
-
"kind": "variable",
|
|
6707
|
-
"name": "ItemURL",
|
|
6708
|
-
"type": {
|
|
6709
|
-
"text": "Story"
|
|
6710
|
-
},
|
|
6711
|
-
"default": "{ render: args => { return html`<qti-item>${template(args)}</qti-item>`; }, play: async ({ canvasElement }) => { const assessmentItem = await getAssessmentItemFromItemContainer(canvasElement); expect(assessmentItem).toBeInTheDocument(); } }"
|
|
6712
|
-
},
|
|
6713
|
-
{
|
|
6714
|
-
"kind": "variable",
|
|
6715
|
-
"name": "ItemWithTemplate",
|
|
6716
|
-
"type": {
|
|
6717
|
-
"text": "Story"
|
|
6718
|
-
},
|
|
6719
|
-
"default": "{ render: args => { return html` <qti-item> <item-container item-url=${args['item-url']}> <template> <style> qti-simple-choice { border: 2px solid blue; } </style> </template> </item-container> </qti-item> `; }, play: ItemURL.play, tags: ['!autodocs'] }"
|
|
6720
|
-
},
|
|
6721
|
-
{
|
|
6722
|
-
"kind": "variable",
|
|
6723
|
-
"name": "ItemWithTemplateScale",
|
|
6724
|
-
"type": {
|
|
6725
|
-
"text": "Story"
|
|
6726
|
-
},
|
|
6727
|
-
"default": "{ render: args => { return html` <qti-item> <item-container item-url=${args['item-url']}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> </qti-item> `; }, play: ItemURL.play, tags: ['!autodocs'] }"
|
|
6728
|
-
},
|
|
6729
|
-
{
|
|
6730
|
-
"kind": "variable",
|
|
6731
|
-
"name": "ItemXML",
|
|
6732
|
-
"type": {
|
|
6733
|
-
"text": "Story"
|
|
6734
|
-
},
|
|
6735
|
-
"default": "{ render: (_, { loaded: { itemXML } }) => { return html` <qti-item> <item-container .itemXML=${itemXML}></item-container> </qti-item> `; }, loaders: [ async ({ args }) => { const itemXML = await qtiTransformItem() .load(args['item-url']) .then(api => api.xml()); return { itemXML }; } ], play: ItemURL.play, tags: ['!autodocs'] }"
|
|
6736
|
-
},
|
|
6737
|
-
{
|
|
6738
|
-
"kind": "variable",
|
|
6739
|
-
"name": "meta",
|
|
6740
|
-
"type": {
|
|
6741
|
-
"text": "Meta<typeof ItemContainer & { 'item-url': string }>"
|
|
6742
|
-
},
|
|
6743
|
-
"default": "{ component: 'item-container', args: { ...args, 'item-url': 'assets/qti-item/example-choice-item.xml' }, argTypes, parameters: { actions: { handles: events } } // tags: ['autodocs', 'new'] }"
|
|
6744
|
-
}
|
|
6745
|
-
],
|
|
6746
|
-
"exports": [
|
|
6747
|
-
{
|
|
6748
|
-
"kind": "js",
|
|
6749
|
-
"name": "default",
|
|
6750
|
-
"declaration": {
|
|
6751
|
-
"name": "meta",
|
|
6752
|
-
"module": "packages/qti-item/src/components/item-container/item-container.stories.ts"
|
|
6753
|
-
}
|
|
6754
|
-
},
|
|
6755
|
-
{
|
|
6756
|
-
"kind": "js",
|
|
6757
|
-
"name": "ItemDoc",
|
|
6758
|
-
"declaration": {
|
|
6759
|
-
"name": "ItemDoc",
|
|
6760
|
-
"module": "packages/qti-item/src/components/item-container/item-container.stories.ts"
|
|
6761
|
-
}
|
|
6762
|
-
},
|
|
6763
|
-
{
|
|
6764
|
-
"kind": "js",
|
|
6765
|
-
"name": "ItemURL",
|
|
6766
|
-
"declaration": {
|
|
6767
|
-
"name": "ItemURL",
|
|
6768
|
-
"module": "packages/qti-item/src/components/item-container/item-container.stories.ts"
|
|
6769
|
-
}
|
|
6770
|
-
},
|
|
6771
|
-
{
|
|
6772
|
-
"kind": "js",
|
|
6773
|
-
"name": "ItemWithTemplate",
|
|
6774
|
-
"declaration": {
|
|
6775
|
-
"name": "ItemWithTemplate",
|
|
6776
|
-
"module": "packages/qti-item/src/components/item-container/item-container.stories.ts"
|
|
6777
|
-
}
|
|
6778
|
-
},
|
|
6779
|
-
{
|
|
6780
|
-
"kind": "js",
|
|
6781
|
-
"name": "ItemWithTemplateScale",
|
|
6782
|
-
"declaration": {
|
|
6783
|
-
"name": "ItemWithTemplateScale",
|
|
6784
|
-
"module": "packages/qti-item/src/components/item-container/item-container.stories.ts"
|
|
6785
|
-
}
|
|
6786
|
-
},
|
|
6787
|
-
{
|
|
6788
|
-
"kind": "js",
|
|
6789
|
-
"name": "ItemXML",
|
|
6790
|
-
"declaration": {
|
|
6791
|
-
"name": "ItemXML",
|
|
6792
|
-
"module": "packages/qti-item/src/components/item-container/item-container.stories.ts"
|
|
6793
|
-
}
|
|
6794
|
-
}
|
|
6795
|
-
]
|
|
6796
|
-
},
|
|
6797
6488
|
{
|
|
6798
6489
|
"kind": "javascript-module",
|
|
6799
6490
|
"path": "packages/qti-item/src/components/item-container/item-container.ts",
|
|
@@ -6998,94 +6689,6 @@
|
|
|
6998
6689
|
}
|
|
6999
6690
|
]
|
|
7000
6691
|
},
|
|
7001
|
-
{
|
|
7002
|
-
"kind": "javascript-module",
|
|
7003
|
-
"path": "packages/qti-item/src/components/item-print-variables/item-print-variables.stories.ts",
|
|
7004
|
-
"declarations": [
|
|
7005
|
-
{
|
|
7006
|
-
"kind": "variable",
|
|
7007
|
-
"name": "Default",
|
|
7008
|
-
"type": {
|
|
7009
|
-
"text": "Story"
|
|
7010
|
-
},
|
|
7011
|
-
"default": "{ render: args => html` <qti-item> <div style=\"display: flex; gap: 1rem;\"> <item-container style=\"width: 400px\" item-url=${args['item-url']}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-print-variables></item-print-variables> </div> </qti-item>` }"
|
|
7012
|
-
},
|
|
7013
|
-
{
|
|
7014
|
-
"kind": "variable",
|
|
7015
|
-
"name": "GraphicMatch",
|
|
7016
|
-
"type": {
|
|
7017
|
-
"text": "Story"
|
|
7018
|
-
},
|
|
7019
|
-
"default": "{ args: { 'item-url': '/qti-test-package/items/graphic_gap_match.xml' // Set the new item URL here }, render: args => html` <qti-item> <div style=\"display: flex; gap: 1rem;\"> <item-container style=\"width: 400px\" item-url=${args['item-url']}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-print-variables></item-print-variables> </div> </qti-item>` }"
|
|
7020
|
-
},
|
|
7021
|
-
{
|
|
7022
|
-
"kind": "variable",
|
|
7023
|
-
"name": "Match",
|
|
7024
|
-
"type": {
|
|
7025
|
-
"text": "Story"
|
|
7026
|
-
},
|
|
7027
|
-
"default": "{ args: { 'item-url': '/qti-item/example-match.xml' // Set the new item URL here }, render: args => html` <qti-item> <div style=\"display: flex; gap: 1rem;\"> <item-container style=\"width: 400px\" item-url=${args['item-url']}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-print-variables></item-print-variables> </div> </qti-item>` }"
|
|
7028
|
-
},
|
|
7029
|
-
{
|
|
7030
|
-
"kind": "variable",
|
|
7031
|
-
"name": "meta",
|
|
7032
|
-
"type": {
|
|
7033
|
-
"text": "Meta<typeof ItemContainer & { 'item-url': string }>"
|
|
7034
|
-
},
|
|
7035
|
-
"default": "{ component: 'item-container', args: { ...args, 'item-url': '/qti-item/example-choice-item.xml' }, argTypes, parameters: { actions: { handles: events } } // tags: ['autodocs', 'new'] }"
|
|
7036
|
-
},
|
|
7037
|
-
{
|
|
7038
|
-
"kind": "variable",
|
|
7039
|
-
"name": "MultipleResponse",
|
|
7040
|
-
"type": {
|
|
7041
|
-
"text": "Story"
|
|
7042
|
-
},
|
|
7043
|
-
"default": "{ args: { 'item-url': '/qti-item/example-choice-multiple-item.xml' // Set the new item URL here }, render: args => html` <qti-item> <div style=\"display: flex; gap: 1rem;\"> <item-container style=\"width: 400px\" item-url=${args['item-url']}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-print-variables></item-print-variables> </div> </qti-item>` }"
|
|
7044
|
-
}
|
|
7045
|
-
],
|
|
7046
|
-
"exports": [
|
|
7047
|
-
{
|
|
7048
|
-
"kind": "js",
|
|
7049
|
-
"name": "default",
|
|
7050
|
-
"declaration": {
|
|
7051
|
-
"name": "meta",
|
|
7052
|
-
"module": "packages/qti-item/src/components/item-print-variables/item-print-variables.stories.ts"
|
|
7053
|
-
}
|
|
7054
|
-
},
|
|
7055
|
-
{
|
|
7056
|
-
"kind": "js",
|
|
7057
|
-
"name": "Default",
|
|
7058
|
-
"declaration": {
|
|
7059
|
-
"name": "Default",
|
|
7060
|
-
"module": "packages/qti-item/src/components/item-print-variables/item-print-variables.stories.ts"
|
|
7061
|
-
}
|
|
7062
|
-
},
|
|
7063
|
-
{
|
|
7064
|
-
"kind": "js",
|
|
7065
|
-
"name": "GraphicMatch",
|
|
7066
|
-
"declaration": {
|
|
7067
|
-
"name": "GraphicMatch",
|
|
7068
|
-
"module": "packages/qti-item/src/components/item-print-variables/item-print-variables.stories.ts"
|
|
7069
|
-
}
|
|
7070
|
-
},
|
|
7071
|
-
{
|
|
7072
|
-
"kind": "js",
|
|
7073
|
-
"name": "Match",
|
|
7074
|
-
"declaration": {
|
|
7075
|
-
"name": "Match",
|
|
7076
|
-
"module": "packages/qti-item/src/components/item-print-variables/item-print-variables.stories.ts"
|
|
7077
|
-
}
|
|
7078
|
-
},
|
|
7079
|
-
{
|
|
7080
|
-
"kind": "js",
|
|
7081
|
-
"name": "MultipleResponse",
|
|
7082
|
-
"declaration": {
|
|
7083
|
-
"name": "MultipleResponse",
|
|
7084
|
-
"module": "packages/qti-item/src/components/item-print-variables/item-print-variables.stories.ts"
|
|
7085
|
-
}
|
|
7086
|
-
}
|
|
7087
|
-
]
|
|
7088
|
-
},
|
|
7089
6692
|
{
|
|
7090
6693
|
"kind": "javascript-module",
|
|
7091
6694
|
"path": "packages/qti-item/src/components/item-print-variables/item-print-variables.ts",
|
|
@@ -7138,175 +6741,7 @@
|
|
|
7138
6741
|
},
|
|
7139
6742
|
{
|
|
7140
6743
|
"kind": "javascript-module",
|
|
7141
|
-
"path": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.
|
|
7142
|
-
"declarations": [
|
|
7143
|
-
{
|
|
7144
|
-
"kind": "variable",
|
|
7145
|
-
"name": "Default",
|
|
7146
|
-
"type": {
|
|
7147
|
-
"text": "Story"
|
|
7148
|
-
},
|
|
7149
|
-
"default": "{ render: args => { return html`<qti-item> <!-- <div style=\"display: flex; flex-direction: column; gap: 1rem;\"> --> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction ${spread(args)}></item-show-candidate-correction> <!-- </div> --> </qti-item>`; }, play: async ({ canvasElement, step }) => { // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); // const choices = await canvas.findAllByShadowRole('radio'); const choiceA: QtiSimpleChoice = await canvas.findByShadowText('You must stay with your luggage at all times.'); const choiceB: QtiSimpleChoice = await canvas.findByShadowText('Do not let someone else look after your luggage.'); const choiceC: QtiSimpleChoice = await canvas.findByShadowText('Remember your luggage when you leave.'); const showCorrectButton = canvas.getAllByShadowText(/Show candidate correction/i)[0]; await step('Click on the Show candidate correction button', async () => { await choiceA.click(); await showCorrectButton.click(); await step('Verify candidate correction is applied', async () => { expect(choiceA.internals.states.has('candidate-correct')).toBe(true); expect(choiceB.internals.states.has('candidate-correct')).toBe(false); expect(choiceC.internals.states.has('candidate-correct')).toBe(false); expect(choiceA.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceB.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceC.internals.states.has('candidate-incorrect')).toBe(false); }); await step('Click on the Show Candidate Correction again', async () => { expect(canvas.queryByShadowText(/Show candidate correction/i)).toBeNull(); expect(canvas.getAllByShadowText(/Hide candidate correction/i).length).toBe(1); await showCorrectButton.click(); await choiceA.click(); // Deselect option expect(choiceA.internals.states.has('candidate-correct')).toBe(false); expect(choiceB.internals.states.has('candidate-correct')).toBe(false); expect(choiceC.internals.states.has('candidate-correct')).toBe(false); expect(choiceA.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceB.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceC.internals.states.has('candidate-incorrect')).toBe(false); }); await step('Change answer after showing Candidate Correction', async () => { expect(canvas.getAllByShadowText(/Show candidate correction/i).length).toBe(1); await choiceA.click(); await showCorrectButton.click(); await choiceB.click(); expect(choiceA.internals.states.has('candidate-correct')).toBe(false); expect(choiceB.internals.states.has('candidate-correct')).toBe(false); expect(choiceC.internals.states.has('candidate-correct')).toBe(false); expect(choiceA.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceB.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceC.internals.states.has('candidate-incorrect')).toBe(false); expect(canvas.queryByShadowText(/Hide candidate correction/i)).toBeNull(); await choiceB.click(); // Deselect option }); }); } }"
|
|
7150
|
-
},
|
|
7151
|
-
{
|
|
7152
|
-
"kind": "variable",
|
|
7153
|
-
"name": "GapMatch",
|
|
7154
|
-
"type": {
|
|
7155
|
-
"text": "Story"
|
|
7156
|
-
},
|
|
7157
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/gap_match.xml' }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction></item-show-candidate-correction> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const interaction = await getAssessmentItemFromItemContainer(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show candidate correction/i); const matchItem1 = (await canvas.findByShadowText('winter')) as QtiGapMatchInteraction; const matchItem2 = (await canvas.findByShadowText('spring')) as QtiGapMatchInteraction; const dropZones = interaction.querySelectorAll(`qti-gap`); const dropZone1 = dropZones[0]; const dropZone2 = dropZones[1]; await step('Drag and drop match interaction items', async () => { await drag(matchItem1, { to: dropZone1 }); await drag(matchItem2, { to: dropZone2 }); await showCorrectButton.click(); await step('Verify candidate correction state is applied', async () => { const matchItem1List = Array.from(await canvas.findAllByShadowText('winter')); const matchItem1CandidateResponse = matchItem1List[1] as QtiGapMatchInteraction; const matchItem2List = Array.from(await canvas.findAllByShadowText('spring')); const matchItem2CandidateResponse = matchItem2List[1] as QtiGapMatchInteraction; expect(matchItem1CandidateResponse.internals.states.has('candidate-correct')).toBe(true); expect(matchItem2CandidateResponse.internals.states.has('candidate-correct')).toBe(false); expect(matchItem1CandidateResponse.internals.states.has('candidate-incorrect')).toBe(false); expect(matchItem2CandidateResponse.internals.states.has('candidate-incorrect')).toBe(true); }); }); } }"
|
|
7158
|
-
},
|
|
7159
|
-
{
|
|
7160
|
-
"kind": "variable",
|
|
7161
|
-
"name": "InlineChoice",
|
|
7162
|
-
"type": {
|
|
7163
|
-
"text": "Story"
|
|
7164
|
-
},
|
|
7165
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-inline-choice.xml' }, render: args => html` <qti-item> <div> <item-container style=\"display: block; width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction></item-show-candidate-correction> </div> </qti-item> `, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction = await waitFor(() => { const el = item.querySelector('qti-inline-choice-interaction'); if (!el) throw new Error('inline-choice interaction not found'); return el; }); const selectElement = await waitFor(() => { const select = interaction.shadowRoot?.querySelector<HTMLSelectElement>('select'); if (!select) throw new Error('select element not yet available'); return select; }); const showButton = await canvas.findByShadowText(/Show candidate correction/i); await step('Select an inline choice option', async () => { selectElement.value = 'Y'; // de correcte identifier (York) selectElement.dispatchEvent(new Event('change', { bubbles: true })); }); await step('Click on the Show Candidate Correction button', async () => { await showButton.click(); await step('Verify candidate correction by checking selected option', async () => { const selectedOption = Array.from(selectElement.options).find(opt => opt.selected); expect(selectedOption).not.toBeUndefined(); expect(selectedOption.value).toBe('Y'); expect(selectedOption.textContent.trim()).toBe('York'); }); }); } }"
|
|
7166
|
-
},
|
|
7167
|
-
{
|
|
7168
|
-
"kind": "variable",
|
|
7169
|
-
"name": "Match",
|
|
7170
|
-
"type": {
|
|
7171
|
-
"text": "Story"
|
|
7172
|
-
},
|
|
7173
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/match.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction></item-show-candidate-correction> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show candidate correction/i); const matchItem1 = (await canvas.findByShadowText('Prospero')) as QtiSimpleAssociableChoice; const matchItem2 = (await canvas.findByShadowText('Capulet')) as QtiSimpleAssociableChoice; const matchItem3 = (await canvas.findByShadowText('Demetrius')) as QtiSimpleAssociableChoice; const dropZone1 = await canvas.findByShadowText('The Tempest'); const dropZone2 = await canvas.findByShadowText(\"A Midsummer-Night's Dream\"); const dropZone3 = await canvas.findByShadowText('Romeo and Juliet'); await step('Drag and drop match interaction items', async () => { await drag(matchItem1, { to: dropZone1 }); await drag(matchItem2, { to: dropZone2 }); await drag(matchItem3, { to: dropZone3 }); await showCorrectButton.click(); await step('Verify candidate correction state is applied', async () => { const matchItem1List = Array.from(await canvas.findAllByShadowText('Prospero')); const matchItem1CandidateResponse = matchItem1List[1] as QtiSimpleAssociableChoice; const matchItem2List = Array.from(await canvas.findAllByShadowText('Capulet')); const matchItem2CandidateResponse = matchItem2List[1] as QtiSimpleAssociableChoice; const matchItem3List = Array.from(await canvas.findAllByShadowText('Demetrius')); const matchItem3CandidateResponse = matchItem3List[1] as QtiSimpleAssociableChoice; expect(matchItem1CandidateResponse.internals.states.has('candidate-correct')).toBe(true); expect(matchItem2CandidateResponse.internals.states.has('candidate-correct')).toBe(false); expect(matchItem3CandidateResponse.internals.states.has('candidate-correct')).toBe(false); expect(matchItem1CandidateResponse.internals.states.has('candidate-incorrect')).toBe(false); expect(matchItem2CandidateResponse.internals.states.has('candidate-incorrect')).toBe(true); expect(matchItem3CandidateResponse.internals.states.has('candidate-incorrect')).toBe(true); }); }); } }"
|
|
7174
|
-
},
|
|
7175
|
-
{
|
|
7176
|
-
"kind": "variable",
|
|
7177
|
-
"name": "MatchAllToOneZone",
|
|
7178
|
-
"type": {
|
|
7179
|
-
"text": "Story"
|
|
7180
|
-
},
|
|
7181
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/match.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction></item-show-candidate-correction> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choice to be rendered - fresh UI state const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show candidate correction/i); const matchItem1 = (await canvas.findByShadowText('Prospero')) as QtiSimpleAssociableChoice; const matchItem2 = (await canvas.findByShadowText('Lysander')) as QtiSimpleAssociableChoice; const matchItem3 = (await canvas.findByShadowText('Demetrius')) as QtiSimpleAssociableChoice; const dropZone1 = await canvas.findByShadowText('The Tempest'); await step('Drag and drop all match interaction items to single dropzone', async () => { await drag(matchItem1, { to: dropZone1 }); await drag(matchItem2, { to: dropZone1 }); await drag(matchItem3, { to: dropZone1 }); await showCorrectButton.click(); await step('Verify candidate correction state is applied', async () => { const matchItem1List = Array.from(await canvas.findAllByShadowText('Prospero')); const matchItem1CandidateResponse = matchItem1List[1] as QtiSimpleAssociableChoice; const matchItem2List = Array.from(await canvas.findAllByShadowText('Lysander')); const matchItem2CandidateResponse = matchItem2List[1] as QtiSimpleAssociableChoice; const matchItem3List = Array.from(await canvas.findAllByShadowText('Demetrius')); const matchItem3CandidateResponse = matchItem3List[1] as QtiSimpleAssociableChoice; expect(matchItem1CandidateResponse.internals.states.has('candidate-correct')).toBe(true); expect(matchItem2CandidateResponse.internals.states.has('candidate-correct')).toBe(false); expect(matchItem3CandidateResponse.internals.states.has('candidate-correct')).toBe(false); expect(matchItem1CandidateResponse.internals.states.has('candidate-incorrect')).toBe(false); expect(matchItem2CandidateResponse.internals.states.has('candidate-incorrect')).toBe(true); expect(matchItem3CandidateResponse.internals.states.has('candidate-incorrect')).toBe(true); }); }); } }"
|
|
7182
|
-
},
|
|
7183
|
-
{
|
|
7184
|
-
"kind": "variable",
|
|
7185
|
-
"name": "meta",
|
|
7186
|
-
"type": {
|
|
7187
|
-
"text": "Meta<typeof ItemContainer & { 'item-url': string }>"
|
|
7188
|
-
},
|
|
7189
|
-
"default": "{ component: 'item-container', args: { ...args, 'item-url': 'assets/qti-item/example-choice-item.xml' }, argTypes, parameters: { actions: { handles: events } } // tags: ['autodocs', 'new'] }"
|
|
7190
|
-
},
|
|
7191
|
-
{
|
|
7192
|
-
"kind": "variable",
|
|
7193
|
-
"name": "MultipleResponse",
|
|
7194
|
-
"type": {
|
|
7195
|
-
"text": "Story"
|
|
7196
|
-
},
|
|
7197
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-choice-multiple-item.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction ${spread(args)}></item-show-candidate-correction> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); // const choices = await canvas.findAllByShadowRole('radio'); const choiceA: QtiSimpleChoice = await canvas.findByShadowText('This is correct.'); const choiceB: QtiSimpleChoice = await canvas.findByShadowText('This is also correct.'); const choiceC: QtiSimpleChoice = await canvas.findByShadowText('This is wrong.'); const showCorrectButton = canvas.getAllByShadowText(/Show candidate correction/i)[0]; await step('Click on the Show Correct button', async () => { await choiceA.click(); await choiceC.click(); await showCorrectButton.click(); await step('Verify candidate correction state is applied', async () => { expect(choiceA.internals.states.has('candidate-correct')).toBe(true); expect(choiceB.internals.states.has('candidate-correct')).toBe(false); expect(choiceC.internals.states.has('candidate-correct')).toBe(false); expect(choiceA.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceB.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceC.internals.states.has('candidate-incorrect')).toBe(true); }); }); await step('Click on the Hide Correct button and deselect options', async () => { await showCorrectButton.click(); await step('Verify candidate correction state is removed', async () => { expect(choiceA.internals.states.has('candidate-correct')).toBe(false); expect(choiceB.internals.states.has('candidate-correct')).toBe(false); expect(choiceC.internals.states.has('candidate-correct')).toBe(false); expect(choiceA.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceB.internals.states.has('candidate-incorrect')).toBe(false); expect(choiceC.internals.states.has('candidate-incorrect')).toBe(false); }); await choiceA.click(); await choiceC.click(); }); } }"
|
|
7198
|
-
},
|
|
7199
|
-
{
|
|
7200
|
-
"kind": "variable",
|
|
7201
|
-
"name": "NoCorrectResponse",
|
|
7202
|
-
"type": {
|
|
7203
|
-
"text": "Story"
|
|
7204
|
-
},
|
|
7205
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-choice-nocorrect-item.xml' // Set the new item URL here }, render: args => html` <qti-item> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction ${spread(args)}></item-show-candidate-correction> <!-- </div> --> </qti-item>`, play: async ({ canvasElement, step }) => { // // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); await canvas.findByShadowText('You must stay with your luggage at all times.'); const _ = canvas.getAllByShadowText(/No correct response specified/i)[0]; const itemShowCorrect = canvasElement.querySelector('item-show-candidate-correction'); await step('Verify the Show Correct button is disabled', async () => { expect(itemShowCorrect.disabled).toBe(true); }); } }"
|
|
7206
|
-
},
|
|
7207
|
-
{
|
|
7208
|
-
"kind": "variable",
|
|
7209
|
-
"name": "SelectPoint",
|
|
7210
|
-
"type": {
|
|
7211
|
-
"text": "Story"
|
|
7212
|
-
},
|
|
7213
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/select_point.xml' }, render: args => html` <qti-item> <div> <item-container style=\"display: block; width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction></item-show-candidate-correction> </div> </qti-item> `, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const showButton = await canvas.findByShadowText(/Show candidate correction/i); const image = await canvas.findByShadowAltText('UK Map'); await step('Click on correct point in the image', async () => { const rect = image.getBoundingClientRect(); await fireEvent.click(image, { clientX: rect.left + rect.width * 0.5, clientY: rect.top + rect.height * 0.4 }); }); await step('Click on incorrect points in the image', async () => { const rect = image.getBoundingClientRect(); await fireEvent.click(image, { clientX: rect.left + rect.width * 0.5, clientY: rect.top + rect.height * 0.6 }); await fireEvent.click(image, { clientX: rect.left + rect.width * 0.55, clientY: rect.top + rect.height * 0.65 }); }); await step('Click on the Show Candidate Correction button', async () => { await showButton.click(); await step('Verify candidate correction by checking selected options', async () => { const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction: QtiSelectPointInteraction = item.querySelector('qti-select-point-interaction'); const buttonsCorrect = interaction.shadowRoot?.querySelectorAll<HTMLButtonElement>('button[part=\"point correct\"]'); const buttonsIncorrect = interaction.shadowRoot?.querySelectorAll<HTMLButtonElement>( 'button[part=\"point incorrect\"]' ); expect(buttonsCorrect).toHaveLength(1); expect(buttonsIncorrect).toHaveLength(2); }); }); } }"
|
|
7214
|
-
},
|
|
7215
|
-
{
|
|
7216
|
-
"kind": "variable",
|
|
7217
|
-
"name": "TextEntry",
|
|
7218
|
-
"type": {
|
|
7219
|
-
"text": "Story"
|
|
7220
|
-
},
|
|
7221
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-text-entry.xml' }, render: args => html` <qti-item> <div> <item-container style=\"display: block; width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-candidate-correction></item-show-candidate-correction> </div> </qti-item> `, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const showButton = await canvas.findByShadowText(/Show candidate correction/i); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction: QtiTextEntryInteraction = item.querySelector('qti-text-entry-interaction'); const input = interaction.shadowRoot?.querySelector<HTMLInputElement>('input'); await step('Type in the correct answer text entry interaction', async () => { input.value = 'York'; input.dispatchEvent(new Event('input', { bubbles: true })); input.dispatchEvent(new Event('change', { bubbles: true })); }); await step('Click on the Show Candidate Correction button', async () => { await showButton.click(); await step('Verify candidate correction by checking selected option', async () => { expect(interaction.internals.states.has('candidate-correct')).toBe(true); expect(interaction.internals.states.has('candidate-incorrect')).toBe(false); expect(interaction.internals.states.has('candidate-partially-correct')).toBe(false); }); }); await step('Type in the partially correct answer text entry interaction', async () => { input.value = 'york'; input.dispatchEvent(new Event('input', { bubbles: true })); input.dispatchEvent(new Event('change', { bubbles: true })); }); await step('Click on the Show Candidate Correction button', async () => { await showButton.click(); await step('Verify candidate correction by checking selected option', async () => { const interactionResponse: QtiTextEntryInteraction = item.querySelector('qti-text-entry-interaction'); expect(interactionResponse.internals.states.has('candidate-correct')).toBe(false); expect(interactionResponse.internals.states.has('candidate-incorrect')).toBe(false); expect(interactionResponse.internals.states.has('candidate-partially-correct')).toBe(true); }); }); await step('Type in the incorrect answer text entry interaction', async () => { input.value = 'bla'; input.dispatchEvent(new Event('input', { bubbles: true })); input.dispatchEvent(new Event('change', { bubbles: true })); }); await step('Click on the Show Candidate Correction button', async () => { await showButton.click(); await step('Verify candidate correction by checking selected option', async () => { const interactionResponse: QtiTextEntryInteraction = item.querySelector('qti-text-entry-interaction'); expect(interactionResponse.internals.states.has('candidate-correct')).toBe(false); expect(interactionResponse.internals.states.has('candidate-incorrect')).toBe(true); expect(interactionResponse.internals.states.has('candidate-partially-correct')).toBe(false); }); }); } }"
|
|
7222
|
-
}
|
|
7223
|
-
],
|
|
7224
|
-
"exports": [
|
|
7225
|
-
{
|
|
7226
|
-
"kind": "js",
|
|
7227
|
-
"name": "default",
|
|
7228
|
-
"declaration": {
|
|
7229
|
-
"name": "meta",
|
|
7230
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7231
|
-
}
|
|
7232
|
-
},
|
|
7233
|
-
{
|
|
7234
|
-
"kind": "js",
|
|
7235
|
-
"name": "Default",
|
|
7236
|
-
"declaration": {
|
|
7237
|
-
"name": "Default",
|
|
7238
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7239
|
-
}
|
|
7240
|
-
},
|
|
7241
|
-
{
|
|
7242
|
-
"kind": "js",
|
|
7243
|
-
"name": "GapMatch",
|
|
7244
|
-
"declaration": {
|
|
7245
|
-
"name": "GapMatch",
|
|
7246
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7247
|
-
}
|
|
7248
|
-
},
|
|
7249
|
-
{
|
|
7250
|
-
"kind": "js",
|
|
7251
|
-
"name": "InlineChoice",
|
|
7252
|
-
"declaration": {
|
|
7253
|
-
"name": "InlineChoice",
|
|
7254
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7255
|
-
}
|
|
7256
|
-
},
|
|
7257
|
-
{
|
|
7258
|
-
"kind": "js",
|
|
7259
|
-
"name": "Match",
|
|
7260
|
-
"declaration": {
|
|
7261
|
-
"name": "Match",
|
|
7262
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7263
|
-
}
|
|
7264
|
-
},
|
|
7265
|
-
{
|
|
7266
|
-
"kind": "js",
|
|
7267
|
-
"name": "MatchAllToOneZone",
|
|
7268
|
-
"declaration": {
|
|
7269
|
-
"name": "MatchAllToOneZone",
|
|
7270
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7271
|
-
}
|
|
7272
|
-
},
|
|
7273
|
-
{
|
|
7274
|
-
"kind": "js",
|
|
7275
|
-
"name": "MultipleResponse",
|
|
7276
|
-
"declaration": {
|
|
7277
|
-
"name": "MultipleResponse",
|
|
7278
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7279
|
-
}
|
|
7280
|
-
},
|
|
7281
|
-
{
|
|
7282
|
-
"kind": "js",
|
|
7283
|
-
"name": "NoCorrectResponse",
|
|
7284
|
-
"declaration": {
|
|
7285
|
-
"name": "NoCorrectResponse",
|
|
7286
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7287
|
-
}
|
|
7288
|
-
},
|
|
7289
|
-
{
|
|
7290
|
-
"kind": "js",
|
|
7291
|
-
"name": "SelectPoint",
|
|
7292
|
-
"declaration": {
|
|
7293
|
-
"name": "SelectPoint",
|
|
7294
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7295
|
-
}
|
|
7296
|
-
},
|
|
7297
|
-
{
|
|
7298
|
-
"kind": "js",
|
|
7299
|
-
"name": "TextEntry",
|
|
7300
|
-
"declaration": {
|
|
7301
|
-
"name": "TextEntry",
|
|
7302
|
-
"module": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.stories.ts"
|
|
7303
|
-
}
|
|
7304
|
-
}
|
|
7305
|
-
]
|
|
7306
|
-
},
|
|
7307
|
-
{
|
|
7308
|
-
"kind": "javascript-module",
|
|
7309
|
-
"path": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.ts",
|
|
6744
|
+
"path": "packages/qti-item/src/components/item-show-candidate-correction/item-show-candidate-correction.ts",
|
|
7310
6745
|
"declarations": [
|
|
7311
6746
|
{
|
|
7312
6747
|
"kind": "class",
|
|
@@ -7484,382 +6919,6 @@
|
|
|
7484
6919
|
}
|
|
7485
6920
|
]
|
|
7486
6921
|
},
|
|
7487
|
-
{
|
|
7488
|
-
"kind": "javascript-module",
|
|
7489
|
-
"path": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts",
|
|
7490
|
-
"declarations": [
|
|
7491
|
-
{
|
|
7492
|
-
"kind": "variable",
|
|
7493
|
-
"name": "ChoiceFullCorrectResponse",
|
|
7494
|
-
"type": {
|
|
7495
|
-
"text": "Story"
|
|
7496
|
-
},
|
|
7497
|
-
"default": "{ render: args => { return html`<qti-item> <div style=\"display: flex; flex-direction: column; gap: 1rem; align-items: start\"> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`; }, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'full', fullCorrectResponseOnlyWhenIncorrect: false }; const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); const choiceA: QtiSimpleChoice = await canvas.findByShadowText('You must stay with your luggage at all times.'); await step('Click on the Show Correct button', async () => { await choiceA.click(); await fireEvent.click(showCorrectButton); await step('Verify correct response state is applied', async () => { const fullCorrectResponse = await canvas.findByShadowRole('full-correct-response'); expect(fullCorrectResponse).toBeVisible(); const interaction = fullCorrectResponse.querySelector('qti-choice-interaction'); const choices = Array.from(interaction.querySelectorAll('qti-simple-choice')); await interaction.updateComplete; expect(choices[0].internals.states.has('--checked')).toBe(true); expect(choices[1].internals.states.has('--checked')).toBe(false); expect(choices[2].internals.states.has('--checked')).toBe(false); }); }); } }"
|
|
7498
|
-
},
|
|
7499
|
-
{
|
|
7500
|
-
"kind": "variable",
|
|
7501
|
-
"name": "ChoiceFullCorrectResponseOnlyWhenIncorrect",
|
|
7502
|
-
"type": {
|
|
7503
|
-
"text": "Story"
|
|
7504
|
-
},
|
|
7505
|
-
"default": "{ render: args => { return html`<qti-item> <div style=\"display: flex; flex-direction: column; gap: 1rem; align-items: start\"> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`; }, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'full', fullCorrectResponseOnlyWhenIncorrect: true }; const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); const choiceA: QtiSimpleChoice = await canvas.findByShadowText('You must stay with your luggage at all times.'); await step('Click on the Show Correct button', async () => { await choiceA.click(); await fireEvent.click(showCorrectButton); await step('Verify correct full correct response is not visible', async () => { const fullCorrectResponse = await canvas.queryByShadowRole('full-correct-response'); expect(fullCorrectResponse).toBeNull(); }); }); } }"
|
|
7506
|
-
},
|
|
7507
|
-
{
|
|
7508
|
-
"kind": "variable",
|
|
7509
|
-
"name": "ChoiceInternalCorrectResponse",
|
|
7510
|
-
"type": {
|
|
7511
|
-
"text": "Story"
|
|
7512
|
-
},
|
|
7513
|
-
"default": "{ render: args => { return html`<qti-item> <div style=\"display: flex; flex-direction: column; gap: 1rem; align-items: start\"> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`; }, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'internal' }; // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); // const choices = await canvas.findAllByShadowRole('radio'); const choiceA: QtiSimpleChoice = await canvas.findByShadowText('You must stay with your luggage at all times.'); const choiceB: QtiSimpleChoice = await canvas.findByShadowText('Do not let someone else look after your luggage.'); const choiceC: QtiSimpleChoice = await canvas.findByShadowText('Remember your luggage when you leave.'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); await step('Verify correct response state is applied', async () => { expect(choiceA.internals.states.has('correct-response')).toBe(true); expect(choiceB.internals.states.has('correct-response')).toBe(false); expect(choiceC.internals.states.has('correct-response')).toBe(false); expect(choiceA.internals.states.has('incorrect-response')).toBe(false); expect(choiceB.internals.states.has('incorrect-response')).toBe(true); expect(choiceC.internals.states.has('incorrect-response')).toBe(true); }); }); } }"
|
|
7514
|
-
},
|
|
7515
|
-
{
|
|
7516
|
-
"kind": "variable",
|
|
7517
|
-
"name": "Default",
|
|
7518
|
-
"type": {
|
|
7519
|
-
"text": "Story"
|
|
7520
|
-
},
|
|
7521
|
-
"default": "{ render: args => { return html`<qti-item> <div style=\"display: flex; flex-direction: column; gap: 1rem; align-items: start\"> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-correct-response-mode></item-correct-response-mode> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`; }, play: async ({ canvasElement, step }) => { // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); // const choices = await canvas.findAllByShadowRole('radio'); const choiceA: QtiSimpleChoice = await canvas.findByShadowText('You must stay with your luggage at all times.'); const choiceB: QtiSimpleChoice = await canvas.findByShadowText('Do not let someone else look after your luggage.'); const choiceC: QtiSimpleChoice = await canvas.findByShadowText('Remember your luggage when you leave.'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); await step('Verify correct response state is applied', async () => { expect(choiceA.internals.states.has('correct-response')).toBe(true); expect(choiceB.internals.states.has('correct-response')).toBe(false); expect(choiceC.internals.states.has('correct-response')).toBe(false); expect(choiceA.internals.states.has('incorrect-response')).toBe(false); expect(choiceB.internals.states.has('incorrect-response')).toBe(true); expect(choiceC.internals.states.has('incorrect-response')).toBe(true); }); await step('Click on the Show Correct button again', async () => { expect(canvas.queryByShadowText(/Show correct/i)).toBeNull(); expect(canvas.getAllByShadowText(/Hide correct/i).length).toBe(1); await showCorrectButton.click(); expect(choiceA.internals.states.has('correct-response')).toBe(false); expect(choiceB.internals.states.has('correct-response')).toBe(false); expect(choiceC.internals.states.has('correct-response')).toBe(false); expect(choiceA.internals.states.has('incorrect-response')).toBe(false); expect(choiceB.internals.states.has('incorrect-response')).toBe(false); expect(choiceC.internals.states.has('incorrect-response')).toBe(false); }); }); } }"
|
|
7522
|
-
},
|
|
7523
|
-
{
|
|
7524
|
-
"kind": "variable",
|
|
7525
|
-
"name": "GapMatch",
|
|
7526
|
-
"type": {
|
|
7527
|
-
"text": "Story"
|
|
7528
|
-
},
|
|
7529
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/gap_match.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const interaction = await getAssessmentItemFromItemContainer(canvasElement); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const correctOptions = interaction.querySelectorAll(`[class=\"correct-option\"]`); expect(correctOptions.length).toBe(2); expect(correctOptions[0].textContent).toBe('winter'); expect(correctOptions[1].textContent).toBe('summer'); }); } }"
|
|
7530
|
-
},
|
|
7531
|
-
{
|
|
7532
|
-
"kind": "variable",
|
|
7533
|
-
"name": "GapMatchCorrectResponse",
|
|
7534
|
-
"type": {
|
|
7535
|
-
"text": "Story"
|
|
7536
|
-
},
|
|
7537
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/gap_match.xml' }, render: args => html`<qti-item> <div> <item-container style=\"display: block; width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); const interaction = await getAssessmentItemFromItemContainer(canvasElement); const matchItem1 = (await canvas.findByShadowText('winter')) as QtiGapMatchInteraction; const matchItem2 = (await canvas.findByShadowText('spring')) as QtiGapMatchInteraction; const dropZones = interaction.querySelectorAll(`qti-gap`); const dropZone1 = dropZones[0]; const dropZone2 = dropZones[1]; await step('Drag and drop match interaction items', async () => { await drag(matchItem1, { to: dropZone1 }); await drag(matchItem2, { to: dropZone2 }); await showCorrectButton.click(); await step('Verify correct response is shown', async () => { const correctResponses = interaction.querySelectorAll('[class=\"correct-option\"]'); expect(correctResponses.length).toBe(2); expect(correctResponses[0].textContent).toBe('winter'); expect(correctResponses[1].textContent).toBe('summer'); }); }); } }"
|
|
7538
|
-
},
|
|
7539
|
-
{
|
|
7540
|
-
"kind": "variable",
|
|
7541
|
-
"name": "GraphicAssociate",
|
|
7542
|
-
"type": {
|
|
7543
|
-
"text": "Story"
|
|
7544
|
-
},
|
|
7545
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/graphic_associate.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; border: 2px solid blue; transform: scale(0.7); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response></item-show-correct-response> <!-- <item-print-variables></item-print-variables> --> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choices to be rendered const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction = item.querySelector('qti-graphic-associate-interaction'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const lines = interaction.shadowRoot.querySelector('line-container').querySelectorAll(`[part='correct-line']`).length === 2; expect(lines).toBe(true); }); } }"
|
|
7546
|
-
},
|
|
7547
|
-
{
|
|
7548
|
-
"kind": "variable",
|
|
7549
|
-
"name": "GraphicOrder",
|
|
7550
|
-
"type": {
|
|
7551
|
-
"text": "Story"
|
|
7552
|
-
},
|
|
7553
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-graphic-order.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choices to be rendered const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction = item.querySelector('qti-graphic-order-interaction'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const hotspotChoice = interaction.querySelectorAll('qti-hotspot-choice'); // const get after content expect(window.getComputedStyle(hotspotChoice[0], ':after').content).toBe('\"C=1\"'); expect(window.getComputedStyle(hotspotChoice[1], ':after').content).toBe('\"C=4\"'); expect(window.getComputedStyle(hotspotChoice[2], ':after').content).toBe('\"C=2\"'); expect(window.getComputedStyle(hotspotChoice[3], ':after').content).toBe('\"C=3\"'); }); } }"
|
|
7554
|
-
},
|
|
7555
|
-
{
|
|
7556
|
-
"kind": "variable",
|
|
7557
|
-
"name": "InlineChoiceFullCorrectResponse",
|
|
7558
|
-
"type": {
|
|
7559
|
-
"text": "Story"
|
|
7560
|
-
},
|
|
7561
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-inline-choice.xml' // Zorg dat dit item een inline-choice bevat }, render: args => html`<qti-item> <div> <item-container style=\"display: block; width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'full' }; const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); await step('Click on the Show Correct button', async () => { await fireEvent.click(showCorrectButton); await step('Verify full correct response is shown', async () => { const fullCorrectResponse = await waitFor(() => canvas.getByShadowRole('full-correct-response')); expect(fullCorrectResponse).toBeVisible(); const interaction = fullCorrectResponse.querySelector('qti-inline-choice-interaction'); expect(interaction).not.toBeNull(); const select = interaction.shadowRoot.querySelector('select'); expect(select).not.toBeNull(); const selectedOption = Array.from(select.options).find(opt => opt.selected); expect(selectedOption).not.toBeUndefined(); expect(selectedOption.textContent.trim()).toBe('York'); }); }); } }"
|
|
7562
|
-
},
|
|
7563
|
-
{
|
|
7564
|
-
"kind": "variable",
|
|
7565
|
-
"name": "InlineChoiceInternalCorrectResponse",
|
|
7566
|
-
"type": {
|
|
7567
|
-
"text": "Story"
|
|
7568
|
-
},
|
|
7569
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-inline-choice.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'internal' }; const canvas = within(canvasElement); const itemAssessment = await getAssessmentItemFromItemContainer(canvasElement); const interaction = itemAssessment.querySelector('qti-inline-choice-interaction'); const showCorrectButton = await canvas.findByShadowText(`Show correct response`); await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const correctResponse = interaction.shadowRoot.querySelector<HTMLSpanElement>('[part=\"correct-option\"]'); //.findByShadowLabelText('correct-response'); expect(correctResponse).not.toBeNull(); expect(correctResponse.innerText).toBe('York'); }); } }"
|
|
7570
|
-
},
|
|
7571
|
-
{
|
|
7572
|
-
"kind": "variable",
|
|
7573
|
-
"name": "Match",
|
|
7574
|
-
"type": {
|
|
7575
|
-
"text": "Story"
|
|
7576
|
-
},
|
|
7577
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/match.xml' // Set the new item URL here // 'item-url': 'api/kennisnet-1/ITEM002.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const interaction = await getAssessmentItemFromItemContainer(canvasElement); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const correctElements = interaction.querySelectorAll(`[class=\"correct-option\"]`); expect(correctElements.length).toBe(3); const correctOptions = Array.from(correctElements).map(el => el.textContent); const allExist = correctOptions.every(element => ['Prospero', 'Demetrius', 'Capulet'].includes(element)); expect(allExist).toBe(true); }); } }"
|
|
7578
|
-
},
|
|
7579
|
-
{
|
|
7580
|
-
"kind": "variable",
|
|
7581
|
-
"name": "MatchFullCorrectResponse",
|
|
7582
|
-
"type": {
|
|
7583
|
-
"text": "Story"
|
|
7584
|
-
},
|
|
7585
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/match.xml' // Set the new item URL here // 'item-url': 'api/kennisnet-1/ITEM002.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'full' }; const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); await step('Click on the Show Correct button', async () => { await fireEvent.click(showCorrectButton); await step('Verify full correct response is shown', async () => { const fullCorrectResponse = await waitFor(() => canvas.getByShadowRole('full-correct-response')); expect(fullCorrectResponse).toBeVisible(); }); }); } }"
|
|
7586
|
-
},
|
|
7587
|
-
{
|
|
7588
|
-
"kind": "variable",
|
|
7589
|
-
"name": "MatchTabular",
|
|
7590
|
-
"type": {
|
|
7591
|
-
"text": "Story"
|
|
7592
|
-
},
|
|
7593
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/match-tabular.xml' // Set the new item URL here // 'item-url': 'api/kennisnet-1/ITEM002.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; const interaction = item.querySelector('qti-match-interaction'); await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); // Find all elements with rb-correct or cb-correct parts // This uses the shadow DOM API to find elements with specific part attributes const correctRadioButtons = interaction.shadowRoot.querySelectorAll('[part~=\"rb-correct\"]'); const correctCheckboxes = interaction.shadowRoot.querySelectorAll('[part~=\"cb-correct\"]'); // Combine both types of correct elements const allCorrectElements = [...correctRadioButtons, ...correctCheckboxes] as HTMLInputElement[]; // Verify we have the expected number of correct answers expect(allCorrectElements.length).toBe(4); // Get the associated row identifiers for the correct options const correctRowIds = Array.from(allCorrectElements).map(el => el.name); // Get the values of the correct inputs (which contain the row and column IDs) const correctValues = Array.from(allCorrectElements).map(el => el.value); // Parse the values to extract row IDs const rowIds = correctValues.map(value => value.split(' ')[0]); // Verify the correct row IDs exist const expectedRowIds = ['C', 'P', 'L', 'D']; const allExist = rowIds.every(rowId => expectedRowIds.includes(rowId)); expect(allExist).toBe(true); }); } }"
|
|
7594
|
-
},
|
|
7595
|
-
{
|
|
7596
|
-
"kind": "variable",
|
|
7597
|
-
"name": "meta",
|
|
7598
|
-
"type": {
|
|
7599
|
-
"text": "Meta<typeof ItemContainer & { 'item-url': string }>"
|
|
7600
|
-
},
|
|
7601
|
-
"default": "{ component: 'item-container', args: { ...args, 'item-url': 'assets/qti-item/example-choice-item.xml' }, argTypes, parameters: { actions: { handles: events } } // tags: ['autodocs', 'new'] }"
|
|
7602
|
-
},
|
|
7603
|
-
{
|
|
7604
|
-
"kind": "variable",
|
|
7605
|
-
"name": "MultipleInteractions",
|
|
7606
|
-
"type": {
|
|
7607
|
-
"text": "Story"
|
|
7608
|
-
},
|
|
7609
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-multiple-interactions.xml' // Set the new item URL here }, render: args => html` <qti-item> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> <!-- </div> --> </qti-item>`, play: async ({ canvasElement, step }) => { // // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); const interactions = await waitFor(() => { const itemContainer = canvasElement.querySelector('item-container'); if (!itemContainer) { throw new Error('Item container not found'); } if (!itemContainer.shadowRoot) { throw new Error('Shadow root not found'); } if (!itemContainer.shadowRoot.querySelector('qti-inline-choice-interaction')) { throw new Error('qti-inline-choice-interaction not found'); } return itemContainer.shadowRoot.querySelectorAll('qti-inline-choice-interaction'); }); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); }); await step('Verify correct response state is applied', async () => { for (const interaction of interactions) { const feedback = interaction.shadowRoot.querySelector('[part=\"correct-option\"]'); expect(feedback).not.toBeNull(); } }); } }"
|
|
7610
|
-
},
|
|
7611
|
-
{
|
|
7612
|
-
"kind": "variable",
|
|
7613
|
-
"name": "MultipleResponseFullCorrectResponse",
|
|
7614
|
-
"type": {
|
|
7615
|
-
"text": "Story"
|
|
7616
|
-
},
|
|
7617
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-choice-multiple-item.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'full' }; const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); await step('Select the correct response mode full', async () => { await fireEvent.click(showCorrectButton); await step('Verify correct response full state is applied', async () => { const fullCorrectResponse = await canvas.findByShadowRole('full-correct-response'); expect(fullCorrectResponse).toBeVisible(); const interaction = fullCorrectResponse.querySelector('qti-choice-interaction'); const choices = Array.from(interaction.querySelectorAll('qti-simple-choice')); await interaction.updateComplete; expect(choices[0].internals.states.has('--checked')).toBe(true); expect(choices[1].internals.states.has('--checked')).toBe(true); expect(choices[2].internals.states.has('--checked')).toBe(false); }); }); } }"
|
|
7618
|
-
},
|
|
7619
|
-
{
|
|
7620
|
-
"kind": "variable",
|
|
7621
|
-
"name": "MultipleResponseInternalCorrectResponse",
|
|
7622
|
-
"type": {
|
|
7623
|
-
"text": "Story"
|
|
7624
|
-
},
|
|
7625
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-choice-multiple-item.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const item = document.querySelector('qti-item'); item.configContext = { correctResponseMode: 'internal' }; // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); // const choices = await canvas.findAllByShadowRole('radio'); const choiceA: QtiSimpleChoice = await canvas.findByShadowText('This is correct.'); const choiceB: QtiSimpleChoice = await canvas.findByShadowText('This is also correct.'); const choiceC: QtiSimpleChoice = await canvas.findByShadowText('This is wrong.'); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); await step('Verify correct response state is applied', async () => { expect(choiceA.internals.states.has('correct-response')).toBe(true); expect(choiceB.internals.states.has('correct-response')).toBe(true); expect(choiceC.internals.states.has('correct-response')).toBe(false); expect(choiceA.internals.states.has('incorrect-response')).toBe(false); expect(choiceB.internals.states.has('incorrect-response')).toBe(false); expect(choiceC.internals.states.has('incorrect-response')).toBe(true); }); }); } }"
|
|
7626
|
-
},
|
|
7627
|
-
{
|
|
7628
|
-
"kind": "variable",
|
|
7629
|
-
"name": "NoCorrectResponse",
|
|
7630
|
-
"type": {
|
|
7631
|
-
"text": "Story"
|
|
7632
|
-
},
|
|
7633
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-choice-nocorrect-item.xml' // Set the new item URL here }, render: args => html` <qti-item> <item-container style=\"width: 400px; height: 350px; display: block;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> <!-- </div> --> </qti-item>`, play: async ({ canvasElement, step }) => { // // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); await canvas.findByShadowText('You must stay with your luggage at all times.'); const _ = canvas.getAllByShadowText(/No correct response specified/i)[0]; const itemShowCorrect = canvasElement.querySelector('item-show-correct-response'); await step('Verify the Show Correct button is disabled', async () => { expect(itemShowCorrect.disabled).toBe(true); }); } }"
|
|
7634
|
-
},
|
|
7635
|
-
{
|
|
7636
|
-
"kind": "variable",
|
|
7637
|
-
"name": "SelectPoint",
|
|
7638
|
-
"type": {
|
|
7639
|
-
"text": "Story"
|
|
7640
|
-
},
|
|
7641
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/select_point.xml' // Set the new item URL here }, render: args => html`<qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choice to be rendered const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction = item.querySelector('qti-select-point-interaction'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const correctIndication = interaction.shadowRoot.querySelector('[alt=\"correct-response-1\"]'); expect(correctIndication).not.toBeNull(); }); } }"
|
|
7642
|
-
},
|
|
7643
|
-
{
|
|
7644
|
-
"kind": "variable",
|
|
7645
|
-
"name": "SelectPointMultipleNoAreaMapping",
|
|
7646
|
-
"type": {
|
|
7647
|
-
"text": "Story"
|
|
7648
|
-
},
|
|
7649
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-select-point.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choices to be rendered const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction = item.querySelector('qti-select-point-interaction'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const correctIndication1 = interaction.shadowRoot.querySelector('[alt=\"correct-response-1\"]'); const correctIndication2 = interaction.shadowRoot.querySelector('[alt=\"correct-response-2\"]'); const correctIndication3 = interaction.shadowRoot.querySelector('[alt=\"correct-response-3\"]'); expect(correctIndication1).not.toBeNull(); expect(correctIndication2).not.toBeNull(); expect(correctIndication3).not.toBeNull(); }); } }"
|
|
7650
|
-
},
|
|
7651
|
-
{
|
|
7652
|
-
"kind": "variable",
|
|
7653
|
-
"name": "Slider",
|
|
7654
|
-
"type": {
|
|
7655
|
-
"text": "Story"
|
|
7656
|
-
},
|
|
7657
|
-
"default": "{ args: { 'item-url': 'assets/qti-item/example-slider.xml' // Set the new item URL here }, render: args => html` <qti-item> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { // wait for qti-simple-choices to be rendered const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction = item.querySelector('qti-slider-interaction'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const correctIndication = interaction.shadowRoot.querySelectorAll('[id=\"knob-correct\"]'); expect(correctIndication.length).toBe(1); }); } }"
|
|
7658
|
-
},
|
|
7659
|
-
{
|
|
7660
|
-
"kind": "variable",
|
|
7661
|
-
"name": "TextEntryFullCorrectResponse",
|
|
7662
|
-
"type": {
|
|
7663
|
-
"text": "Story"
|
|
7664
|
-
},
|
|
7665
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/text_entry.xml' // Set the new item URL here }, render: args => html` <qti-item navigate=\"item\"> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const test = document.querySelector('qti-item'); test.configContext = { correctResponseMode: 'full' }; const canvas = within(canvasElement); const showCorrectButton = await canvas.findByShadowText(/Show correct/i); await step('Select the correct response mode full', async () => { await fireEvent.click(showCorrectButton); await step('Verify correct response full state is applied', async () => { const fullCorrectResponse = await canvas.findByShadowRole('full-correct-response'); expect(fullCorrectResponse).toBeVisible(); }); }); } }"
|
|
7666
|
-
},
|
|
7667
|
-
{
|
|
7668
|
-
"kind": "variable",
|
|
7669
|
-
"name": "TextEntryInternalCorrectResponse",
|
|
7670
|
-
"type": {
|
|
7671
|
-
"text": "Story"
|
|
7672
|
-
},
|
|
7673
|
-
"default": "{ args: { 'item-url': 'assets/qti-test-package/items/text_entry.xml' // Set the new item URL here }, render: args => html` <qti-item navigate=\"item\"> <div> <item-container style=\"display: block;width: 400px; height: 350px;\" item-url=${args['item-url'] as string}> <template> <style> qti-assessment-item { padding: 1rem; display: block; aspect-ratio: 4 / 3; width: 800px; border: 2px solid blue; transform: scale(0.5); transform-origin: top left; } </style> </template> </item-container> <item-show-correct-response ${spread(args)}></item-show-correct-response> </div> </qti-item>`, play: async ({ canvasElement, step }) => { const test = document.querySelector('qti-item'); test.configContext = { correctResponseMode: 'internal' }; const canvas = within(canvasElement); const item = await getAssessmentItemFromItemContainer(canvasElement); const interaction = item.querySelector('qti-text-entry-interaction'); const showCorrectButton = canvas.getAllByShadowText(/Show correct/i)[0]; await step('Click on the Show Correct button', async () => { await showCorrectButton.click(); const correctElement = interaction.shadowRoot.querySelector('[part=\"correct\"]'); expect(correctElement).toBeVisible(); }); } }"
|
|
7674
|
-
}
|
|
7675
|
-
],
|
|
7676
|
-
"exports": [
|
|
7677
|
-
{
|
|
7678
|
-
"kind": "js",
|
|
7679
|
-
"name": "ChoiceFullCorrectResponse",
|
|
7680
|
-
"declaration": {
|
|
7681
|
-
"name": "ChoiceFullCorrectResponse",
|
|
7682
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7683
|
-
}
|
|
7684
|
-
},
|
|
7685
|
-
{
|
|
7686
|
-
"kind": "js",
|
|
7687
|
-
"name": "ChoiceFullCorrectResponseOnlyWhenIncorrect",
|
|
7688
|
-
"declaration": {
|
|
7689
|
-
"name": "ChoiceFullCorrectResponseOnlyWhenIncorrect",
|
|
7690
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7691
|
-
}
|
|
7692
|
-
},
|
|
7693
|
-
{
|
|
7694
|
-
"kind": "js",
|
|
7695
|
-
"name": "ChoiceInternalCorrectResponse",
|
|
7696
|
-
"declaration": {
|
|
7697
|
-
"name": "ChoiceInternalCorrectResponse",
|
|
7698
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7699
|
-
}
|
|
7700
|
-
},
|
|
7701
|
-
{
|
|
7702
|
-
"kind": "js",
|
|
7703
|
-
"name": "default",
|
|
7704
|
-
"declaration": {
|
|
7705
|
-
"name": "meta",
|
|
7706
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7707
|
-
}
|
|
7708
|
-
},
|
|
7709
|
-
{
|
|
7710
|
-
"kind": "js",
|
|
7711
|
-
"name": "Default",
|
|
7712
|
-
"declaration": {
|
|
7713
|
-
"name": "Default",
|
|
7714
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7715
|
-
}
|
|
7716
|
-
},
|
|
7717
|
-
{
|
|
7718
|
-
"kind": "js",
|
|
7719
|
-
"name": "GapMatch",
|
|
7720
|
-
"declaration": {
|
|
7721
|
-
"name": "GapMatch",
|
|
7722
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7723
|
-
}
|
|
7724
|
-
},
|
|
7725
|
-
{
|
|
7726
|
-
"kind": "js",
|
|
7727
|
-
"name": "GapMatchCorrectResponse",
|
|
7728
|
-
"declaration": {
|
|
7729
|
-
"name": "GapMatchCorrectResponse",
|
|
7730
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7731
|
-
}
|
|
7732
|
-
},
|
|
7733
|
-
{
|
|
7734
|
-
"kind": "js",
|
|
7735
|
-
"name": "GraphicAssociate",
|
|
7736
|
-
"declaration": {
|
|
7737
|
-
"name": "GraphicAssociate",
|
|
7738
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7739
|
-
}
|
|
7740
|
-
},
|
|
7741
|
-
{
|
|
7742
|
-
"kind": "js",
|
|
7743
|
-
"name": "GraphicOrder",
|
|
7744
|
-
"declaration": {
|
|
7745
|
-
"name": "GraphicOrder",
|
|
7746
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7747
|
-
}
|
|
7748
|
-
},
|
|
7749
|
-
{
|
|
7750
|
-
"kind": "js",
|
|
7751
|
-
"name": "InlineChoiceFullCorrectResponse",
|
|
7752
|
-
"declaration": {
|
|
7753
|
-
"name": "InlineChoiceFullCorrectResponse",
|
|
7754
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7755
|
-
}
|
|
7756
|
-
},
|
|
7757
|
-
{
|
|
7758
|
-
"kind": "js",
|
|
7759
|
-
"name": "InlineChoiceInternalCorrectResponse",
|
|
7760
|
-
"declaration": {
|
|
7761
|
-
"name": "InlineChoiceInternalCorrectResponse",
|
|
7762
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7763
|
-
}
|
|
7764
|
-
},
|
|
7765
|
-
{
|
|
7766
|
-
"kind": "js",
|
|
7767
|
-
"name": "Match",
|
|
7768
|
-
"declaration": {
|
|
7769
|
-
"name": "Match",
|
|
7770
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7771
|
-
}
|
|
7772
|
-
},
|
|
7773
|
-
{
|
|
7774
|
-
"kind": "js",
|
|
7775
|
-
"name": "MatchFullCorrectResponse",
|
|
7776
|
-
"declaration": {
|
|
7777
|
-
"name": "MatchFullCorrectResponse",
|
|
7778
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7779
|
-
}
|
|
7780
|
-
},
|
|
7781
|
-
{
|
|
7782
|
-
"kind": "js",
|
|
7783
|
-
"name": "MatchTabular",
|
|
7784
|
-
"declaration": {
|
|
7785
|
-
"name": "MatchTabular",
|
|
7786
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7787
|
-
}
|
|
7788
|
-
},
|
|
7789
|
-
{
|
|
7790
|
-
"kind": "js",
|
|
7791
|
-
"name": "MultipleInteractions",
|
|
7792
|
-
"declaration": {
|
|
7793
|
-
"name": "MultipleInteractions",
|
|
7794
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7795
|
-
}
|
|
7796
|
-
},
|
|
7797
|
-
{
|
|
7798
|
-
"kind": "js",
|
|
7799
|
-
"name": "MultipleResponseFullCorrectResponse",
|
|
7800
|
-
"declaration": {
|
|
7801
|
-
"name": "MultipleResponseFullCorrectResponse",
|
|
7802
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7803
|
-
}
|
|
7804
|
-
},
|
|
7805
|
-
{
|
|
7806
|
-
"kind": "js",
|
|
7807
|
-
"name": "MultipleResponseInternalCorrectResponse",
|
|
7808
|
-
"declaration": {
|
|
7809
|
-
"name": "MultipleResponseInternalCorrectResponse",
|
|
7810
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7811
|
-
}
|
|
7812
|
-
},
|
|
7813
|
-
{
|
|
7814
|
-
"kind": "js",
|
|
7815
|
-
"name": "NoCorrectResponse",
|
|
7816
|
-
"declaration": {
|
|
7817
|
-
"name": "NoCorrectResponse",
|
|
7818
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7819
|
-
}
|
|
7820
|
-
},
|
|
7821
|
-
{
|
|
7822
|
-
"kind": "js",
|
|
7823
|
-
"name": "SelectPoint",
|
|
7824
|
-
"declaration": {
|
|
7825
|
-
"name": "SelectPoint",
|
|
7826
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7827
|
-
}
|
|
7828
|
-
},
|
|
7829
|
-
{
|
|
7830
|
-
"kind": "js",
|
|
7831
|
-
"name": "SelectPointMultipleNoAreaMapping",
|
|
7832
|
-
"declaration": {
|
|
7833
|
-
"name": "SelectPointMultipleNoAreaMapping",
|
|
7834
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7835
|
-
}
|
|
7836
|
-
},
|
|
7837
|
-
{
|
|
7838
|
-
"kind": "js",
|
|
7839
|
-
"name": "Slider",
|
|
7840
|
-
"declaration": {
|
|
7841
|
-
"name": "Slider",
|
|
7842
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7843
|
-
}
|
|
7844
|
-
},
|
|
7845
|
-
{
|
|
7846
|
-
"kind": "js",
|
|
7847
|
-
"name": "TextEntryFullCorrectResponse",
|
|
7848
|
-
"declaration": {
|
|
7849
|
-
"name": "TextEntryFullCorrectResponse",
|
|
7850
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7851
|
-
}
|
|
7852
|
-
},
|
|
7853
|
-
{
|
|
7854
|
-
"kind": "js",
|
|
7855
|
-
"name": "TextEntryInternalCorrectResponse",
|
|
7856
|
-
"declaration": {
|
|
7857
|
-
"name": "TextEntryInternalCorrectResponse",
|
|
7858
|
-
"module": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.stories.ts"
|
|
7859
|
-
}
|
|
7860
|
-
}
|
|
7861
|
-
]
|
|
7862
|
-
},
|
|
7863
6922
|
{
|
|
7864
6923
|
"kind": "javascript-module",
|
|
7865
6924
|
"path": "packages/qti-item/src/components/item-show-correct-response/item-show-correct-response.ts",
|
|
@@ -9251,12 +8310,6 @@
|
|
|
9251
8310
|
}
|
|
9252
8311
|
]
|
|
9253
8312
|
},
|
|
9254
|
-
{
|
|
9255
|
-
"kind": "javascript-module",
|
|
9256
|
-
"path": "packages/qti-processing/src/components/qti-gcd/qti.gcd.spec.ts",
|
|
9257
|
-
"declarations": [],
|
|
9258
|
-
"exports": []
|
|
9259
|
-
},
|
|
9260
8313
|
{
|
|
9261
8314
|
"kind": "javascript-module",
|
|
9262
8315
|
"path": "packages/qti-processing/src/components/qti-gcd/qti.gcd.ts",
|
|
@@ -12807,103 +11860,15 @@
|
|
|
12807
11860
|
"name": "test-check-item",
|
|
12808
11861
|
"declaration": {
|
|
12809
11862
|
"name": "TestCheckItem",
|
|
12810
|
-
"module": "packages/qti-test/src/components/test-check-item/test-check-item.ts"
|
|
12811
|
-
}
|
|
12812
|
-
},
|
|
12813
|
-
{
|
|
12814
|
-
"kind": "js",
|
|
12815
|
-
"name": "TestCheckItem",
|
|
12816
|
-
"declaration": {
|
|
12817
|
-
"name": "TestCheckItem",
|
|
12818
|
-
"module": "packages/qti-test/src/components/test-check-item/test-check-item.ts"
|
|
12819
|
-
}
|
|
12820
|
-
}
|
|
12821
|
-
]
|
|
12822
|
-
},
|
|
12823
|
-
{
|
|
12824
|
-
"kind": "javascript-module",
|
|
12825
|
-
"path": "packages/qti-test/src/components/test-container/test-container.stories.ts",
|
|
12826
|
-
"declarations": [
|
|
12827
|
-
{
|
|
12828
|
-
"kind": "variable",
|
|
12829
|
-
"name": "meta",
|
|
12830
|
-
"type": {
|
|
12831
|
-
"text": "Meta<TestContainer & { 'test-url': string }>"
|
|
12832
|
-
},
|
|
12833
|
-
"default": "{ component: 'test-container', args: { ...args, 'test-url': '/assets/qti-conformance/Basic/T4-T7/assessment.xml' }, argTypes, parameters: { actions: { handles: events } } }"
|
|
12834
|
-
},
|
|
12835
|
-
{
|
|
12836
|
-
"kind": "variable",
|
|
12837
|
-
"name": "TestDoc",
|
|
12838
|
-
"type": {
|
|
12839
|
-
"text": "Story"
|
|
12840
|
-
},
|
|
12841
|
-
"default": "{ render: (_, { loaded: { testDoc } }) => { return html` <qti-test navigate=\"item\"> <test-container .testDoc=${testDoc}></test-container> </qti-test> `; }, loaders: [ async ({ args }) => { const testDoc = qtiTransformTest() .load(args['test-url']) .then(api => api.htmlDoc()); return { testDoc }; } ], play: TestURL.play, tags: ['!autodocs'] }"
|
|
12842
|
-
},
|
|
12843
|
-
{
|
|
12844
|
-
"kind": "variable",
|
|
12845
|
-
"name": "TestURL",
|
|
12846
|
-
"type": {
|
|
12847
|
-
"text": "Story"
|
|
12848
|
-
},
|
|
12849
|
-
"default": "{ render: args => { return html`<qti-test navigate=\"item\">${template(args)}</qti-test>`; }, play: async ({ canvasElement }) => { //getAssessmentItemFromTestContainerByDataTitle const testElement = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'T1 - Test Entry - Item 1'); expect(testElement).toBeInTheDocument(); } }"
|
|
12850
|
-
},
|
|
12851
|
-
{
|
|
12852
|
-
"kind": "variable",
|
|
12853
|
-
"name": "TestWithTemplate",
|
|
12854
|
-
"type": {
|
|
12855
|
-
"text": "Story"
|
|
12856
|
-
},
|
|
12857
|
-
"default": "{ render: args => { return html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=${args['test-url']}> <template> <style> qti-assessment-test { display: block; border: 2px solid blue; } </style> </template> </test-container> </test-navigation> </qti-test> `; }, play: TestURL.play, tags: ['!autodocs'] }"
|
|
12858
|
-
},
|
|
12859
|
-
{
|
|
12860
|
-
"kind": "variable",
|
|
12861
|
-
"name": "TestXML",
|
|
12862
|
-
"type": {
|
|
12863
|
-
"text": "Story"
|
|
12864
|
-
},
|
|
12865
|
-
"default": "{ render: (_, { loaded: { testXML } }) => { return html` <qti-test navigate=\"item\"> <test-container .testXML=${testXML}></test-container> </qti-test> `; }, loaders: [ async ({ args }) => { const testXML = await qtiTransformTest() .load(args['test-url']) .then(api => api.xml()); return { testXML }; } ], play: TestURL.play, tags: ['!autodocs'] }"
|
|
12866
|
-
}
|
|
12867
|
-
],
|
|
12868
|
-
"exports": [
|
|
12869
|
-
{
|
|
12870
|
-
"kind": "js",
|
|
12871
|
-
"name": "default",
|
|
12872
|
-
"declaration": {
|
|
12873
|
-
"name": "meta",
|
|
12874
|
-
"module": "packages/qti-test/src/components/test-container/test-container.stories.ts"
|
|
12875
|
-
}
|
|
12876
|
-
},
|
|
12877
|
-
{
|
|
12878
|
-
"kind": "js",
|
|
12879
|
-
"name": "TestDoc",
|
|
12880
|
-
"declaration": {
|
|
12881
|
-
"name": "TestDoc",
|
|
12882
|
-
"module": "packages/qti-test/src/components/test-container/test-container.stories.ts"
|
|
12883
|
-
}
|
|
12884
|
-
},
|
|
12885
|
-
{
|
|
12886
|
-
"kind": "js",
|
|
12887
|
-
"name": "TestURL",
|
|
12888
|
-
"declaration": {
|
|
12889
|
-
"name": "TestURL",
|
|
12890
|
-
"module": "packages/qti-test/src/components/test-container/test-container.stories.ts"
|
|
12891
|
-
}
|
|
12892
|
-
},
|
|
12893
|
-
{
|
|
12894
|
-
"kind": "js",
|
|
12895
|
-
"name": "TestWithTemplate",
|
|
12896
|
-
"declaration": {
|
|
12897
|
-
"name": "TestWithTemplate",
|
|
12898
|
-
"module": "packages/qti-test/src/components/test-container/test-container.stories.ts"
|
|
11863
|
+
"module": "packages/qti-test/src/components/test-check-item/test-check-item.ts"
|
|
12899
11864
|
}
|
|
12900
11865
|
},
|
|
12901
11866
|
{
|
|
12902
11867
|
"kind": "js",
|
|
12903
|
-
"name": "
|
|
11868
|
+
"name": "TestCheckItem",
|
|
12904
11869
|
"declaration": {
|
|
12905
|
-
"name": "
|
|
12906
|
-
"module": "packages/qti-test/src/components/test-
|
|
11870
|
+
"name": "TestCheckItem",
|
|
11871
|
+
"module": "packages/qti-test/src/components/test-check-item/test-check-item.ts"
|
|
12907
11872
|
}
|
|
12908
11873
|
}
|
|
12909
11874
|
]
|
|
@@ -13017,62 +11982,6 @@
|
|
|
13017
11982
|
}
|
|
13018
11983
|
]
|
|
13019
11984
|
},
|
|
13020
|
-
{
|
|
13021
|
-
"kind": "javascript-module",
|
|
13022
|
-
"path": "packages/qti-test/src/components/test-end-attempt/test-end-attempt.stories.ts",
|
|
13023
|
-
"declarations": [
|
|
13024
|
-
{
|
|
13025
|
-
"kind": "variable",
|
|
13026
|
-
"name": "Default",
|
|
13027
|
-
"type": {
|
|
13028
|
-
"text": "Story"
|
|
13029
|
-
},
|
|
13030
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <!-- <test-print-item-variables></test-print-item-variables> --> <test-container test-url=\"/assets/qti-test-package/assessment.xml\"></test-container> ${template(args, html`End Attempt`)} <test-next>Volgende</test-next> </test-navigation> </qti-test>` }"
|
|
13031
|
-
},
|
|
13032
|
-
{
|
|
13033
|
-
"kind": "variable",
|
|
13034
|
-
"name": "meta",
|
|
13035
|
-
"type": {
|
|
13036
|
-
"text": "Meta<TestEndAttempt>"
|
|
13037
|
-
},
|
|
13038
|
-
"default": "{ component: 'test-end-attempt', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
13039
|
-
},
|
|
13040
|
-
{
|
|
13041
|
-
"kind": "variable",
|
|
13042
|
-
"name": "Test",
|
|
13043
|
-
"type": {
|
|
13044
|
-
"text": "Story"
|
|
13045
|
-
},
|
|
13046
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <!-- <test-print-item-variables> </test-print-item-variables> --> <test-container test-url=\"/assets/qti-test-package/assessment.xml\"> </test-container> <test-end-attempt ${spread(args)}>End Attempt</test-end-attempt> <test-next>Volgende</test-next> <test-item-link item-id=\"ITM-text_entry\">link</test-item-link> </test-navigation> </qti-test> `, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const link = await canvas.findByShadowText('link'); const info = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Info Start'); await fireEvent.click(link); const nextButton = await canvas.findByShadowText('Volgende'); await waitFor(() => expect(nextButton).toBeEnabled()); const firstItem = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Richard III (Take 3)'); expect(firstItem).toBeInTheDocument(); // click end attempt const endAttemptButton = await findByShadowText(canvasElement, 'End Attempt'); endAttemptButton.click(); await new Promise(resolve => setTimeout(resolve, 0)); /* why is this necessary */ // check if incorrect feedback block is visible const incorrect = await canvas.findByShadowText('Incorrect'); expect(incorrect.assignedSlot).toBeVisible(); // type York in the text field const textEntryInteraction = await canvas.findByShadowRole<HTMLInputElement>('textbox'); await userEvent.type(textEntryInteraction, 'York'); endAttemptButton.click(); await new Promise(resolve => setTimeout(resolve, 0)); /* why is this necessary */ // check if correct feedback block is visible const correct = await canvas.findByShadowText('Correct'); expect(correct.assignedSlot).toBeVisible(); } }"
|
|
13047
|
-
}
|
|
13048
|
-
],
|
|
13049
|
-
"exports": [
|
|
13050
|
-
{
|
|
13051
|
-
"kind": "js",
|
|
13052
|
-
"name": "default",
|
|
13053
|
-
"declaration": {
|
|
13054
|
-
"name": "meta",
|
|
13055
|
-
"module": "packages/qti-test/src/components/test-end-attempt/test-end-attempt.stories.ts"
|
|
13056
|
-
}
|
|
13057
|
-
},
|
|
13058
|
-
{
|
|
13059
|
-
"kind": "js",
|
|
13060
|
-
"name": "Default",
|
|
13061
|
-
"declaration": {
|
|
13062
|
-
"name": "Default",
|
|
13063
|
-
"module": "packages/qti-test/src/components/test-end-attempt/test-end-attempt.stories.ts"
|
|
13064
|
-
}
|
|
13065
|
-
},
|
|
13066
|
-
{
|
|
13067
|
-
"kind": "js",
|
|
13068
|
-
"name": "Test",
|
|
13069
|
-
"declaration": {
|
|
13070
|
-
"name": "Test",
|
|
13071
|
-
"module": "packages/qti-test/src/components/test-end-attempt/test-end-attempt.stories.ts"
|
|
13072
|
-
}
|
|
13073
|
-
}
|
|
13074
|
-
]
|
|
13075
|
-
},
|
|
13076
11985
|
{
|
|
13077
11986
|
"kind": "javascript-module",
|
|
13078
11987
|
"path": "packages/qti-test/src/components/test-end-attempt/test-end-attempt.ts",
|
|
@@ -13111,46 +12020,6 @@
|
|
|
13111
12020
|
}
|
|
13112
12021
|
]
|
|
13113
12022
|
},
|
|
13114
|
-
{
|
|
13115
|
-
"kind": "javascript-module",
|
|
13116
|
-
"path": "packages/qti-test/src/components/test-item-link/test-item-link.stories.ts",
|
|
13117
|
-
"declarations": [
|
|
13118
|
-
{
|
|
13119
|
-
"kind": "variable",
|
|
13120
|
-
"name": "Default",
|
|
13121
|
-
"type": {
|
|
13122
|
-
"text": "Story"
|
|
13123
|
-
},
|
|
13124
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/api/biologie/assessment.xml\"></test-container> ${template(args, html`Link to item`)} </test-navigation> </qti-test>` }"
|
|
13125
|
-
},
|
|
13126
|
-
{
|
|
13127
|
-
"kind": "variable",
|
|
13128
|
-
"name": "meta",
|
|
13129
|
-
"type": {
|
|
13130
|
-
"text": "Meta<TestItemLink>"
|
|
13131
|
-
},
|
|
13132
|
-
"default": "{ component: 'test-item-link', args: { ...args }, // itemId: 'ITM-32cjnu' - private property, set via attribute argTypes, parameters: { actions: { handles: events } } }"
|
|
13133
|
-
}
|
|
13134
|
-
],
|
|
13135
|
-
"exports": [
|
|
13136
|
-
{
|
|
13137
|
-
"kind": "js",
|
|
13138
|
-
"name": "default",
|
|
13139
|
-
"declaration": {
|
|
13140
|
-
"name": "meta",
|
|
13141
|
-
"module": "packages/qti-test/src/components/test-item-link/test-item-link.stories.ts"
|
|
13142
|
-
}
|
|
13143
|
-
},
|
|
13144
|
-
{
|
|
13145
|
-
"kind": "js",
|
|
13146
|
-
"name": "Default",
|
|
13147
|
-
"declaration": {
|
|
13148
|
-
"name": "Default",
|
|
13149
|
-
"module": "packages/qti-test/src/components/test-item-link/test-item-link.stories.ts"
|
|
13150
|
-
}
|
|
13151
|
-
}
|
|
13152
|
-
]
|
|
13153
|
-
},
|
|
13154
12023
|
{
|
|
13155
12024
|
"kind": "javascript-module",
|
|
13156
12025
|
"path": "packages/qti-test/src/components/test-item-link/test-item-link.ts",
|
|
@@ -13236,46 +12105,6 @@
|
|
|
13236
12105
|
}
|
|
13237
12106
|
]
|
|
13238
12107
|
},
|
|
13239
|
-
{
|
|
13240
|
-
"kind": "javascript-module",
|
|
13241
|
-
"path": "packages/qti-test/src/components/test-navigation/test-navigation.stories.ts",
|
|
13242
|
-
"declarations": [
|
|
13243
|
-
{
|
|
13244
|
-
"kind": "variable",
|
|
13245
|
-
"name": "Default",
|
|
13246
|
-
"type": {
|
|
13247
|
-
"text": "Story"
|
|
13248
|
-
},
|
|
13249
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> ${template(args, html` <test-container test-url=\"/assets/qti-test-package/assessment.xml\"></test-container>`)} </qti-test>` }"
|
|
13250
|
-
},
|
|
13251
|
-
{
|
|
13252
|
-
"kind": "variable",
|
|
13253
|
-
"name": "meta",
|
|
13254
|
-
"type": {
|
|
13255
|
-
"text": "Meta<TestNavigation>"
|
|
13256
|
-
},
|
|
13257
|
-
"default": "{ component: 'test-navigation', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
13258
|
-
}
|
|
13259
|
-
],
|
|
13260
|
-
"exports": [
|
|
13261
|
-
{
|
|
13262
|
-
"kind": "js",
|
|
13263
|
-
"name": "default",
|
|
13264
|
-
"declaration": {
|
|
13265
|
-
"name": "meta",
|
|
13266
|
-
"module": "packages/qti-test/src/components/test-navigation/test-navigation.stories.ts"
|
|
13267
|
-
}
|
|
13268
|
-
},
|
|
13269
|
-
{
|
|
13270
|
-
"kind": "js",
|
|
13271
|
-
"name": "Default",
|
|
13272
|
-
"declaration": {
|
|
13273
|
-
"name": "Default",
|
|
13274
|
-
"module": "packages/qti-test/src/components/test-navigation/test-navigation.stories.ts"
|
|
13275
|
-
}
|
|
13276
|
-
}
|
|
13277
|
-
]
|
|
13278
|
-
},
|
|
13279
12108
|
{
|
|
13280
12109
|
"kind": "javascript-module",
|
|
13281
12110
|
"path": "packages/qti-test/src/components/test-navigation/test-navigation.ts",
|
|
@@ -13543,62 +12372,6 @@
|
|
|
13543
12372
|
}
|
|
13544
12373
|
]
|
|
13545
12374
|
},
|
|
13546
|
-
{
|
|
13547
|
-
"kind": "javascript-module",
|
|
13548
|
-
"path": "packages/qti-test/src/components/test-next/test-next.stories.ts",
|
|
13549
|
-
"declarations": [
|
|
13550
|
-
{
|
|
13551
|
-
"kind": "variable",
|
|
13552
|
-
"name": "Default",
|
|
13553
|
-
"type": {
|
|
13554
|
-
"text": "Story"
|
|
13555
|
-
},
|
|
13556
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"> </test-container> <test-prev>vorige</test-prev> ${template(args, html`volgende`)} </test-navigation> </qti-test> ` }"
|
|
13557
|
-
},
|
|
13558
|
-
{
|
|
13559
|
-
"kind": "variable",
|
|
13560
|
-
"name": "meta",
|
|
13561
|
-
"type": {
|
|
13562
|
-
"text": "Meta<TestNext>"
|
|
13563
|
-
},
|
|
13564
|
-
"default": "{ component: 'test-next', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
13565
|
-
},
|
|
13566
|
-
{
|
|
13567
|
-
"kind": "variable",
|
|
13568
|
-
"name": "Test",
|
|
13569
|
-
"type": {
|
|
13570
|
-
"text": "Story"
|
|
13571
|
-
},
|
|
13572
|
-
"default": "{ render: () => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"> </test-container> <test-prev>vorige</test-prev> <test-next>volgende</test-next> </test-navigation> </qti-test> `, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const prevButton = canvas.getByShadowText('vorige'); const nextButton = canvas.getByShadowText('volgende'); await waitFor(() => expect(nextButton).toBeEnabled()); const firstItem = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'T1 - Test Entry - Item 1'); expect(firstItem).toBeInTheDocument(); await new Promise(resolve => setTimeout(resolve, 500)); await fireEvent.click(nextButton); const secondItem = await getAssessmentItemFromTestContainerByDataTitle( canvasElement, 'T1 - Choice Interaction - Multiple Cardinality' ); expect(secondItem).toBeInTheDocument(); await fireEvent.click(nextButton); await new Promise(resolve => setTimeout(resolve, 1)); // minimal time to let the next button know about the update on sessionContext await fireEvent.click(nextButton); await new Promise(resolve => setTimeout(resolve, 1)); // minimal time to let the next button know about the update on sessionContext await fireEvent.click(nextButton); await new Promise(resolve => setTimeout(resolve, 1)); // minimal time to let the next button know about the update on sessionContext expect(nextButton).toBeDisabled(); await fireEvent.click(prevButton); await new Promise(resolve => setTimeout(resolve, 1)); // minimal time to let the next button know about the update on sessionContext expect(nextButton).toBeEnabled(); } }"
|
|
13573
|
-
}
|
|
13574
|
-
],
|
|
13575
|
-
"exports": [
|
|
13576
|
-
{
|
|
13577
|
-
"kind": "js",
|
|
13578
|
-
"name": "default",
|
|
13579
|
-
"declaration": {
|
|
13580
|
-
"name": "meta",
|
|
13581
|
-
"module": "packages/qti-test/src/components/test-next/test-next.stories.ts"
|
|
13582
|
-
}
|
|
13583
|
-
},
|
|
13584
|
-
{
|
|
13585
|
-
"kind": "js",
|
|
13586
|
-
"name": "Default",
|
|
13587
|
-
"declaration": {
|
|
13588
|
-
"name": "Default",
|
|
13589
|
-
"module": "packages/qti-test/src/components/test-next/test-next.stories.ts"
|
|
13590
|
-
}
|
|
13591
|
-
},
|
|
13592
|
-
{
|
|
13593
|
-
"kind": "js",
|
|
13594
|
-
"name": "Test",
|
|
13595
|
-
"declaration": {
|
|
13596
|
-
"name": "Test",
|
|
13597
|
-
"module": "packages/qti-test/src/components/test-next/test-next.stories.ts"
|
|
13598
|
-
}
|
|
13599
|
-
}
|
|
13600
|
-
]
|
|
13601
|
-
},
|
|
13602
12375
|
{
|
|
13603
12376
|
"kind": "javascript-module",
|
|
13604
12377
|
"path": "packages/qti-test/src/components/test-next/test-next.ts",
|
|
@@ -13762,62 +12535,6 @@
|
|
|
13762
12535
|
}
|
|
13763
12536
|
]
|
|
13764
12537
|
},
|
|
13765
|
-
{
|
|
13766
|
-
"kind": "javascript-module",
|
|
13767
|
-
"path": "packages/qti-test/src/components/test-paging-buttons-stamp/test-paging-buttons-stamp.stories.ts",
|
|
13768
|
-
"declarations": [
|
|
13769
|
-
{
|
|
13770
|
-
"kind": "variable",
|
|
13771
|
-
"name": "Default",
|
|
13772
|
-
"type": {
|
|
13773
|
-
"text": "Story"
|
|
13774
|
-
},
|
|
13775
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/api/biologie/assessment.xml\"></test-container> ${template( args, html`<template> <test-item-link item-id=\"{{ item.identifier }}\"> {{ item.index }} </test-item-link> </template>` )} </test-navigation> </qti-test>` }"
|
|
13776
|
-
},
|
|
13777
|
-
{
|
|
13778
|
-
"kind": "variable",
|
|
13779
|
-
"name": "meta",
|
|
13780
|
-
"type": {
|
|
13781
|
-
"text": "Meta<TestPagingButtonsStamp>"
|
|
13782
|
-
},
|
|
13783
|
-
"default": "{ component: 'test-paging-buttons-stamp', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
13784
|
-
},
|
|
13785
|
-
{
|
|
13786
|
-
"kind": "variable",
|
|
13787
|
-
"name": "Title",
|
|
13788
|
-
"type": {
|
|
13789
|
-
"text": "Story"
|
|
13790
|
-
},
|
|
13791
|
-
"default": "{ render: () => html` <qti-test auto-score-items> <test-navigation .initContext=${[ { identifier: 'ITEM001', title: 'Test title', volgnummer: 2 }, { identifier: 'ITEM002', title: 'Test title 2', volgnummer: 2 } ]} .configContext=${{ infoItemCategory: 'info' }} .sessionContext=${{ navItemRefId: 'ITEM001' }} > <test-container test-url=\"/assets/api/kennisnet-1/AssessmentTest.xml\"></test-container> <test-paging-buttons-stamp data-testid=\"paging-buttons\"> <style> dl { display: grid; grid-template-columns: max-content 1fr; column-gap: 10px; } dt { font-weight: bold; } dd { margin: 0; /* Remove default margin */ } </style> <template> <test-item-link class=\"{{item.active ? 'active' : ''}}\" item-id=\"{{ item.identifier }}\" >{{ item.index }}:{{ item.title }}</test-item-link > </template> </test-paging-buttons-stamp> </test-navigation> </qti-test> `, play: async ({ canvasElement }) => { const canvas = within(canvasElement); // expect(nextButton).toBeDisabled(); const pagingButtons = await canvas.findByTestId('paging-buttons'); await waitFor( () => { const button = pagingButtons.querySelector('test-item-link'); if (!button) { throw new Error('interaction not loaded yet'); } }, { timeout: 5000 } ); // const allButtons = pagingButtons.querySelectorAll('test-item-link'); // waitFor(() => expect(allButtons[0].textContent).toBe(':')); // waitFor(() => expect(allButtons[1].textContent).toBe('1:Test title')); // await new Promise(resolve => setTimeout(resolve, 500)); // await fireEvent.click(allButtons[6]); // await new Promise(resolve => setTimeout(resolve, 500)); // waitFor(() => expect(allButtons[0].textContent).toBe(':')); // expect(allButtons[0].textContent).toBe('1:'); // const firstItem = await findByShadowTitle(canvasElement, 'T1 - Test Entry - Item 1'); // expect(firstItem).toBeInTheDocument(); // await new Promise(resolve => setTimeout(resolve, 50)); // await fireEvent.click(linkButton); // await new Promise(resolve => setTimeout(resolve, 50)); // const secondItem = await findByShadowTitle(canvasElement, 'T1 - Choice Interaction - Multiple Cardinality'); // expect(secondItem).toBeInTheDocument(); // await fireEvent.click(linkButton); // await new Promise(resolve => setTimeout(resolve, 50)); // await fireEvent.click(linkButton); // await new Promise(resolve => setTimeout(resolve, 50)); // expect(linkButton).toBeDisabled(); } }"
|
|
13792
|
-
}
|
|
13793
|
-
],
|
|
13794
|
-
"exports": [
|
|
13795
|
-
{
|
|
13796
|
-
"kind": "js",
|
|
13797
|
-
"name": "default",
|
|
13798
|
-
"declaration": {
|
|
13799
|
-
"name": "meta",
|
|
13800
|
-
"module": "packages/qti-test/src/components/test-paging-buttons-stamp/test-paging-buttons-stamp.stories.ts"
|
|
13801
|
-
}
|
|
13802
|
-
},
|
|
13803
|
-
{
|
|
13804
|
-
"kind": "js",
|
|
13805
|
-
"name": "Default",
|
|
13806
|
-
"declaration": {
|
|
13807
|
-
"name": "Default",
|
|
13808
|
-
"module": "packages/qti-test/src/components/test-paging-buttons-stamp/test-paging-buttons-stamp.stories.ts"
|
|
13809
|
-
}
|
|
13810
|
-
},
|
|
13811
|
-
{
|
|
13812
|
-
"kind": "js",
|
|
13813
|
-
"name": "Title",
|
|
13814
|
-
"declaration": {
|
|
13815
|
-
"name": "Title",
|
|
13816
|
-
"module": "packages/qti-test/src/components/test-paging-buttons-stamp/test-paging-buttons-stamp.stories.ts"
|
|
13817
|
-
}
|
|
13818
|
-
}
|
|
13819
|
-
]
|
|
13820
|
-
},
|
|
13821
12538
|
{
|
|
13822
12539
|
"kind": "javascript-module",
|
|
13823
12540
|
"path": "packages/qti-test/src/components/test-paging-buttons-stamp/test-paging-buttons-stamp.ts",
|
|
@@ -13892,62 +12609,6 @@
|
|
|
13892
12609
|
}
|
|
13893
12610
|
]
|
|
13894
12611
|
},
|
|
13895
|
-
{
|
|
13896
|
-
"kind": "javascript-module",
|
|
13897
|
-
"path": "packages/qti-test/src/components/test-prev/test-prev.stories.ts",
|
|
13898
|
-
"declarations": [
|
|
13899
|
-
{
|
|
13900
|
-
"kind": "variable",
|
|
13901
|
-
"name": "Default",
|
|
13902
|
-
"type": {
|
|
13903
|
-
"text": "Story"
|
|
13904
|
-
},
|
|
13905
|
-
"default": "{ render: () => html` <qti-test> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"> </test-container> ${template(args, html`vorige`)} <test-next>volgende</test-next> </test-navigation> </qti-test> ` }"
|
|
13906
|
-
},
|
|
13907
|
-
{
|
|
13908
|
-
"kind": "variable",
|
|
13909
|
-
"name": "meta",
|
|
13910
|
-
"type": {
|
|
13911
|
-
"text": "Meta<TestPrev>"
|
|
13912
|
-
},
|
|
13913
|
-
"default": "{ component: 'test-prev', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
13914
|
-
},
|
|
13915
|
-
{
|
|
13916
|
-
"kind": "variable",
|
|
13917
|
-
"name": "Test",
|
|
13918
|
-
"type": {
|
|
13919
|
-
"text": "Story"
|
|
13920
|
-
},
|
|
13921
|
-
"default": "{ render: () => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"> </test-container> <test-prev>vorige</test-prev> <test-next>volgende</test-next> </test-navigation> <test-item-link item-id=\"t1-test-entry-item4\">link</test-item-link> </qti-test> `, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const link = await canvas.findByShadowText('link'); await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'T1 - Test Entry - Item 1'); await fireEvent.click(link); const prevButton = canvas.getByShadowText('vorige'); const nextButton = canvas.getByShadowText('volgende'); expect(prevButton).toBeDisabled(); const firstItem = await getAssessmentItemFromTestContainerByDataTitle( canvasElement, 'T1 - Extended Text Interaction' ); expect(prevButton).not.toBeDisabled(); expect(firstItem).toBeInTheDocument(); await new Promise(resolve => setTimeout(resolve, 1)); await fireEvent.click(prevButton); await new Promise(resolve => setTimeout(resolve, 1)); await fireEvent.click(prevButton); await new Promise(resolve => setTimeout(resolve, 1)); await fireEvent.click(prevButton); const secondItem = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'T1 - Test Entry - Item 1'); expect(secondItem).toBeInTheDocument(); expect(prevButton).toBeDisabled(); await fireEvent.click(nextButton); await new Promise(resolve => setTimeout(resolve, 1)); expect(prevButton).not.toBeDisabled(); } }"
|
|
13922
|
-
}
|
|
13923
|
-
],
|
|
13924
|
-
"exports": [
|
|
13925
|
-
{
|
|
13926
|
-
"kind": "js",
|
|
13927
|
-
"name": "default",
|
|
13928
|
-
"declaration": {
|
|
13929
|
-
"name": "meta",
|
|
13930
|
-
"module": "packages/qti-test/src/components/test-prev/test-prev.stories.ts"
|
|
13931
|
-
}
|
|
13932
|
-
},
|
|
13933
|
-
{
|
|
13934
|
-
"kind": "js",
|
|
13935
|
-
"name": "Default",
|
|
13936
|
-
"declaration": {
|
|
13937
|
-
"name": "Default",
|
|
13938
|
-
"module": "packages/qti-test/src/components/test-prev/test-prev.stories.ts"
|
|
13939
|
-
}
|
|
13940
|
-
},
|
|
13941
|
-
{
|
|
13942
|
-
"kind": "js",
|
|
13943
|
-
"name": "Test",
|
|
13944
|
-
"declaration": {
|
|
13945
|
-
"name": "Test",
|
|
13946
|
-
"module": "packages/qti-test/src/components/test-prev/test-prev.stories.ts"
|
|
13947
|
-
}
|
|
13948
|
-
}
|
|
13949
|
-
]
|
|
13950
|
-
},
|
|
13951
12612
|
{
|
|
13952
12613
|
"kind": "javascript-module",
|
|
13953
12614
|
"path": "packages/qti-test/src/components/test-prev/test-prev.ts",
|
|
@@ -14087,46 +12748,6 @@
|
|
|
14087
12748
|
}
|
|
14088
12749
|
]
|
|
14089
12750
|
},
|
|
14090
|
-
{
|
|
14091
|
-
"kind": "javascript-module",
|
|
14092
|
-
"path": "packages/qti-test/src/components/test-print-context/test-print-context.stories.ts",
|
|
14093
|
-
"declarations": [
|
|
14094
|
-
{
|
|
14095
|
-
"kind": "variable",
|
|
14096
|
-
"name": "Default",
|
|
14097
|
-
"type": {
|
|
14098
|
-
"text": "Story"
|
|
14099
|
-
},
|
|
14100
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/api/biologie/assessment.xml\"></test-container> ${template(args)} <test-next>Volgende</test-next> </test-navigation> </qti-test>` }"
|
|
14101
|
-
},
|
|
14102
|
-
{
|
|
14103
|
-
"kind": "variable",
|
|
14104
|
-
"name": "meta",
|
|
14105
|
-
"type": {
|
|
14106
|
-
"text": "Meta<TestPrintContext>"
|
|
14107
|
-
},
|
|
14108
|
-
"default": "{ component: 'test-print-context', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
14109
|
-
}
|
|
14110
|
-
],
|
|
14111
|
-
"exports": [
|
|
14112
|
-
{
|
|
14113
|
-
"kind": "js",
|
|
14114
|
-
"name": "default",
|
|
14115
|
-
"declaration": {
|
|
14116
|
-
"name": "meta",
|
|
14117
|
-
"module": "packages/qti-test/src/components/test-print-context/test-print-context.stories.ts"
|
|
14118
|
-
}
|
|
14119
|
-
},
|
|
14120
|
-
{
|
|
14121
|
-
"kind": "js",
|
|
14122
|
-
"name": "Default",
|
|
14123
|
-
"declaration": {
|
|
14124
|
-
"name": "Default",
|
|
14125
|
-
"module": "packages/qti-test/src/components/test-print-context/test-print-context.stories.ts"
|
|
14126
|
-
}
|
|
14127
|
-
}
|
|
14128
|
-
]
|
|
14129
|
-
},
|
|
14130
12751
|
{
|
|
14131
12752
|
"kind": "javascript-module",
|
|
14132
12753
|
"path": "packages/qti-test/src/components/test-print-context/test-print-context.ts",
|
|
@@ -14145,74 +12766,34 @@
|
|
|
14145
12766
|
"privacy": "public",
|
|
14146
12767
|
"parsedType": {
|
|
14147
12768
|
"text": "{ view: '' | 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor', identifier: string, title: string, testParts: { active?: boolean; identifier: string; navigationMode: 'linear' | 'nonlinear'; submissionMode: 'individual' | 'simultaneous'; sections: { active?: boolean; identifier: string; title: string; completed?: boolean; items: ComputedItem[]; }[]; }[] } | undefined"
|
|
14148
|
-
}
|
|
14149
|
-
}
|
|
14150
|
-
],
|
|
14151
|
-
"superclass": {
|
|
14152
|
-
"name": "LitElement",
|
|
14153
|
-
"package": "lit"
|
|
14154
|
-
},
|
|
14155
|
-
"tagName": "test-print-context",
|
|
14156
|
-
"customElement": true,
|
|
14157
|
-
"modulePath": "packages/qti-test/src/components/test-print-context/test-print-context.ts",
|
|
14158
|
-
"definitionPath": "packages/qti-test/src/components/test-print-context/test-print-context.ts"
|
|
14159
|
-
}
|
|
14160
|
-
],
|
|
14161
|
-
"exports": [
|
|
14162
|
-
{
|
|
14163
|
-
"kind": "custom-element-definition",
|
|
14164
|
-
"name": "test-print-context",
|
|
14165
|
-
"declaration": {
|
|
14166
|
-
"name": "TestPrintContext",
|
|
14167
|
-
"module": "packages/qti-test/src/components/test-print-context/test-print-context.ts"
|
|
14168
|
-
}
|
|
14169
|
-
},
|
|
14170
|
-
{
|
|
14171
|
-
"kind": "js",
|
|
14172
|
-
"name": "TestPrintContext",
|
|
14173
|
-
"declaration": {
|
|
14174
|
-
"name": "TestPrintContext",
|
|
14175
|
-
"module": "packages/qti-test/src/components/test-print-context/test-print-context.ts"
|
|
14176
|
-
}
|
|
14177
|
-
}
|
|
14178
|
-
]
|
|
14179
|
-
},
|
|
14180
|
-
{
|
|
14181
|
-
"kind": "javascript-module",
|
|
14182
|
-
"path": "packages/qti-test/src/components/test-print-item-variables/test-print-item-variables.stories.ts",
|
|
14183
|
-
"declarations": [
|
|
14184
|
-
{
|
|
14185
|
-
"kind": "variable",
|
|
14186
|
-
"name": "Default",
|
|
14187
|
-
"type": {
|
|
14188
|
-
"text": "Story"
|
|
14189
|
-
},
|
|
14190
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/api/biologie/assessment.xml\"></test-container> ${template(args)} <test-next>Volgende</test-next> </test-navigation> </qti-test>` }"
|
|
14191
|
-
},
|
|
14192
|
-
{
|
|
14193
|
-
"kind": "variable",
|
|
14194
|
-
"name": "meta",
|
|
14195
|
-
"type": {
|
|
14196
|
-
"text": "Meta<TestPrintVariables>"
|
|
12769
|
+
}
|
|
12770
|
+
}
|
|
12771
|
+
],
|
|
12772
|
+
"superclass": {
|
|
12773
|
+
"name": "LitElement",
|
|
12774
|
+
"package": "lit"
|
|
14197
12775
|
},
|
|
14198
|
-
"
|
|
12776
|
+
"tagName": "test-print-context",
|
|
12777
|
+
"customElement": true,
|
|
12778
|
+
"modulePath": "packages/qti-test/src/components/test-print-context/test-print-context.ts",
|
|
12779
|
+
"definitionPath": "packages/qti-test/src/components/test-print-context/test-print-context.ts"
|
|
14199
12780
|
}
|
|
14200
12781
|
],
|
|
14201
12782
|
"exports": [
|
|
14202
12783
|
{
|
|
14203
|
-
"kind": "
|
|
14204
|
-
"name": "
|
|
12784
|
+
"kind": "custom-element-definition",
|
|
12785
|
+
"name": "test-print-context",
|
|
14205
12786
|
"declaration": {
|
|
14206
|
-
"name": "
|
|
14207
|
-
"module": "packages/qti-test/src/components/test-print-
|
|
12787
|
+
"name": "TestPrintContext",
|
|
12788
|
+
"module": "packages/qti-test/src/components/test-print-context/test-print-context.ts"
|
|
14208
12789
|
}
|
|
14209
12790
|
},
|
|
14210
12791
|
{
|
|
14211
12792
|
"kind": "js",
|
|
14212
|
-
"name": "
|
|
12793
|
+
"name": "TestPrintContext",
|
|
14213
12794
|
"declaration": {
|
|
14214
|
-
"name": "
|
|
14215
|
-
"module": "packages/qti-test/src/components/test-print-
|
|
12795
|
+
"name": "TestPrintContext",
|
|
12796
|
+
"module": "packages/qti-test/src/components/test-print-context/test-print-context.ts"
|
|
14216
12797
|
}
|
|
14217
12798
|
}
|
|
14218
12799
|
]
|
|
@@ -14267,62 +12848,6 @@
|
|
|
14267
12848
|
}
|
|
14268
12849
|
]
|
|
14269
12850
|
},
|
|
14270
|
-
{
|
|
14271
|
-
"kind": "javascript-module",
|
|
14272
|
-
"path": "packages/qti-test/src/components/test-scoring-buttons/test-scoring-buttons.stories.ts",
|
|
14273
|
-
"declarations": [
|
|
14274
|
-
{
|
|
14275
|
-
"kind": "variable",
|
|
14276
|
-
"name": "Default",
|
|
14277
|
-
"type": {
|
|
14278
|
-
"text": "Story"
|
|
14279
|
-
},
|
|
14280
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/test-scoring-buttons/assessment.xml\"></test-container> ${template( args, html`<template> <template type=\"repeat\" repeat=\"{{ scores }}\"> <label> <input type=\"radio\" ?checked=\"{{item == score}}\" name=\"scoring-buttons\" value=\"{{item}}\" /> <span>{{ item }}</span> </label> </template> </template>` )} <test-next>Volgende</test-next> <test-stamp> <template> {{ item.score }} </template> </test-stamp> </test-navigation> </qti-test>` }"
|
|
14281
|
-
},
|
|
14282
|
-
{
|
|
14283
|
-
"kind": "variable",
|
|
14284
|
-
"name": "meta",
|
|
14285
|
-
"type": {
|
|
14286
|
-
"text": "Meta<TestScoringButtons>"
|
|
14287
|
-
},
|
|
14288
|
-
"default": "{ component: 'test-scoring-buttons', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
14289
|
-
},
|
|
14290
|
-
{
|
|
14291
|
-
"kind": "variable",
|
|
14292
|
-
"name": "Test",
|
|
14293
|
-
"type": {
|
|
14294
|
-
"text": "Story"
|
|
14295
|
-
},
|
|
14296
|
-
"default": "{ render: Default.render, play: async ({ canvasElement }) => { const assessmentTest = await getAssessmentTest(canvasElement); expect(assessmentTest).toBeInTheDocument(); // // 2 Assume the candidate rubric is not visible // const rubricElement = await canvas.findByShadowText('candidate rubric block'); // expect(rubricElement).toBeVisible(); // // 3 Select the candidate view // // 4 Wait for the candidate rubric to be visible // expect(rubricElement).toBeVisible(); // // 5 Assume correctResponse is not set // const firstChoiceElement = await canvas.findByShadowText('Correct'); // const afterStyle = getComputedStyle(firstChoiceElement, '::after'); // expect(afterStyle.content).toBe('none'); // // 6 Set the view to scorer // await userEvent.click(switchElement); // expect(afterStyle.content).not.toBe('none'); } }"
|
|
14297
|
-
}
|
|
14298
|
-
],
|
|
14299
|
-
"exports": [
|
|
14300
|
-
{
|
|
14301
|
-
"kind": "js",
|
|
14302
|
-
"name": "default",
|
|
14303
|
-
"declaration": {
|
|
14304
|
-
"name": "meta",
|
|
14305
|
-
"module": "packages/qti-test/src/components/test-scoring-buttons/test-scoring-buttons.stories.ts"
|
|
14306
|
-
}
|
|
14307
|
-
},
|
|
14308
|
-
{
|
|
14309
|
-
"kind": "js",
|
|
14310
|
-
"name": "Default",
|
|
14311
|
-
"declaration": {
|
|
14312
|
-
"name": "Default",
|
|
14313
|
-
"module": "packages/qti-test/src/components/test-scoring-buttons/test-scoring-buttons.stories.ts"
|
|
14314
|
-
}
|
|
14315
|
-
},
|
|
14316
|
-
{
|
|
14317
|
-
"kind": "js",
|
|
14318
|
-
"name": "Test",
|
|
14319
|
-
"declaration": {
|
|
14320
|
-
"name": "Test",
|
|
14321
|
-
"module": "packages/qti-test/src/components/test-scoring-buttons/test-scoring-buttons.stories.ts"
|
|
14322
|
-
}
|
|
14323
|
-
}
|
|
14324
|
-
]
|
|
14325
|
-
},
|
|
14326
12851
|
{
|
|
14327
12852
|
"kind": "javascript-module",
|
|
14328
12853
|
"path": "packages/qti-test/src/components/test-scoring-buttons/test-scoring-buttons.ts",
|
|
@@ -14514,62 +13039,6 @@
|
|
|
14514
13039
|
}
|
|
14515
13040
|
]
|
|
14516
13041
|
},
|
|
14517
|
-
{
|
|
14518
|
-
"kind": "javascript-module",
|
|
14519
|
-
"path": "packages/qti-test/src/components/test-section-buttons-stamp/test-section-buttons-stamp.stories.ts",
|
|
14520
|
-
"declarations": [
|
|
14521
|
-
{
|
|
14522
|
-
"kind": "variable",
|
|
14523
|
-
"name": "Default",
|
|
14524
|
-
"type": {
|
|
14525
|
-
"text": "Story"
|
|
14526
|
-
},
|
|
14527
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <!-- <template item-ref><div style=\"border:2px solid red\">{{ xmlDoc }}</div></template> --> <test-navigation> ${template( args, html`<template> <test-section-link section-id=\"{{ item.identifier }}\"> {{ item.identifier }} </test-section-link> </template>` )} <test-container test-url=\"/assets/qti-test-package-stimulus/assessment.xml\"></test-container> </test-navigation> </qti-test>`, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const navInfoStart = await canvas.findByShadowText('info-start'); const navBasic = await canvas.findByShadowText('basic'); const navAdvanced = await canvas.findByShadowText('advanced'); const navInfoEnd = await canvas.findByShadowText('info-end'); const firstItem = await getAssessmentItemsFromTestContainer(canvasElement); expect(firstItem[0]).toBeInTheDocument(); // Spy on event listener const eventSpy = fn(); canvasElement.addEventListener('qti-assessment-stimulus-ref-connected', eventSpy); await fireEvent.click(navInfoStart); await fireEvent.click(navBasic); // Wait until the event has been triggered four times await new Promise<void>(resolve => { const checkEventCount = () => { if (eventSpy.mock.calls.length === 4) { fireEvent.click(navAdvanced); resolve(); } else { setTimeout(checkEventCount, 10); } }; checkEventCount(); }); await fireEvent.click(navInfoEnd); const lastItem = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Info End'); expect(lastItem).toBeInTheDocument(); } }"
|
|
14528
|
-
},
|
|
14529
|
-
{
|
|
14530
|
-
"kind": "variable",
|
|
14531
|
-
"name": "meta",
|
|
14532
|
-
"type": {
|
|
14533
|
-
"text": "Meta<TestSectionButtonsStamp>"
|
|
14534
|
-
},
|
|
14535
|
-
"default": "{ component: 'test-section-buttons-stamp', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
14536
|
-
},
|
|
14537
|
-
{
|
|
14538
|
-
"kind": "variable",
|
|
14539
|
-
"name": "StimulusDeliveryPlatform",
|
|
14540
|
-
"type": {
|
|
14541
|
-
"text": "Story"
|
|
14542
|
-
},
|
|
14543
|
-
"default": "{ render: args => { const placeholderRef = createRef<HTMLElement>(); return html` <qti-test @qti-assessment-stimulus-ref-connected=${async (e: Event) => { e.preventDefault(); // this prevents the default behaviour of the item to set the stimulus content const stimulusRef = e.composedPath()[0] as QtiAssessmentStimulusRef; stimulusRef.updateStimulusRef(placeholderRef.value); }} > <test-navigation> ${template( args, html`<template> <test-section-link section-id=\"{{ item.identifier }}\"> {{ item.identifier }} </test-section-link> </template>` )} <div class=\"flex\"> <div class=\"qti-base-stimulus\" ${ref(placeholderRef)}></div> <test-container test-url=\"/assets/qti-test-package-stimulus/assessment.xml\"></test-container> </div> </test-navigation> </qti-test>`; }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const navInfoStart = await canvas.findByShadowText('info-start'); const navBasic = await canvas.findByShadowText('basic'); const navAdvanced = await canvas.findByShadowText('advanced'); const navInfoEnd = await canvas.findByShadowText('info-end'); const testContainer = await getTestContainer(canvasElement); expect(testContainer).toBeInTheDocument(); await fireEvent.click(navInfoStart); await fireEvent.click(navBasic); await fireEvent.click(navAdvanced); await fireEvent.click(navInfoEnd); const lastItem = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Info End'); expect(lastItem).toBeInTheDocument(); } }"
|
|
14544
|
-
}
|
|
14545
|
-
],
|
|
14546
|
-
"exports": [
|
|
14547
|
-
{
|
|
14548
|
-
"kind": "js",
|
|
14549
|
-
"name": "default",
|
|
14550
|
-
"declaration": {
|
|
14551
|
-
"name": "meta",
|
|
14552
|
-
"module": "packages/qti-test/src/components/test-section-buttons-stamp/test-section-buttons-stamp.stories.ts"
|
|
14553
|
-
}
|
|
14554
|
-
},
|
|
14555
|
-
{
|
|
14556
|
-
"kind": "js",
|
|
14557
|
-
"name": "Default",
|
|
14558
|
-
"declaration": {
|
|
14559
|
-
"name": "Default",
|
|
14560
|
-
"module": "packages/qti-test/src/components/test-section-buttons-stamp/test-section-buttons-stamp.stories.ts"
|
|
14561
|
-
}
|
|
14562
|
-
},
|
|
14563
|
-
{
|
|
14564
|
-
"kind": "js",
|
|
14565
|
-
"name": "StimulusDeliveryPlatform",
|
|
14566
|
-
"declaration": {
|
|
14567
|
-
"name": "StimulusDeliveryPlatform",
|
|
14568
|
-
"module": "packages/qti-test/src/components/test-section-buttons-stamp/test-section-buttons-stamp.stories.ts"
|
|
14569
|
-
}
|
|
14570
|
-
}
|
|
14571
|
-
]
|
|
14572
|
-
},
|
|
14573
13042
|
{
|
|
14574
13043
|
"kind": "javascript-module",
|
|
14575
13044
|
"path": "packages/qti-test/src/components/test-section-buttons-stamp/test-section-buttons-stamp.ts",
|
|
@@ -14644,46 +13113,6 @@
|
|
|
14644
13113
|
}
|
|
14645
13114
|
]
|
|
14646
13115
|
},
|
|
14647
|
-
{
|
|
14648
|
-
"kind": "javascript-module",
|
|
14649
|
-
"path": "packages/qti-test/src/components/test-section-link/test-section-link.stories.ts",
|
|
14650
|
-
"declarations": [
|
|
14651
|
-
{
|
|
14652
|
-
"kind": "variable",
|
|
14653
|
-
"name": "Default",
|
|
14654
|
-
"type": {
|
|
14655
|
-
"text": "Story"
|
|
14656
|
-
},
|
|
14657
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-test-package/assessment.xml\"></test-container> ${template(args, html`Link to section`)} </test-navigation> </qti-test>` }"
|
|
14658
|
-
},
|
|
14659
|
-
{
|
|
14660
|
-
"kind": "variable",
|
|
14661
|
-
"name": "meta",
|
|
14662
|
-
"type": {
|
|
14663
|
-
"text": "Meta<TestSectionLink & { 'section-id' }>"
|
|
14664
|
-
},
|
|
14665
|
-
"default": "{ component: 'test-section-link', args: { ...args, 'section-id': 'advanced' }, argTypes, parameters: { actions: { handles: events } } }"
|
|
14666
|
-
}
|
|
14667
|
-
],
|
|
14668
|
-
"exports": [
|
|
14669
|
-
{
|
|
14670
|
-
"kind": "js",
|
|
14671
|
-
"name": "default",
|
|
14672
|
-
"declaration": {
|
|
14673
|
-
"name": "meta",
|
|
14674
|
-
"module": "packages/qti-test/src/components/test-section-link/test-section-link.stories.ts"
|
|
14675
|
-
}
|
|
14676
|
-
},
|
|
14677
|
-
{
|
|
14678
|
-
"kind": "js",
|
|
14679
|
-
"name": "Default",
|
|
14680
|
-
"declaration": {
|
|
14681
|
-
"name": "Default",
|
|
14682
|
-
"module": "packages/qti-test/src/components/test-section-link/test-section-link.stories.ts"
|
|
14683
|
-
}
|
|
14684
|
-
}
|
|
14685
|
-
]
|
|
14686
|
-
},
|
|
14687
13116
|
{
|
|
14688
13117
|
"kind": "javascript-module",
|
|
14689
13118
|
"path": "packages/qti-test/src/components/test-section-link/test-section-link.ts",
|
|
@@ -14764,94 +13193,6 @@
|
|
|
14764
13193
|
}
|
|
14765
13194
|
]
|
|
14766
13195
|
},
|
|
14767
|
-
{
|
|
14768
|
-
"kind": "javascript-module",
|
|
14769
|
-
"path": "packages/qti-test/src/components/test-show-correct-response/test-show-correct-response.stories.ts",
|
|
14770
|
-
"declarations": [
|
|
14771
|
-
{
|
|
14772
|
-
"kind": "variable",
|
|
14773
|
-
"name": "Default",
|
|
14774
|
-
"type": {
|
|
14775
|
-
"text": "Story"
|
|
14776
|
-
},
|
|
14777
|
-
"default": "{ render: args => html` <qti-test> <test-navigation> <test-container test-url=\"/assets/qti-test-package/assessment.xml\"> </test-container> ${template(args, html`Show Correct`)} <test-next>Volgende</test-next> </test-navigation> </qti-test>` }"
|
|
14778
|
-
},
|
|
14779
|
-
{
|
|
14780
|
-
"kind": "variable",
|
|
14781
|
-
"name": "meta",
|
|
14782
|
-
"type": {
|
|
14783
|
-
"text": "Meta<TestShowCorrectResponse>"
|
|
14784
|
-
},
|
|
14785
|
-
"default": "{ component: 'test-show-correct-response', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
14786
|
-
},
|
|
14787
|
-
{
|
|
14788
|
-
"kind": "variable",
|
|
14789
|
-
"name": "Test",
|
|
14790
|
-
"type": {
|
|
14791
|
-
"text": "Story"
|
|
14792
|
-
},
|
|
14793
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <!-- <test-print-item-variables></test-print-item-variables> --> <test-container test-url=\"/assets/qti-test-package/assessment.xml\"> </test-container> <test-show-correct-response ${spread(args)}>Show correct</test-show-correct-response> <test-next>Volgende</test-next> <test-item-link item-id=\"ITM-text_entry\">link</test-item-link> </test-navigation> </qti-test> `, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const link = await canvas.findByShadowText('link'); await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Info Start'); await fireEvent.click(link); const nextButton = await canvas.findByShadowText('Volgende'); await waitFor(() => expect(nextButton).toBeEnabled()); const firstItem = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Richard III (Take 3)'); expect(firstItem).toBeInTheDocument(); const showCorrectButton = await findByShadowText(canvasElement, 'Show correct response'); showCorrectButton.click(); const incorrect = await canvas.findByShadowText('York'); expect(incorrect).toBeInTheDocument(); } }"
|
|
14794
|
-
},
|
|
14795
|
-
{
|
|
14796
|
-
"kind": "variable",
|
|
14797
|
-
"name": "Test2",
|
|
14798
|
-
"type": {
|
|
14799
|
-
"text": "Story"
|
|
14800
|
-
},
|
|
14801
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-test-package2/AssessmentTest.xml\"> </test-container> ${template(args, html`Show Correct`)} <test-prev>Vorige</test-prev> <test-next>Volgende</test-next> </test-navigation> </qti-test>`, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const nextButton = await canvas.findByShadowText('Volgende'); await waitFor(() => expect(nextButton).toBeEnabled()); // check if show correct button is enabled const showCorrectButton = await findByShadowText(canvasElement, 'Show correct response'); await waitFor(() => expect(showCorrectButton).toBeEnabled()); // check the first alernative const firstAlternative = await findByShadowText(canvasElement, 'Richting het noorden'); await fireEvent.click(firstAlternative); // check if the item is added under the correct item-ref const itemRef = firstAlternative.closest('qti-assessment-item-ref'); expect(itemRef.getAttribute('identifier')).toBe('ODD-13122024-124755-RES1'); // navigate to the next item await fireEvent.click(nextButton); const secondAlternative = await findByShadowText(canvasElement, 'bipolaire staat'); await fireEvent.click(secondAlternative); await fireEvent.click(nextButton); // now the same item as item1 is show, check if no alternatives are selected const choiceA = await canvas.findByShadowText('Richting het noorden'); expect((choiceA.closest('qti-simple-choice') as QtiSimpleChoice).internals.states.has('--checked')).toBe(false); const choiceC = await canvas.findByShadowText('Richting het zuiden'); await fireEvent.click(choiceC); expect((choiceC.closest('qti-simple-choice') as QtiSimpleChoice).internals.states.has('--checked')).toBe(true); const prevButton = await canvas.findByShadowText('Vorige'); await fireEvent.click(prevButton); await await findByShadowText(canvasElement, 'bipolaire staat'); await fireEvent.click(prevButton); // check if A is selected again const choiceA2 = await canvas.findByShadowText('Richting het noorden'); expect((choiceA2.closest('qti-simple-choice') as QtiSimpleChoice).internals.states.has('--checked')).toBe(true); } }"
|
|
14802
|
-
},
|
|
14803
|
-
{
|
|
14804
|
-
"kind": "variable",
|
|
14805
|
-
"name": "TestFullCorrectResponse",
|
|
14806
|
-
"type": {
|
|
14807
|
-
"text": "Story"
|
|
14808
|
-
},
|
|
14809
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <!-- <test-print-item-variables></test-print-item-variables> --> <test-container test-url=\"/assets/qti-test-package/assessment.xml\"> </test-container> <test-show-correct-response ${spread(args)}>Show correct</test-show-correct-response> <test-next>Volgende</test-next> <test-item-link item-id=\"ITM-text_entry\">link</test-item-link> </test-navigation> </qti-test> `, play: async ({ canvasElement }) => { const testNavigation = document.querySelector('test-navigation') as TestNavigation; testNavigation.configContext = { correctResponseMode: 'full' }; const canvas = within(canvasElement); const link = await canvas.findByShadowText('link'); await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Info Start'); await fireEvent.click(link); const nextButton = await canvas.findByShadowText('Volgende'); await waitFor(() => expect(nextButton).toBeEnabled()); const firstItem = await getAssessmentItemFromTestContainerByDataTitle(canvasElement, 'Richard III (Take 3)'); expect(firstItem).toBeInTheDocument(); const showCorrectButton = await findByShadowText(canvasElement, 'Show correct response'); showCorrectButton.click(); const fullCorrectResponse = await canvas.findByShadowRole('full-correct-response'); expect(fullCorrectResponse).toBeInTheDocument(); } }"
|
|
14810
|
-
}
|
|
14811
|
-
],
|
|
14812
|
-
"exports": [
|
|
14813
|
-
{
|
|
14814
|
-
"kind": "js",
|
|
14815
|
-
"name": "default",
|
|
14816
|
-
"declaration": {
|
|
14817
|
-
"name": "meta",
|
|
14818
|
-
"module": "packages/qti-test/src/components/test-show-correct-response/test-show-correct-response.stories.ts"
|
|
14819
|
-
}
|
|
14820
|
-
},
|
|
14821
|
-
{
|
|
14822
|
-
"kind": "js",
|
|
14823
|
-
"name": "Default",
|
|
14824
|
-
"declaration": {
|
|
14825
|
-
"name": "Default",
|
|
14826
|
-
"module": "packages/qti-test/src/components/test-show-correct-response/test-show-correct-response.stories.ts"
|
|
14827
|
-
}
|
|
14828
|
-
},
|
|
14829
|
-
{
|
|
14830
|
-
"kind": "js",
|
|
14831
|
-
"name": "Test",
|
|
14832
|
-
"declaration": {
|
|
14833
|
-
"name": "Test",
|
|
14834
|
-
"module": "packages/qti-test/src/components/test-show-correct-response/test-show-correct-response.stories.ts"
|
|
14835
|
-
}
|
|
14836
|
-
},
|
|
14837
|
-
{
|
|
14838
|
-
"kind": "js",
|
|
14839
|
-
"name": "Test2",
|
|
14840
|
-
"declaration": {
|
|
14841
|
-
"name": "Test2",
|
|
14842
|
-
"module": "packages/qti-test/src/components/test-show-correct-response/test-show-correct-response.stories.ts"
|
|
14843
|
-
}
|
|
14844
|
-
},
|
|
14845
|
-
{
|
|
14846
|
-
"kind": "js",
|
|
14847
|
-
"name": "TestFullCorrectResponse",
|
|
14848
|
-
"declaration": {
|
|
14849
|
-
"name": "TestFullCorrectResponse",
|
|
14850
|
-
"module": "packages/qti-test/src/components/test-show-correct-response/test-show-correct-response.stories.ts"
|
|
14851
|
-
}
|
|
14852
|
-
}
|
|
14853
|
-
]
|
|
14854
|
-
},
|
|
14855
13196
|
{
|
|
14856
13197
|
"kind": "javascript-module",
|
|
14857
13198
|
"path": "packages/qti-test/src/components/test-show-correct-response/test-show-correct-response.ts",
|
|
@@ -15023,46 +13364,6 @@
|
|
|
15023
13364
|
}
|
|
15024
13365
|
]
|
|
15025
13366
|
},
|
|
15026
|
-
{
|
|
15027
|
-
"kind": "javascript-module",
|
|
15028
|
-
"path": "packages/qti-test/src/components/test-stamp/test-stamp.stories.ts",
|
|
15029
|
-
"declarations": [
|
|
15030
|
-
{
|
|
15031
|
-
"kind": "variable",
|
|
15032
|
-
"name": "Default",
|
|
15033
|
-
"type": {
|
|
15034
|
-
"text": "Story"
|
|
15035
|
-
},
|
|
15036
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <!-- <test-print-context></test-print-context> --> ${template(args, html`<template>{{ test.title }}</template>`)} ${template( args, html` <template> <ul> <li>{{ test.identifier }}</li> <li>{{ test.title }}</li> </ul> <ul> <li>{{ testpart.items }}</li> <li>{{ testpart.active }}</li> <li>{{ testpart.identifier }}</li> <li>{{ testpart.navigationMode }}</li> <li>{{ testpart.submissionMode }}</li> </ul> <ul> <li>{{ section.title }}</li> <li>{{ section.active }}</li> <li>{{ section.identifier }}</li> <li>{{required}}</li> <li>{{fixed}}</li> <li>{{visible}}</li> <li>{{keepTogether}}</li> <li>{{ section.items }}</li> </ul> <template type=\"if\" if=\"{{ testpart.items }}\"> <template type=\"repeat\" repeat=\"{{ testpart.items }}\"> <p>{{ item.identifier }}</p> </template> </template> </template> ` )} ${template( args, html` <template> <template type=\"if\" if=\"{{ section.items }}\"> <template type=\"repeat\" repeat=\"{{ section.items }}\"> <p>{{ item.identifier }}</p> </template> </template> </template> ` )} ${template(args, html`<template>{{ item.identifier }}</template>`)} <test-container test-url=\"/assets/api/kennisnet-1/AssessmentTest.xml\"></test-container> <test-next>Volgende</test-next> </test-navigation> </qti-test>` }"
|
|
15037
|
-
},
|
|
15038
|
-
{
|
|
15039
|
-
"kind": "variable",
|
|
15040
|
-
"name": "meta",
|
|
15041
|
-
"type": {
|
|
15042
|
-
"text": "Meta<TestStamp>"
|
|
15043
|
-
},
|
|
15044
|
-
"default": "{ component: 'test-stamp', args, argTypes, parameters: { actions: { handles: events } } }"
|
|
15045
|
-
}
|
|
15046
|
-
],
|
|
15047
|
-
"exports": [
|
|
15048
|
-
{
|
|
15049
|
-
"kind": "js",
|
|
15050
|
-
"name": "default",
|
|
15051
|
-
"declaration": {
|
|
15052
|
-
"name": "meta",
|
|
15053
|
-
"module": "packages/qti-test/src/components/test-stamp/test-stamp.stories.ts"
|
|
15054
|
-
}
|
|
15055
|
-
},
|
|
15056
|
-
{
|
|
15057
|
-
"kind": "js",
|
|
15058
|
-
"name": "Default",
|
|
15059
|
-
"declaration": {
|
|
15060
|
-
"name": "Default",
|
|
15061
|
-
"module": "packages/qti-test/src/components/test-stamp/test-stamp.stories.ts"
|
|
15062
|
-
}
|
|
15063
|
-
}
|
|
15064
|
-
]
|
|
15065
|
-
},
|
|
15066
13367
|
{
|
|
15067
13368
|
"kind": "javascript-module",
|
|
15068
13369
|
"path": "packages/qti-test/src/components/test-stamp/test-stamp.ts",
|
|
@@ -15160,62 +13461,6 @@
|
|
|
15160
13461
|
}
|
|
15161
13462
|
]
|
|
15162
13463
|
},
|
|
15163
|
-
{
|
|
15164
|
-
"kind": "javascript-module",
|
|
15165
|
-
"path": "packages/qti-test/src/components/test-view-toggle/test-view-toggle.stories.ts",
|
|
15166
|
-
"declarations": [
|
|
15167
|
-
{
|
|
15168
|
-
"kind": "variable",
|
|
15169
|
-
"name": "Default",
|
|
15170
|
-
"type": {
|
|
15171
|
-
"text": "Story"
|
|
15172
|
-
},
|
|
15173
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"></test-container> ${template(args)} </test-navigation> </qti-test>` }"
|
|
15174
|
-
},
|
|
15175
|
-
{
|
|
15176
|
-
"kind": "variable",
|
|
15177
|
-
"name": "meta",
|
|
15178
|
-
"type": {
|
|
15179
|
-
"text": "Meta<TestViewToggle>"
|
|
15180
|
-
},
|
|
15181
|
-
"default": "{ component: 'test-view-toggle', args, argTypes, parameters: { actions: { handles: events } }, tags: ['no-tests'] }"
|
|
15182
|
-
},
|
|
15183
|
-
{
|
|
15184
|
-
"kind": "variable",
|
|
15185
|
-
"name": "Test",
|
|
15186
|
-
"type": {
|
|
15187
|
-
"text": "Story"
|
|
15188
|
-
},
|
|
15189
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"> </test-container> <test-view-toggle ${spread(args)} role=\"switch\"> <template> {{ view === 'scorer' ? 'Scorer' : 'Candidate'}} </template> </test-view-toggle> </test-navigation> </qti-test> `, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const switchElement = await canvas.findByShadowRole('switch'); // 1 Wait for the item to load const itemElement = await canvas.findByShadowTitle('T1 - Test Entry - Item 1'); expect(itemElement).toBeInTheDocument(); // 2 Assume the candidate rubric is not visible const rubricElement = await canvas.findByShadowText('candidate rubric block'); expect(rubricElement).toBeVisible(); // 3 Select the candidate view // 4 Wait for the candidate rubric to be visible expect(rubricElement).toBeVisible(); // 5 Assume correctResponse is not set const firstChoiceElement = await canvas.findByShadowText('Correct'); const afterStyle = getComputedStyle(firstChoiceElement, '::after'); expect(afterStyle.content).toBe('none'); // 6 Set the view to scorer await userEvent.click(switchElement); expect(afterStyle.content).not.toBe('none'); } }"
|
|
15190
|
-
}
|
|
15191
|
-
],
|
|
15192
|
-
"exports": [
|
|
15193
|
-
{
|
|
15194
|
-
"kind": "js",
|
|
15195
|
-
"name": "default",
|
|
15196
|
-
"declaration": {
|
|
15197
|
-
"name": "meta",
|
|
15198
|
-
"module": "packages/qti-test/src/components/test-view-toggle/test-view-toggle.stories.ts"
|
|
15199
|
-
}
|
|
15200
|
-
},
|
|
15201
|
-
{
|
|
15202
|
-
"kind": "js",
|
|
15203
|
-
"name": "Default",
|
|
15204
|
-
"declaration": {
|
|
15205
|
-
"name": "Default",
|
|
15206
|
-
"module": "packages/qti-test/src/components/test-view-toggle/test-view-toggle.stories.ts"
|
|
15207
|
-
}
|
|
15208
|
-
},
|
|
15209
|
-
{
|
|
15210
|
-
"kind": "js",
|
|
15211
|
-
"name": "Test",
|
|
15212
|
-
"declaration": {
|
|
15213
|
-
"name": "Test",
|
|
15214
|
-
"module": "packages/qti-test/src/components/test-view-toggle/test-view-toggle.stories.ts"
|
|
15215
|
-
}
|
|
15216
|
-
}
|
|
15217
|
-
]
|
|
15218
|
-
},
|
|
15219
13464
|
{
|
|
15220
13465
|
"kind": "javascript-module",
|
|
15221
13466
|
"path": "packages/qti-test/src/components/test-view-toggle/test-view-toggle.ts",
|
|
@@ -15293,62 +13538,6 @@
|
|
|
15293
13538
|
}
|
|
15294
13539
|
]
|
|
15295
13540
|
},
|
|
15296
|
-
{
|
|
15297
|
-
"kind": "javascript-module",
|
|
15298
|
-
"path": "packages/qti-test/src/components/test-view-toggle/test-view.stories.ts",
|
|
15299
|
-
"declarations": [
|
|
15300
|
-
{
|
|
15301
|
-
"kind": "variable",
|
|
15302
|
-
"name": "Default",
|
|
15303
|
-
"type": {
|
|
15304
|
-
"text": "Story"
|
|
15305
|
-
},
|
|
15306
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"></test-container> ${template(args)} </test-navigation> </qti-test>` }"
|
|
15307
|
-
},
|
|
15308
|
-
{
|
|
15309
|
-
"kind": "variable",
|
|
15310
|
-
"name": "meta",
|
|
15311
|
-
"type": {
|
|
15312
|
-
"text": "Meta<TestViewClass>"
|
|
15313
|
-
},
|
|
15314
|
-
"default": "{ component: 'test-view', args, argTypes, parameters: { actions: { handles: events } }, tags: ['no-tests'] }"
|
|
15315
|
-
},
|
|
15316
|
-
{
|
|
15317
|
-
"kind": "variable",
|
|
15318
|
-
"name": "Test",
|
|
15319
|
-
"type": {
|
|
15320
|
-
"text": "Story"
|
|
15321
|
-
},
|
|
15322
|
-
"default": "{ render: args => html` <qti-test navigate=\"item\"> <test-navigation> <test-container test-url=\"/assets/qti-conformance/Basic/T4-T7/assessment.xml\"> </test-container> <test-view ${spread(args)}>vorige</test-view> </test-navigation> </qti-test> `, play: async ({ canvasElement }) => { const canvas = within(canvasElement); const selectElement = await canvas.findByShadowLabelText('view'); // 1 Wait for the item to load const itemElement = await canvas.findByShadowTitle('T1 - Test Entry - Item 1'); expect(itemElement).toBeInTheDocument(); // 2 Assume the candidate rubric is not visible const rubricElement = await canvas.findByShadowText('candidate rubric block'); expect(rubricElement).toBeVisible(); // 3 Select the candidate view await userEvent.selectOptions(selectElement, 'candidate'); // 4 Wait for the candidate rubric to be visible expect(rubricElement).toBeVisible(); // 5 Assume correctResponse is not set const firstChoiceElement = await canvas.findByShadowText('Correct'); const afterStyle = getComputedStyle(firstChoiceElement, '::after'); expect(afterStyle.content).toBe('none'); // 6 Set the view to scorer await userEvent.selectOptions(selectElement, 'scorer'); // Expect the correctResponse to be visible expect(afterStyle.content).not.toBe('none'); }, args: { 'view-options': 'candidate, scorer' } }"
|
|
15323
|
-
}
|
|
15324
|
-
],
|
|
15325
|
-
"exports": [
|
|
15326
|
-
{
|
|
15327
|
-
"kind": "js",
|
|
15328
|
-
"name": "default",
|
|
15329
|
-
"declaration": {
|
|
15330
|
-
"name": "meta",
|
|
15331
|
-
"module": "packages/qti-test/src/components/test-view-toggle/test-view.stories.ts"
|
|
15332
|
-
}
|
|
15333
|
-
},
|
|
15334
|
-
{
|
|
15335
|
-
"kind": "js",
|
|
15336
|
-
"name": "Default",
|
|
15337
|
-
"declaration": {
|
|
15338
|
-
"name": "Default",
|
|
15339
|
-
"module": "packages/qti-test/src/components/test-view-toggle/test-view.stories.ts"
|
|
15340
|
-
}
|
|
15341
|
-
},
|
|
15342
|
-
{
|
|
15343
|
-
"kind": "js",
|
|
15344
|
-
"name": "Test",
|
|
15345
|
-
"declaration": {
|
|
15346
|
-
"name": "Test",
|
|
15347
|
-
"module": "packages/qti-test/src/components/test-view-toggle/test-view.stories.ts"
|
|
15348
|
-
}
|
|
15349
|
-
}
|
|
15350
|
-
]
|
|
15351
|
-
},
|
|
15352
13541
|
{
|
|
15353
13542
|
"kind": "javascript-module",
|
|
15354
13543
|
"path": "packages/qti-test/src/components/test-view-toggle/test-view.ts",
|