aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gui.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-20 11:30:36 +0200
committerDanilo M. <danix@danix.xyz>2026-10-20 11:30:36 +0200
commitd756256c775c754aed07f8c518b2b8f589ea2948 (patch)
treef8adb23e59240fe408d47627809503c9a078efe7 /tests/test_gui.py
parentfebdd512474a7ffe358b01c15b72871c3f862170 (diff)
downloadsb-builder-d756256c775c754aed07f8c518b2b8f589ea2948.tar.gz
sb-builder-d756256c775c754aed07f8c518b2b8f589ea2948.zip
Hint diff dialog: color added, removed and hunk lines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_gui.py')
-rw-r--r--tests/test_gui.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py
index 891584b..8a5b6e3 100644
--- a/tests/test_gui.py
+++ b/tests/test_gui.py
@@ -515,6 +515,11 @@ class SmokeTest(unittest.TestCase):
self.assertEqual(len(w.hint_dialogs), 1)
d = w.hint_dialogs[0]
self.assertIn('-VERSION="3.11.1"\n+VERSION="3.12.0"', d.diff.toPlainText())
+ doc = d.diff.document()
+ colors = {doc.findBlockByNumber(i).text()[:3]:
+ doc.findBlockByNumber(i).layout().formats()[0].format.foreground().color().name()
+ for i in range(doc.blockCount()) if doc.findBlockByNumber(i).layout().formats()}
+ self.assertEqual(colors, {"@@ ": "#3b8bd0", '-VE': "#d03b3b", '+VE': "#0ca30c"})
d.revert()
d.revert() # a second revert must not reach the helper: it would delete the hint
self.assertEqual([c for c in remote.calls if c[0] == "hint-revert"], [("hint-revert", "nuclei")])