From 9791a7f72fcb99cbc170a149b725d0aec8385922 Mon Sep 17 00:00:00 2001
From: Sebastian <seb.miksch@aon.at>
Date: Thu, 16 Nov 2023 15:23:55 +0100
Subject: [PATCH] progress viewer now loads files correctly, "generate output
 files" button works now

---
 Ccs/ccs_function_lib.py            | 1 +
 Tst/progress_view/progress_view.py | 4 +++-
 Tst/tst/tst.py                     | 6 ++++--
 Tst/tst/verification_tab.py        | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Ccs/ccs_function_lib.py b/Ccs/ccs_function_lib.py
index 9536e4c..2d06fe1 100644
--- a/Ccs/ccs_function_lib.py
+++ b/Ccs/ccs_function_lib.py
@@ -5524,6 +5524,7 @@ def add_tst_import_paths():
     sys.path.append(cfg.get('paths', 'tst') + '/sketch_desk')
     sys.path.append(cfg.get('paths', 'tst') + '/test_specs')
     sys.path.append(cfg.get('paths', 'tst') + '/testing_library')
+    sys.path.append(cfg.get('paths', 'tst') + '/testing_library/testlib')
     # insert this to import the tst view.py, not the one in .local folder
     sys.path.insert(0, cfg.get('paths', 'tst') + '/tst')
 
diff --git a/Tst/progress_view/progress_view.py b/Tst/progress_view/progress_view.py
index fb77b8f..aa23a09 100644
--- a/Tst/progress_view/progress_view.py
+++ b/Tst/progress_view/progress_view.py
@@ -8,6 +8,8 @@ from gi.repository import Gtk, Gdk, Gio, GLib
 import sys
 import confignator
 
+sys.path.append(os.path.join(confignator.get_option("paths", "Tst"), "testing_library/testlib"))
+
 cfg = confignator.get_config()
 sys.path.append(cfg.get('paths', 'ccs'))
 
@@ -1299,7 +1301,7 @@ class Save_to_File_Dialog(Gtk.FileChooserDialog):
     def __init__(self, parent=None):
         super(Save_to_File_Dialog, self).__init__(title='Please choose a Folder to save the Test Run',
                                        parent=parent,
-                                       action=Gtk.FileChooserAction.OPEN_FOLDER)
+                                       action=Gtk.FileChooserAction.SELECT_FOLDER)
 
         self.win = parent
         self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_SAVE, Gtk.ResponseType.OK)
diff --git a/Tst/tst/tst.py b/Tst/tst/tst.py
index dd5d03f..cba3cb7 100755
--- a/Tst/tst/tst.py
+++ b/Tst/tst/tst.py
@@ -1065,10 +1065,12 @@ class TstAppWindow(Gtk.ApplicationWindow):
             path_test_specs = cfg.get(section='tst-paths', option='tst_products')
             path_test_runs = cfg.get(section='tst-logging', option='test_run')
 
-            json_file_path = os.path.join(path_test_specs, current_file_name)
+            json_file_path = current_instance.filename
             paths['json_file_path'] = json_file_path
 
-            name = generator.strip_file_extension(current_file_name)
+            name = current_instance.test_meta_data_name.get_text()
+            name = generator.create_file_name(name)
+
             cmd_log_file_path = os.path.join(path_test_runs, name + testing_logger.cmd_log_auxiliary)
             paths['cmd_log_file_path'] = cmd_log_file_path
 
diff --git a/Tst/tst/verification_tab.py b/Tst/tst/verification_tab.py
index 8e6b110..a9fdb9f 100644
--- a/Tst/tst/verification_tab.py
+++ b/Tst/tst/verification_tab.py
@@ -10,7 +10,7 @@ import confignator
 import sys
 sys.path.append(confignator.get_option('paths', 'ccs'))
 sys.path.append(os.path.join(confignator.get_option("paths", "Tst"), "testing_library/testlib"))
-sys.path.append('/home/sebastian/CCS/Tst/testing_library/testlib')  # notwendig damit tm als Modul erkannt wird
+# sys.path.append('/home/sebastian/CCS/Tst/testing_library/testlib')  # notwendig damit tm als Modul erkannt wird
 import ccs_function_lib as cfl
 import s2k_partypes as s2k
 
-- 
GitLab