mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
This does the following: 1. Moves the WDIO code from javascript to typescript 2. Moves to use files that are `cy.ts` instead of `index.js` 3. Replace e2e to use cypress 4. Introduce back some skipped tests This is in continue to the conversation here: https://github.com/HarelM/editor/pull/3 Before: ``` "spec" Reporter: ------------------------------------------------------------------ [chrome 120.0.6099.71 linux #0-0] Running: chrome (v120.0.6099.71) on linux [chrome 120.0.6099.71 linux #0-0] Session ID: ee9a87bcfce007ac7721929c6e6234d0 [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] » /test/functional/index.js [chrome 120.0.6099.71 linux #0-0] maputnik [chrome 120.0.6099.71 linux #0-0] history [chrome 120.0.6099.71 linux #0-0] - undo/redo [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] layers [chrome 120.0.6099.71 linux #0-0] ops [chrome 120.0.6099.71 linux #0-0] ✓ delete [chrome 120.0.6099.71 linux #0-0] ✓ duplicate [chrome 120.0.6099.71 linux #0-0] ✓ hide [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] background [chrome 120.0.6099.71 linux #0-0] ✓ add [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] modify [chrome 120.0.6099.71 linux #0-0] layer [chrome 120.0.6099.71 linux #0-0] - expand/collapse [chrome 120.0.6099.71 linux #0-0] ✓ id [chrome 120.0.6099.71 linux #0-0] ✓ min-zoom [chrome 120.0.6099.71 linux #0-0] ✓ max-zoom [chrome 120.0.6099.71 linux #0-0] ✓ comments [chrome 120.0.6099.71 linux #0-0] - color [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] filter [chrome 120.0.6099.71 linux #0-0] - expand/collapse [chrome 120.0.6099.71 linux #0-0] - compound filter [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] paint [chrome 120.0.6099.71 linux #0-0] - expand/collapse [chrome 120.0.6099.71 linux #0-0] - color [chrome 120.0.6099.71 linux #0-0] - pattern [chrome 120.0.6099.71 linux #0-0] - opacity [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] json-editor [chrome 120.0.6099.71 linux #0-0] - expand/collapse [chrome 120.0.6099.71 linux #0-0] - modify [chrome 120.0.6099.71 linux #0-0] - parse error [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] fill [chrome 120.0.6099.71 linux #0-0] ✓ add [chrome 120.0.6099.71 linux #0-0] - change source [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] line [chrome 120.0.6099.71 linux #0-0] ✓ add [chrome 120.0.6099.71 linux #0-0] - groups [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] symbol [chrome 120.0.6099.71 linux #0-0] ✓ add [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] raster [chrome 120.0.6099.71 linux #0-0] ✓ add [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] circle [chrome 120.0.6099.71 linux #0-0] ✓ add [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] fill extrusion [chrome 120.0.6099.71 linux #0-0] ✓ add [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] groups [chrome 120.0.6099.71 linux #0-0] ✓ simple [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] map [chrome 120.0.6099.71 linux #0-0] zoom level [chrome 120.0.6099.71 linux #0-0] - via url [chrome 120.0.6099.71 linux #0-0] - via map controls [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] modals [chrome 120.0.6099.71 linux #0-0] open [chrome 120.0.6099.71 linux #0-0] ✓ close [chrome 120.0.6099.71 linux #0-0] - upload [chrome 120.0.6099.71 linux #0-0] ✓ load from url [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] shortcuts [chrome 120.0.6099.71 linux #0-0] ✓ open/close [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] export [chrome 120.0.6099.71 linux #0-0] ✓ close [chrome 120.0.6099.71 linux #0-0] - download [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] sources [chrome 120.0.6099.71 linux #0-0] - active sources [chrome 120.0.6099.71 linux #0-0] - public source [chrome 120.0.6099.71 linux #0-0] - add new source [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] inspect [chrome 120.0.6099.71 linux #0-0] ✓ toggle [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] style settings [chrome 120.0.6099.71 linux #0-0] ✓ name [chrome 120.0.6099.71 linux #0-0] ✓ owner [chrome 120.0.6099.71 linux #0-0] ✓ sprite url [chrome 120.0.6099.71 linux #0-0] ✓ glyphs url [chrome 120.0.6099.71 linux #0-0] ✓ maptiler access token [chrome 120.0.6099.71 linux #0-0] ✓ thunderforest access token [chrome 120.0.6099.71 linux #0-0] ✓ style renderer [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] sources [chrome 120.0.6099.71 linux #0-0] - toggle [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] screenshots [chrome 120.0.6099.71 linux #0-0] ✓ front_page [chrome 120.0.6099.71 linux #0-0] ✓ open [chrome 120.0.6099.71 linux #0-0] ✓ export [chrome 120.0.6099.71 linux #0-0] ✓ sources [chrome 120.0.6099.71 linux #0-0] ✓ style settings [chrome 120.0.6099.71 linux #0-0] ✓ inspect [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] accessibility [chrome 120.0.6099.71 linux #0-0] skip links [chrome 120.0.6099.71 linux #0-0] ✓ skip link to layer list [chrome 120.0.6099.71 linux #0-0] ✓ skip link to layer editor [chrome 120.0.6099.71 linux #0-0] ✓ skip link to map view [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] keyboard [chrome 120.0.6099.71 linux #0-0] shortcuts [chrome 120.0.6099.71 linux #0-0] ✓ ESC should unfocus [chrome 120.0.6099.71 linux #0-0] ✓ '?' should show shortcuts modal [chrome 120.0.6099.71 linux #0-0] ✓ 'o' should show open modal [chrome 120.0.6099.71 linux #0-0] ✓ 'e' should show export modal [chrome 120.0.6099.71 linux #0-0] ✓ 'd' should show sources modal [chrome 120.0.6099.71 linux #0-0] ✓ 's' should show settings modal [chrome 120.0.6099.71 linux #0-0] - 'i' should change map to inspect mode [chrome 120.0.6099.71 linux #0-0] ✓ 'm' should focus map [chrome 120.0.6099.71 linux #0-0] ✓ '!' should show debug modal [chrome 120.0.6099.71 linux #0-0] [chrome 120.0.6099.71 linux #0-0] 44 passing (58.8s) [chrome 120.0.6099.71 linux #0-0] 23 skipped ``` After: ``` accessibility skip links - skip link to layer list - skip link to layer editor - skip link to map view history ✓ undo/redo (4894ms) keyboard shortcuts ✓ ESC should unfocus (1912ms) ✓ '?' should show shortcuts modal (458ms) ✓ 'o' should show open modal (710ms) ✓ 'e' should show export modal (692ms) ✓ 'd' should show sources modal (588ms) ✓ 's' should show settings modal (894ms) ✓ 'i' should change map to inspect mode (804ms) ✓ 'm' should focus map (837ms) ✓ '!' should show debug modal (607ms) layers ops ✓ delete (4313ms) ✓ duplicate (1780ms) ✓ hide (1862ms) background ✓ add (1675ms) modify layer - expand/collapse ✓ id (3735ms) ✓ min-zoom (2209ms) ✓ max-zoom (2127ms) ✓ comments (2515ms) ✓ color (2022ms) filter - expand/collapse - compound filter paint - expand/collapse - color - pattern - opacity json-editor - expand/collapse - modify - parse error fill ✓ add (1831ms) - change source line ✓ add (1844ms) ✓ groups (687ms) symbol ✓ add (2035ms) raster ✓ add (1814ms) circle ✓ add (1867ms) fill extrusion ✓ add (1963ms) groups ✓ simple (2653ms) map zoom level ✓ via url (2279ms) ✓ via map controls (733ms) modals open ✓ close (2519ms) - upload ✓ load from url (1557ms) shortcuts ✓ open/close (1136ms) export ✓ close (755ms) - download sources - active sources - public source - add new source inspect ✓ toggle (1020ms) style settings ✓ name (1085ms) ✓ owner (1060ms) ✓ sprite url (1214ms) ✓ glyphs url (1553ms) ✓ maptiler access token (1111ms) ✓ thunderforest access token (1102ms) ✓ style renderer (922ms) sources - toggle Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✔ accessibility.cy.ts 52ms 3 - - 3 - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ history.cy.ts 00:06 1 1 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ keyboard.cy.ts 00:10 9 9 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ layers.cy.ts 00:39 28 17 - 11 - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ map.cy.ts 00:04 2 2 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ modals.cy.ts 00:16 18 12 - 6 - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 01:18 61 41 - 20 - ``` --------- Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
173 lines
5.7 KiB
JSON
173 lines
5.7 KiB
JSON
{
|
|
"name": "maputnik",
|
|
"version": "2.0.0-pre.1",
|
|
"description": "A MapLibre GL visual style editor",
|
|
"main": "''",
|
|
"scripts": {
|
|
"stats": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --config config/webpack.production.config.js --progress=profile --json > stats.json",
|
|
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --config config/webpack.production.config.js --progress=profile --color",
|
|
"profiling-build": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --config config/webpack.profiling.config.js --progress=profile --color",
|
|
"test": "cypress run",
|
|
"cy:open": "cypress open",
|
|
"start": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --progress=profile --color --config config/webpack.config.js",
|
|
"start-prod": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --progress=profile --color --config config/webpack.production.config.js",
|
|
"start-sandbox": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --disable-host-check --host 0.0.0.0 --progress=profile --color --config config/webpack.production.config.js",
|
|
"lint-js": "eslint --ext js --ext jsx src test",
|
|
"lint-css": "stylelint \"src/styles/*.scss\"",
|
|
"lint": "npm run lint-js && npm run lint-css",
|
|
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -h 0.0.0.0 -p 6006",
|
|
"build-storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider build-storybook -o build/storybook"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/maputnik/editor"
|
|
},
|
|
"author": "Lukas Martinelli",
|
|
"license": "MIT",
|
|
"homepage": "https://github.com/maputnik/editor#readme",
|
|
"dependencies": {
|
|
"@babel/runtime": "^7.17.9",
|
|
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
|
"@maplibre/maplibre-gl-style-spec": "^17.0.1",
|
|
"@mdi/react": "^1.5.0",
|
|
"array-move": "^4.0.0",
|
|
"buffer": "^6.0.3",
|
|
"classnames": "^2.3.1",
|
|
"codemirror": "^5.65.2",
|
|
"color": "^4.2.3",
|
|
"detect-browser": "^5.3.0",
|
|
"file-saver": "^2.0.5",
|
|
"json-stringify-pretty-compact": "^3.0.0",
|
|
"json-to-ast": "^2.1.0",
|
|
"jsonlint": "github:josdejong/jsonlint#85a19d7",
|
|
"lodash": "^4.17.21",
|
|
"lodash.capitalize": "^4.2.1",
|
|
"lodash.clamp": "^4.0.3",
|
|
"lodash.clonedeep": "^4.5.0",
|
|
"lodash.get": "^4.4.2",
|
|
"lodash.isequal": "^4.5.0",
|
|
"lodash.throttle": "^4.1.1",
|
|
"mapbox-gl-inspect": "^1.3.1",
|
|
"maplibre-gl": "^2.4.0",
|
|
"maputnik-design": "github:maputnik/design#172b06c",
|
|
"ol": "^6.14.1",
|
|
"ol-mapbox-style": "^7.1.1",
|
|
"prop-types": "^15.8.1",
|
|
"react": "^16.0.0",
|
|
"react-accessible-accordion": "^4.0.0",
|
|
"react-aria-menubutton": "^7.0.3",
|
|
"react-aria-modal": "^4.0.1",
|
|
"react-autobind": "^1.0.6",
|
|
"react-autocomplete": "^1.8.1",
|
|
"react-collapse": "^5.1.1",
|
|
"react-color": "^2.19.3",
|
|
"react-dom": "^16.0.0",
|
|
"react-file-reader-input": "^2.0.0",
|
|
"react-icon-base": "^2.1.2",
|
|
"react-icons": "^4.3.1",
|
|
"react-sortable-hoc": "^2.0.0",
|
|
"reconnecting-websocket": "^4.4.0",
|
|
"sass": "^1.50.0",
|
|
"slugify": "^1.6.5",
|
|
"string-hash": "^1.1.3",
|
|
"url": "^0.11.0"
|
|
},
|
|
"jshintConfig": {
|
|
"esversion": 6
|
|
},
|
|
"stylelint": {
|
|
"extends": "stylelint-config-recommended-scss",
|
|
"rules": {
|
|
"no-descending-specificity": null,
|
|
"media-feature-name-no-unknown": [
|
|
true,
|
|
{
|
|
"ignoreMediaFeatureNames": [
|
|
"prefers-reduced-motion"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"eslintConfig": {
|
|
"plugins": [
|
|
"react"
|
|
],
|
|
"extends": [
|
|
"plugin:react/recommended"
|
|
],
|
|
"env": {
|
|
"browser": true,
|
|
"node": true,
|
|
"es6": true
|
|
},
|
|
"parser": "@babel/eslint-parser",
|
|
"parserOptions": {
|
|
"ecmaVersion": 6,
|
|
"sourceType": "module",
|
|
"ecmaFeatures": {
|
|
"impliedStrict": true,
|
|
"experimentalObjectRestSpread": true,
|
|
"jsx": true
|
|
}
|
|
},
|
|
"settings": {
|
|
"react": {
|
|
"version": "detect"
|
|
}
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.17.9",
|
|
"@babel/eslint-parser": "^7.19.1",
|
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
"@babel/preset-env": "^7.16.11",
|
|
"@babel/preset-flow": "^7.16.7",
|
|
"@babel/preset-react": "^7.16.7",
|
|
"@mdi/js": "^6.6.96",
|
|
"@storybook/addon-a11y": "^6.4.20",
|
|
"@storybook/addon-actions": "^6.4.20",
|
|
"@storybook/addon-links": "^6.4.20",
|
|
"@storybook/addon-storysource": "^6.4.20",
|
|
"@storybook/addons": "^6.4.20",
|
|
"@storybook/react": "^6.4.20",
|
|
"@storybook/theming": "^6.4.20",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/uuid": "^9.0.7",
|
|
"babel-loader": "^8.2.4",
|
|
"babel-plugin-istanbul": "^6.1.1",
|
|
"babel-plugin-static-fs": "^3.0.0",
|
|
"copy-webpack-plugin": "^6.4.1",
|
|
"cors": "^2.8.5",
|
|
"cross-env": "^7.0.3",
|
|
"css-loader": "^5.2.7",
|
|
"cypress": "^13.6.1",
|
|
"eslint": "^8.12.0",
|
|
"eslint-plugin-react": "^7.29.4",
|
|
"express": "^4.17.3",
|
|
"html-webpack-inline-svg-plugin": "^2.3.0",
|
|
"html-webpack-plugin": "^4.5.2",
|
|
"istanbul": "^0.4.5",
|
|
"istanbul-lib-coverage": "^3.2.0",
|
|
"mkdirp": "^1.0.4",
|
|
"mocha": "^9.2.2",
|
|
"postcss": "^8.4.12",
|
|
"react-hot-loader": "^4.13.0",
|
|
"sass-loader": "^10.2.1",
|
|
"style-loader": "^2.0.0",
|
|
"stylelint": "^14.6.1",
|
|
"stylelint-config-recommended-scss": "^6.0.0",
|
|
"stylelint-scss": "^4.2.0",
|
|
"svg-inline-loader": "^0.8.2",
|
|
"transform-loader": "^0.2.4",
|
|
"typescript": "^4.9.5",
|
|
"uuid": "^8.3.2",
|
|
"webpack": "^4.46.0",
|
|
"webpack-bundle-analyzer": "^4.5.0",
|
|
"webpack-cleanup-plugin": "^0.5.1",
|
|
"webpack-cli": "^4.9.2",
|
|
"webpack-dev-server": "^4.8.1"
|
|
}
|
|
}
|