Skip to content

Commit

Permalink
Found a bug, wasn't loading colours from template
Browse files Browse the repository at this point in the history
Thanks to the test cases for Issue #307
  • Loading branch information
damies13 committed Jan 19, 2025
1 parent 4b3546a commit 5d6334b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions Tests/Regression/Reporter/GUI_Features.robot
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ Change Line Colour

Click Tab Preview

Sleep 1
Take A Screenshot

[Teardown] Run Keywords
Expand Down
14 changes: 14 additions & 0 deletions rfswarm_reporter/rfswarm_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,16 @@ def template_open(self, filename):
base.report = configparser.ConfigParser()
base.report.read(filename, encoding="utf8")

base.debugmsg(7, "base.report: ", base.report)
if "Colours" in base.report:
base.debugmsg(7, "base.report[Colours]: ", base.report["Colours"])
if "defcolours" in base.report["Colours"]:
base.defcolours = base.whitespace_get_ini_value(base.report["Colours"]["defcolours"]).split(",")
base.debugmsg(7, "base.defcolours: ", base.defcolours)
if "namecolours" in base.report["Colours"]:
base.namecolours = base.whitespace_get_ini_value(base.report["Colours"]["namecolours"]).split(",")
base.debugmsg(7, "base.namecolours: ", base.namecolours)

base.report_item_set_changed_all("TOP")

else:
Expand Down Expand Up @@ -901,11 +911,15 @@ def report_open(self):
base.debugmsg(7, "report_save")
base.report_save()

base.debugmsg(7, "base.report: ", base.report)
if "Colours" in base.report:
base.debugmsg(7, "base.report[Colours]: ", base.report["Colours"])
if "defcolours" in base.report["Colours"]:
base.defcolours = base.whitespace_get_ini_value(base.report["Colours"]["defcolours"]).split(",")
base.debugmsg(7, "base.defcolours: ", base.defcolours)
if "namecolours" in base.report["Colours"]:
base.namecolours = base.whitespace_get_ini_value(base.report["Colours"]["namecolours"]).split(",")
base.debugmsg(7, "base.namecolours: ", base.namecolours)

def report_starttime(self):
if "starttime" in self.reportdata and self.reportdata["starttime"] > 0:
Expand Down

0 comments on commit 5d6334b

Please sign in to comment.