;
+}
+
+export function TreeViewItemSubtitle(props: TreeViewItemSubtitleProps): ReactNode {
if (props.item.type === TreeViewItemType.Browser && props.item.diffImg) {
- return ;
+ return ;
} else if (props.item.type === TreeViewItemType.Browser && props.item.errorStack) {
return
{props.item.errorStack}
diff --git a/lib/static/new-ui/utils/index.tsx b/lib/static/new-ui/utils/index.tsx
index 0a5086fe6..d21f0fc64 100644
--- a/lib/static/new-ui/utils/index.tsx
+++ b/lib/static/new-ui/utils/index.tsx
@@ -13,3 +13,9 @@ export const getIconByStatus = (status: TestStatus): React.JSX.Element => {
return ;
};
+
+export const getFullTitleByTitleParts = (titleParts: string[]): string => {
+ const DELIMITER = ' ';
+
+ return titleParts.join(DELIMITER).trim();
+};
diff --git a/test/setup/globals.js b/test/setup/globals.js
index 717ac74f9..310b17fbf 100644
--- a/test/setup/globals.js
+++ b/test/setup/globals.js
@@ -19,4 +19,17 @@ chai.use(require('chai-as-promised'));
chai.use(require('chai-dom'));
sinon.assert.expose(chai.assert, {prefix: ''});
-require('app-module-path').addPath(path.resolve(__dirname, '..', '..'));
+const projectRoot = path.resolve(__dirname, '..', '..');
+
+// Resolving imports like lib/.../
+require('app-module-path').addPath(projectRoot);
+
+// Resolving webpack alias imports like @/.../
+try {
+ const fs = require('fs');
+ fs.symlinkSync(path.join(projectRoot, 'lib'), path.join(projectRoot, '@'));
+} catch (e) {
+ if (e.code !== 'EEXIST') {
+ throw e;
+ }
+}
diff --git a/tsconfig.spec.json b/tsconfig.spec.json
index 9cf19863e..8a2555b73 100644
--- a/tsconfig.spec.json
+++ b/tsconfig.spec.json
@@ -6,7 +6,8 @@
"jsx": "react",
"noEmit": true,
"paths": {
- "lib/*": ["./lib/*"]
+ "lib/*": ["./lib/*"],
+ "@/*": ["./lib/*"]
}
},
}
diff --git a/webpack.common.js b/webpack.common.js
index 347b4f653..a99d9f08e 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -12,8 +12,6 @@ const {ProgressPlugin} = require('webpack');
const staticPath = path.resolve(__dirname, 'build', 'lib', 'static');
-console.log('here is resolved path; ' + path.resolve(__dirname, 'src'));
-
module.exports = {
entry: {
report: ['./index.jsx', './variables.css', './styles.css'],