aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-19 21:09:43 +0200
committerDanilo M. <danix@danix.xyz>2026-10-19 21:09:43 +0200
commit81139106f75bc06f45e9e579f9c6400d0eeb8940 (patch)
tree9b21846b1b565cd3779284905c53f4fcc3cfcdb2 /tests
parentda5363d1c0fb77dcf3030968a2cd5be355ee7f1a (diff)
downloadsb-builder-81139106f75bc06f45e9e579f9c6400d0eeb8940.tar.gz
sb-builder-81139106f75bc06f45e9e579f9c6400d0eeb8940.zip
Ctrl+PgUp/PgDn cycle tabs from anywhere in the window
QTabWidget's built-in binding only works with focus on the tab bar, and the table views take page keys. Window-level shortcuts, wrapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gui.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py
index 482d8b4..bf9177a 100644
--- a/tests/test_gui.py
+++ b/tests/test_gui.py
@@ -383,6 +383,18 @@ class SmokeTest(unittest.TestCase):
w.dashboard.jobs.clicked.emit()
self.assertIs(w.tabs.currentWidget(), w.jobs_tab)
+ def test_tab_shortcuts_wrap(self):
+ w, _ = self.window()
+ w.poll_jobs()
+ w.open_packages()
+ w.open_jobs()
+ nxt, prev = w.tab_next, w.tab_prev
+ self.assertEqual((nxt.key().toString(), prev.key().toString()), ("Ctrl+PgDown", "Ctrl+PgUp"))
+ nxt.activated.emit()
+ self.assertEqual(w.tabs.currentIndex(), 0) # wrapped from Jobs to Dashboard
+ prev.activated.emit()
+ self.assertEqual(w.tabs.currentIndex(), 2)
+
def test_log_carriage_return(self):
w, _ = self.window()
jobs = w.open_jobs()