From d756256c775c754aed07f8c518b2b8f589ea2948 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 20 Oct 2026 11:30:36 +0200 Subject: Hint diff dialog: color added, removed and hunk lines Co-Authored-By: Claude Opus 5.5 --- tests/test_gui.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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")]) -- cgit v1.2.3