afs commented on PR #4052:
URL: https://github.com/apache/jena/pull/4052#issuecomment-4936305396
Looks great and much more helpful to the user.
It works for me in development (I have rebased to current main; suitable
browser cache refresh to get the javascript) but the build is failing in tests,
both on github (see the buld failure at "All checks have failed") and in a
local build:
```
tests/unit/views/dataset/upload.vue.spec.js (11 tests | 1 failed) 60ms
[INFO] ✓ returns "danger" for a file with an error 19ms
[INFO] ✓ returns "success" for a successfully uploaded file 4ms
[INFO] × returns "warning" for an active upload 7ms
[INFO] ✓ returns empty string for a file with no status 4ms
. . .
```
Longer extract of build of jena-fuseki-ui:
<details>
<summary> jena-fuseki-ui build log</summary>
```
--- frontend:2.0.1:yarn (yarn run test:unit) @ jena-fuseki-ui ---
[INFO] Running 'yarn run test:unit' in
/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui
[INFO] yarn run v1.22.17
[INFO] $ vitest run --pool=threads --environment jsdom
[INFO]
[INFO] RUN v4.1.9 /home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui
[INFO]
[INFO] ✓ tests/unit/utils/validation.spec.js (4 tests) 3ms
[INFO] ✓ tests/unit/utils/query.spec.js (1 test) 3ms
[INFO] ✓ tests/unit/components/dataset/pagination.vue.spec.js (4 tests) 40ms
[INFO] ✓ tests/unit/components/serverstatus.vue.spec.js (3 tests) 27ms
[INFO] ✓ tests/unit/services/fuseki.service.spec.js (20 tests) 15ms
[INFO] ✓ tests/unit/components/dataset/tablelisting.vue.spec.js (2 tests)
27ms
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getFileStatus > returns "danger" for a file with an error
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getFileStatus > returns "success" for a successfully uploaded file
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getFileStatus > returns "warning" for an active upload
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getFileStatus > returns empty string for a file with no status
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getUploadErrorMessage > returns the server's detailed plain-text error
response, when present
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getUploadErrorMessage > returns the message field from a JSON error response,
when present
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getUploadErrorMessage > falls back to a readable message for a generic "server"
error code
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getUploadErrorMessage > falls back to a readable message for a generic
"network" error code
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getUploadErrorMessage > returns a generic message when there is no file
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
file list validation > does not flag the form invalid just from removing the
last (failed) file
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
file list validation > still flags the form invalid on an explicit submit
attempt with no files
[INFO] [Vue warn]: Missing required prop: "datasetName"
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName".
Expected String with value "undefined", got Undefined
[INFO] at <Menu dataset-name=undefined >
[INFO] at <DatasetUpload ref="VTU_COMPONENT" >
[INFO] at <VTUROOT>
[INFO]
[INFO] ❯ tests/unit/views/dataset/upload.vue.spec.js (11 tests | 1 failed)
60ms
[INFO] ✓ returns "danger" for a file with an error 19ms
[INFO] ✓ returns "success" for a successfully uploaded file 4ms
[INFO] × returns "warning" for an active upload 7ms
[INFO] ✓ returns empty string for a file with no status 4ms
[INFO] ✓ returns the server's detailed plain-text error response,
when present 4ms
[INFO] ✓ returns the message field from a JSON error response, when
present 3ms
[INFO] ✓ falls back to a readable message for a generic "server"
error code 3ms
[INFO] ✓ falls back to a readable message for a generic "network"
error code 3ms
[INFO] ✓ returns a generic message when there is no file 3ms
[INFO] ✓ does not flag the form invalid just from removing the last
(failed) file 7ms
[INFO] ✓ still flags the form invalid on an explicit submit attempt
with no files 3ms
[INFO] stderr | tests/unit/views/dataset/query.vue.spec.js > Query view > is
created with the correct initial values
[INFO] [TypeError: Failed to parse URL from
//prefix.cc/popular/all.file.json] {
[INFO] [cause]: TypeError: Invalid URL
[INFO] at new URL (node:internal/url:840:25)
[INFO] at new URL
(file:///home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/vitest/dist/chunks/index.DC7d2Pf8.js:557:2)
[INFO] at new Request (node:internal/deps/undici/undici:11855:25)
[INFO] at fetch (node:internal/deps/undici/undici:12780:25)
[INFO] at fetch (node:internal/deps/undici/undici:17456:10)
[INFO] at fetch
(node:internal/bootstrap/web/exposed-window-or-worker:83:12)
[INFO] at Object.get
(/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:471583)
[INFO] at i.value
(/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:475070)
[INFO] at i.value
(/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:475829)
[INFO] at i.value
(/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:508044)
{
[INFO] code: 'ERR_INVALID_URL',
[INFO] input: '//prefix.cc/popular/all.file.json'
[INFO] }
[INFO] }
[INFO]
[INFO] ✓ tests/unit/views/dataset/query.vue.spec.js (1 test) 90ms
[INFO]
[INFO] ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
[INFO]
[INFO] FAIL tests/unit/views/dataset/upload.vue.spec.js > Upload.vue >
getFileStatus > returns "warning" for an active upload
[INFO] AssertionError: expected 'primary' to be 'warning' // Object.is
equality
[INFO]
[INFO] Expected: "warning"
[INFO] Received: "primary"
[INFO]
[INFO] ❯ tests/unit/views/dataset/upload.vue.spec.js:51:87
[INFO] 49| it('returns "warning" for an active upload', () => {
[INFO] 50| const wrapper = mountFunction()
[INFO] 51| expect(wrapper.vm.getFileStatus({ error: null,
success: false, a…
[INFO] |
^
[INFO] 52| })
[INFO] 53|
[INFO]
[INFO] ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
[INFO]
[INFO]
[INFO] Test Files 1 failed | 7 passed (8)
[INFO] Tests 1 failed | 45 passed (46)
[INFO] Start at 15:15:02
[INFO] Duration 1.17s (transform 547ms, setup 0ms, import 1.32s, tests
265ms, environment 3.08s)
[INFO]
[INFO] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation
about this command.
[INFO]
------------------------------------------------------------------------
```
</summary>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]