[Backport] split web-console e2e-tests from unit tests (#10177)
* split web-console e2e-tests from unit tests (#10173)
* split web-console e2e-test from unit test
* fix stuff
* smaller change
* oops
* set 0.19 as javascript version
diff --git a/web-console/jest.common.config.js b/web-console/jest.common.config.js
index 32fe59b..264d9ef 100644
--- a/web-console/jest.common.config.js
+++ b/web-console/jest.common.config.js
@@ -19,7 +19,4 @@
module.exports = {
"preset": "ts-jest",
"testEnvironment": "jsdom",
- "testMatch": [
- "**/?(*.)+(spec).ts?(x)"
- ],
};
diff --git a/web-console/jest.e2e.config.js b/web-console/jest.e2e.config.js
index c587b40..a2321fe 100644
--- a/web-console/jest.e2e.config.js
+++ b/web-console/jest.e2e.config.js
@@ -19,7 +19,10 @@
const common = require('./jest.common.config');
module.exports = Object.assign(common, {
+ "testMatch": [
+ "**/?(*.)+(spec).ts?(x)"
+ ],
"setupFilesAfterEnv": [
"<rootDir>e2e-tests/util/setup.ts"
- ]
+ ],
});
diff --git a/web-console/jest.unit.config.js b/web-console/jest.unit.config.js
index 91fbe58..3816a4e 100644
--- a/web-console/jest.unit.config.js
+++ b/web-console/jest.unit.config.js
@@ -28,4 +28,7 @@
"setupFilesAfterEnv": [
"<rootDir>src/setup-tests.ts"
],
+ "testMatch": [
+ "**/src/**/?(*.)+(spec).(ts|tsx)"
+ ],
});
diff --git a/web-console/package-lock.json b/web-console/package-lock.json
index 422be0c..f43c519 100644
--- a/web-console/package-lock.json
+++ b/web-console/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "web-console",
- "version": "0.17.0",
+ "version": "0.19.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/web-console/package.json b/web-console/package.json
index 293764a..85d2f93 100644
--- a/web-console/package.json
+++ b/web-console/package.json
@@ -1,8 +1,8 @@
{
"name": "web-console",
- "version": "0.17.0",
+ "version": "0.19.0",
"description": "A web console for Apache Druid",
- "author": "Imply Data Inc.",
+ "author": "Apache Druid Developers <dev@druid.apache.org>",
"license": "Apache-2.0",
"repository": {
"type": "git",
diff --git a/web-console/pom.xml b/web-console/pom.xml
index dd40ab2..5288fb4 100644
--- a/web-console/pom.xml
+++ b/web-console/pom.xml
@@ -125,6 +125,7 @@
<goal>exec</goal>
</goals>
<configuration>
+ <environmentVariables><PATH>${project.build.directory}/node:${env.PATH}</PATH></environmentVariables>
<executable>script/build</executable>
</configuration>
</execution>
diff --git a/web-console/script/build b/web-console/script/build
index 70ee318..8c891dc 100755
--- a/web-console/script/build
+++ b/web-console/script/build
@@ -19,13 +19,13 @@
set -e
echo "Adding SQL docs..."
-PATH="./target/node:$PATH" ./script/create-sql-docs.js
+./script/create-sql-docs.js
echo "Transpiling ReactTable CSS..."
-PATH="./target/node:$PATH" ./node_modules/.bin/stylus lib/react-table.styl -o lib/react-table.css
+./node_modules/.bin/stylus lib/react-table.styl -o lib/react-table.css
# add BUNDLE_ANALYZER_PLUGIN='TRUE' here to enable webpack-bundle-analyzer as a plugin
echo "Webpacking everything..."
-PATH="./target/node:$PATH" NODE_ENV=production ./node_modules/.bin/webpack -c webpack.config.js
+NODE_ENV=production ./node_modules/.bin/webpack -c webpack.config.js
echo "Done! Have a good day."
diff --git a/web-console/unified-console.html b/web-console/unified-console.html
index 1705cc7..45b9050 100644
--- a/web-console/unified-console.html
+++ b/web-console/unified-console.html
@@ -28,6 +28,6 @@
<body class="bp3-dark mouse-mode">
<div class="app-container"></div>
<script src="console-config.js"></script>
- <script src="public/web-console-0.17.0.js"></script>
+ <script src="public/web-console-0.19.0.js"></script>
</body>
</html>