From 51eda3f08cec6b4ccb2aba7defd546cb86634378 Mon Sep 17 00:00:00 2001
From: Tim Nikischin <49103409+nikischin@users.noreply.github.com>
Date: Wed, 26 Feb 2025 08:27:33 +0100
Subject: [PATCH] Implement correct Runner title (#3854)
Implement correct Runner title fixes: #3763
Use title instead of filepath in runner.
---
.../src/components/RunnerResults/index.jsx | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/packages/bruno-app/src/components/RunnerResults/index.jsx b/packages/bruno-app/src/components/RunnerResults/index.jsx
index 4381c86b1..e8bf153a4 100644
--- a/packages/bruno-app/src/components/RunnerResults/index.jsx
+++ b/packages/bruno-app/src/components/RunnerResults/index.jsx
@@ -11,14 +11,14 @@ import ResponsePane from './ResponsePane';
import StyledWrapper from './StyledWrapper';
import { areItemsLoading } from 'utils/collections';
-const getRelativePath = (fullPath, pathname) => {
+const getDisplayName = (fullPath, pathname, name) => {
// convert to unix style path
fullPath = slash(fullPath);
pathname = slash(pathname);
let relativePath = path.relative(fullPath, pathname);
- const { dir, name } = path.parse(relativePath);
- return path.join(dir, name);
+ const { dir } = path.parse(relativePath);
+ return [dir, name].filter(i => i).join('/');
};
export default function RunnerResults({ collection }) {
@@ -58,7 +58,7 @@ export default function RunnerResults({ collection }) {
type: info.type,
filename: info.filename,
pathname: info.pathname,
- relativePath: getRelativePath(collection.pathname, info.pathname)
+ displayName: getDisplayName(collection.pathname, info.pathname, info.name)
};
if (newItem.status !== 'error' && newItem.status !== 'skipped') {
if (newItem.testResults) {
@@ -186,7 +186,7 @@ export default function RunnerResults({ collection }) {
- {item.relativePath}
+ {item.displayName}
{item.status !== 'error' && item.status !== 'skipped' && item.status !== 'completed' ? (