diff --git a/docker-compose.snapshots.update.yml b/docker-compose.snapshots.update.yml index 1f975791..c84bea7d 100644 --- a/docker-compose.snapshots.update.yml +++ b/docker-compose.snapshots.update.yml @@ -3,7 +3,7 @@ services: e2e: image: cypress/included:8.4.1 container_name: wisemapping-integration-tests - entrypoint: '/bin/sh -c "yarn install && yarn bootstrap && yarn test:integration"' + entrypoint: '/bin/sh -c "yarn bootstrap && yarn test:integration"' working_dir: /e2e environment: - CYPRESS_imageSnaphots=true diff --git a/docker-compose.snapshots.yml b/docker-compose.snapshots.yml index 7e8517c6..e34927de 100644 --- a/docker-compose.snapshots.yml +++ b/docker-compose.snapshots.yml @@ -3,7 +3,7 @@ services: e2e: image: cypress/included:8.4.1 container_name: wisemapping-integration-tests - entrypoint: '/bin/sh -c "yarn install && yarn bootstrap && yarn test:integration"' + entrypoint: '/bin/sh -c "yarn bootstrap && yarn test:integration"' working_dir: /e2e environment: - CYPRESS_imageSnaphots=true diff --git a/packages/editor/cypress/snapshots/playground.test.js/container.snap.png b/packages/editor/cypress/snapshots/playground.test.js/container.snap.png index 872ba950..61be91e5 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/container.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/container.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-complex.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-complex.snap.png index 1dc8be04..9a065ecc 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-complex.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-complex.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-icon-sample.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-icon-sample.snap.png index 4db1a2f8..dbb9e087 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-icon-sample.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-icon-sample.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-img-support.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-img-support.snap.png index acef2430..ae923ab2 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-img-support.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-img-support.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample1.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample1.snap.png index 248e2644..dc297a0e 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample1.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample1.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample2.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample2.snap.png index e3defc0a..a9b5c353 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample2.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample2.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample3.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample3.snap.png index d7bc7378..9bd2609d 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample3.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample3.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample4.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample4.snap.png index 9b6d2e62..42e2cfb3 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample4.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample4.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample5.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample5.snap.png index 934ce74c..d018fefd 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample5.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample5.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample6.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample6.snap.png index 1b2703f5..b4fdfcc7 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample6.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-sample6.snap.png differ diff --git a/packages/editor/cypress/snapshots/playground.test.js/viewmode-welcome.snap.png b/packages/editor/cypress/snapshots/playground.test.js/viewmode-welcome.snap.png index 3e6ce8c8..d927782c 100644 Binary files a/packages/editor/cypress/snapshots/playground.test.js/viewmode-welcome.snap.png and b/packages/editor/cypress/snapshots/playground.test.js/viewmode-welcome.snap.png differ diff --git a/packages/editor/package.json b/packages/editor/package.json index 2986e4c2..0806b7c8 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -23,7 +23,7 @@ "clean-webpack-plugin": "^4.0.0", "compression-webpack-plugin": "^9.2.0", "copy-webpack-plugin": "^10.2.1", - "cypress": "^9.3.1", + "cypress": "^8.4.1", "cypress-image-snapshot": "^4.0.1", "eslint": "^7.14.0", "eslint-config-prettier": "^8.0.0", diff --git a/packages/editor/webpack.common.js b/packages/editor/webpack.common.js index 6a92ce27..44312726 100644 --- a/packages/editor/webpack.common.js +++ b/packages/editor/webpack.common.js @@ -1,18 +1,18 @@ const path = require('path'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpack = require('webpack'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); module.exports = { output: { - filename: 'editor.bundle.js', path: path.resolve(__dirname, 'dist'), + filename: '[name].js', + publicPath: '', library: { type: 'umd', }, }, entry: { - editor: path.join(__dirname, 'src', 'index.tsx') + "editor.bundle": path.join(__dirname, 'src', 'index.tsx') }, mode: 'development', devtool: 'source-map', @@ -38,17 +38,7 @@ module.exports = { }, ], }, - plugins: [ new CleanWebpackPlugin(), - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify('development') - }) - ], - devServer: { - contentBase: path.join(__dirname, 'dist'), - compress: true, - port: 9000, - hot: true, - } + ] } diff --git a/packages/editor/webpack.playground.js b/packages/editor/webpack.playground.js index 4aa9155e..84d74cfc 100644 --- a/packages/editor/webpack.playground.js +++ b/packages/editor/webpack.playground.js @@ -8,6 +8,7 @@ const { merge } = require('webpack-merge'); const playgroundConfig = { mode: 'development', entry: { + "editor.bundle": path.join(__dirname, 'src', 'index.tsx'), viewmode: path.resolve(__dirname, './test/playground/map-render/js/viewmode'), embedded: path.resolve(__dirname, './test/playground/map-render/js/embedded'), editor: path.resolve(__dirname, './test/playground/map-render/js/editor'), @@ -23,6 +24,7 @@ const playgroundConfig = { historyApiFallback: true, port: 8081, open: false, + writeToDisk: true, }, module: { rules: [ diff --git a/packages/mindplot/webpack.playground.js b/packages/mindplot/webpack.playground.js index 9fc88019..06064eaa 100644 --- a/packages/mindplot/webpack.playground.js +++ b/packages/mindplot/webpack.playground.js @@ -8,19 +8,20 @@ const { merge } = require('webpack-merge'); const playgroundConfig = { mode: 'development', entry: { + mindplot: path.resolve(__dirname, './src/index.js'), layout: path.resolve(__dirname, './test/playground/layout/context-loader'), }, devServer: { historyApiFallback: true, port: 8083, open: false, + writeToDisk: true, }, module: { rules: [ { test: /\.css$/i, use: [ - // compiles Less to CSS 'style-loader', 'css-loader?url=false', ], diff --git a/yarn.lock b/yarn.lock index e77db48f..a02eb8e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3549,11 +3549,6 @@ "@types/mime" "^1" "@types/node" "*" -"@types/sinonjs__fake-timers@8.1.1": - version "8.1.1" - resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" - integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g== - "@types/sinonjs__fake-timers@^6.0.2": version "6.0.4" resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz#0ecc1b9259b76598ef01942f547904ce61a6a77d" @@ -4931,7 +4926,7 @@ buffer-indexof@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== -buffer@^5.5.0, buffer@^5.6.0: +buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -5326,15 +5321,6 @@ cli-table3@~0.6.0: optionalDependencies: colors "^1.1.2" -cli-table3@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.1.tgz#36ce9b7af4847f288d3cdd081fbd09bf7bd237b8" - integrity sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA== - dependencies: - string-width "^4.2.0" - optionalDependencies: - colors "1.4.0" - cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -5458,7 +5444,7 @@ colorette@^2.0.10, colorette@^2.0.14, colorette@^2.0.16: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== -colors@1.4.0, colors@^1.1.2: +colors@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -6101,54 +6087,6 @@ cypress@^8.4.1: url "^0.11.0" yauzl "^2.10.0" -cypress@^9.3.1: - version "9.3.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.3.1.tgz#8116f52d49d6daf90a91e88f3eafd940234d2958" - integrity sha512-BODdPesxX6bkVUnH8BVsV8I/jn57zQtO1FEOUTiuG2us3kslW7g0tcuwiny7CKCmJUZz8S/D587ppC+s58a+5Q== - dependencies: - "@cypress/request" "^2.88.10" - "@cypress/xvfb" "^1.2.4" - "@types/node" "^14.14.31" - "@types/sinonjs__fake-timers" "8.1.1" - "@types/sizzle" "^2.3.2" - arch "^2.2.0" - blob-util "^2.0.2" - bluebird "^3.7.2" - buffer "^5.6.0" - cachedir "^2.3.0" - chalk "^4.1.0" - check-more-types "^2.24.0" - cli-cursor "^3.1.0" - cli-table3 "~0.6.1" - commander "^5.1.0" - common-tags "^1.8.0" - dayjs "^1.10.4" - debug "^4.3.2" - enquirer "^2.3.6" - eventemitter2 "^6.4.3" - execa "4.1.0" - executable "^4.1.1" - extract-zip "2.0.1" - figures "^3.2.0" - fs-extra "^9.1.0" - getos "^3.2.1" - is-ci "^3.0.0" - is-installed-globally "~0.4.0" - lazy-ass "^1.6.0" - listr2 "^3.8.3" - lodash "^4.17.21" - log-symbols "^4.0.0" - minimist "^1.2.5" - ospath "^1.2.2" - pretty-bytes "^5.6.0" - proxy-from-env "1.0.0" - request-progress "^3.0.0" - supports-color "^8.1.1" - tmp "~0.2.1" - untildify "^4.0.0" - url "^0.11.0" - yauzl "^2.10.0" - dargs@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17"