Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<data>
<version>v2.7.20</version>
<version>v2.7.21</version>
<description>Configuration file for the application</description>
</data>
2 changes: 1 addition & 1 deletion ui/analytics/analytics_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _init_ui(self):

# Export Button
self.export_button = QPushButton()
self.export_button.setIcon(QIcon(resource_path("images/excel.png"))) # Use your Excel icon
self.export_button.setIcon(QIcon(resource_path("images/excel.png")))
self.export_button.setIconSize(QSize(16, 16))
self.export_button.setText(" Export Analytics")
self.export_button.setStyleSheet("""
Expand Down
10 changes: 5 additions & 5 deletions ui/help/help_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def __init__(self, icon_path, text="", parent=None):
self.text = text
self.icon = QIcon(resource_path(f"images/{icon_path}"))
self.icon_size = 60
self._radius = 45 # Internal radius property
self._radius = 45
self.hover_radius = 50
self.base_radius = 45 # Added missing attribute
self.base_radius = 45

# Colors
self.base_color = QColor(69, 71, 90, 80)
Expand Down Expand Up @@ -72,7 +72,7 @@ def enterEvent(self, event):
def leaveEvent(self, event):
self.animation.stop()
self.animation.setStartValue(self._radius)
self.animation.setEndValue(self.base_radius) # Now using the correct attribute
self.animation.setEndValue(self.base_radius)
self.animation.start()
super().leaveEvent(event)

Expand Down Expand Up @@ -206,8 +206,8 @@ def init_ui(self):
layout.addLayout(buttons_layout)

config_paths = [
'config.xml', # Development path
os.path.join(os.path.dirname(sys.executable), 'config.xml'), # EXE location
'config.xml',
os.path.join(os.path.dirname(sys.executable), 'config.xml'),
]

config_loaded = False
Expand Down
7 changes: 3 additions & 4 deletions ui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ def __init__(self):

def _load_config(self):
try:
# Try multiple paths to locate the config file
config_paths = [
'config.xml', # Development path
os.path.join(os.path.dirname(sys.executable), 'config.xml'), # EXE location
os.path.join(sys._MEIPASS, 'config.xml') # PyInstaller temp directory
'config.xml',
os.path.join(os.path.dirname(sys.executable), 'config.xml'),
os.path.join(sys._MEIPASS, 'config.xml')
]

config_loaded = False
Expand Down
6 changes: 3 additions & 3 deletions utils/dashboard_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ def load_data(self):
for suite in root.findall('.//suite'):
status = suite.find('.//status')
if status is not None:
# Parse Robot Framework timestamp format (YYYYMMDD HH:MM:SS.SSS)

timestamp_str = status.get('starttime')
try:
timestamp = datetime.strptime(timestamp_str, "%Y%m%d %H:%M:%S.%f")
except ValueError:
# Fallback if milliseconds are missing

timestamp = datetime.strptime(timestamp_str, "%Y%m%d %H:%M:%S")

stats['recent_runs'].append({
Expand All @@ -52,7 +52,7 @@ def load_data(self):
'status': 'PASS' if status.get('status') == 'PASS' else 'FAIL'
})

# Calculate execution time

endtime_str = status.get('endtime')
try:
endtime = datetime.strptime(endtime_str, "%Y%m%d %H:%M:%S.%f")
Expand Down
8 changes: 4 additions & 4 deletions utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ def select_directory(window):
window.label.setText(f"Selected: {dir_path}")
os.makedirs(os.path.join(dir_path, "Results"), exist_ok=True)
window.testList.clear()
from utils.test_utils import load_tests # Import here to avoid circular import
from utils.test_utils import load_tests
load_tests(window)
else:
from utils.display_utils import show_cross # Import here
from utils.display_utils import show_cross
show_cross(window)
window.label.setStyleSheet("color: #ad402a")

Expand All @@ -22,10 +22,10 @@ def select_output_directory(window):
window.output_directory = dir_path
window.fileLabel.setText(f"Results saved in: {dir_path}")
window.fileLabel.setStyleSheet("color: green")
# Update the dashboard loader

if hasattr(window, 'dashboard_loader'):
window.dashboard_loader.set_results_dir(dir_path)
# Optional: trigger immediate refresh

window.dashboard_loader.load_data(force=True)

def clear_results_directory(window):
Expand Down
5 changes: 2 additions & 3 deletions utils/resource_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
def resource_path(relative_path):
"""Get absolute path to resource, works for dev and for PyInstaller"""
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".") # Use current directory as base path
base_path = os.path.abspath(".")

full_path = os.path.join(base_path, relative_path)
print(f"Looking for resource at: {full_path}") # Debug print
print(f"Looking for resource at: {full_path}")
return full_path
6 changes: 3 additions & 3 deletions utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def run_tests(window):

# Wait for output.xml to be generated
output_path = os.path.join(window.output_directory, "output.xml")
max_wait = 15 # seconds
wait_interval = 0.5 # seconds
max_wait = 15
wait_interval = 0.5

for _ in range(int(max_wait / wait_interval)):
if os.path.exists(output_path) and os.path.getsize(output_path) > 0:
Expand Down Expand Up @@ -264,7 +264,7 @@ def export_results(window):
try:
os.startfile(excel_path)
except:
pass # Silently fail if can't auto-open
pass
else:
window.resultLabel.setText("Failed to create report file")
window.resultLabel.setStyleSheet("color: #ad402a")
Expand Down