kinow commented on code in PR #2458:
URL: https://github.com/apache/jena/pull/2458#discussion_r1591528873
##########
jena-fuseki2/jena-fuseki-ui/eslint.config.js:
##########
Review Comment:
This replaces `.eslintrc.js`. Can't find the link in their docs, but
somewhere in the eslint 8.x to 9.x they defined the `eslint.config.js` was the
preferred form (makes sense, I think, vite, cypress, etc., follow this pattern
too).
##########
jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/datasets.cy.js:
##########
@@ -25,11 +25,17 @@ describe('datasets', () => {
describe('without any datasets', () => {
before(() => {
// Special endpoint that clears the datasets data.
- cy.request('/tests/reset')
+ cy.request({
+ url: '/tests/reset',
+ retryOnStatusCodeFailure: true
+ })
Review Comment:
It might be my environment, but for some unknown reason the fake Fuseki used
in the e2e tests started failing intermittently.
Sometimes everything worked fine, sometimes the second or third test failed.
Tried debugging it, changing settings, but couldn't understand what's
happening. Looked at the issues of Json-server but didn't find anything helpful
(the test fails with HTTP error 500 on the Json-server reply).
Cypress contains a setting to retry (4 times by default), which fixed the
test on my environemnt. Not sure what could have caused it.
##########
jena-fuseki2/jena-fuseki-ui/package.json:
##########
@@ -60,7 +62,7 @@
"sass": "^1.69.4",
"sinon": "^17.0.0",
"vite": "^5.0.12",
- "vite-plugin-istanbul": "6.0.0",
+ "vite-plugin-istanbul": "6.0.2",
Review Comment:
Le fix for the dependabot upgrade bug.
##########
jena-fuseki2/jena-fuseki-ui/src/services/mock/json-server.js:
##########
@@ -282,7 +280,7 @@ server.get('/\\$/ping', (req, res) => {
// RESET TEST DATA
server.get('/tests/reset', (req, res) => {
// Just delete the datasets to clean up for other tests to have a
- // brand new environment.
+ // brand-new environment.
Review Comment:
Sorry, IDE was a bit picky, so including this change just to satisfy it so
that it doesn't show an annoying warning.
##########
jena-fuseki2/jena-fuseki-ui/package.json:
##########
@@ -11,7 +12,7 @@
"build": "vite build",
"test:unit": "vitest run --environment jsdom",
"test:e2e": "cross-env FUSEKI_PORT=\"${FUSEKI_PORT:=3030}\"
PORT=\"${PORT:=8080}\" concurrently --names 'SERVER,CLIENT,TESTS'
--prefix-colors 'yellow,blue,green' --success 'first' --kill-others 'yarn run
serve:fuseki' 'yarn wait-on http://localhost:${FUSEKI_PORT}/$/ping && yarn run
dev' 'yarn wait-on http-get://localhost:${PORT}/index.html && cypress run $@'",
- "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
+ "lint": "eslint --fix src",
Review Comment:
They dropped the `--ext`, and now the rest can all be configured in the
config.js file.
##########
jena-fuseki2/jena-fuseki-ui/cypress.config.mjs:
##########
Review Comment:
I think I did the fix on the other project pretty quickly, except for this
file. Finding the right config for Cypress was really frustrating. Hence, an
important point to be reviewed, by generating the coverage for e2e tests :+1:
##########
jena-fuseki2/jena-fuseki-ui/src/views/dataset/Edit.vue:
##########
@@ -261,7 +261,6 @@ export default {
this.loadingGraph = true
this.selectedGraph = graphName
try {
- const dataEndpoint =
this.services['gsp-rw']['srv.endpoints'].find(endpoint => endpoint !== '') || ''
Review Comment:
Not used.
##########
jena-fuseki2/jena-fuseki-ui/src/main.js:
##########
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import { createApp, h } from 'vue'
Review Comment:
New version of eslint found several issues (I think we were ignoring some
too), so remaining changes is mainly fixing that.
--
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]