diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_group_tab_fallback.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_group_tab_fallback.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_group_tab_fallback.py b/packages/meshbay-hub/tests/test_group_tab_fallback.py index 6310b9c..634c5eb 100644 --- a/packages/meshbay-hub/tests/test_group_tab_fallback.py +++ b/packages/meshbay-hub/tests/test_group_tab_fallback.py @@ -67,6 +67,25 @@ def test_a_preference_that_names_nothing_falls_back(cases): assert cases["preference names nothing real"]["active"] == 0 +def test_a_preference_that_arrives_after_the_group_opened_applies(cases): + """The reported bug: Videos chosen in Settings, and a group opened directly + (a reload, a link) still landed on Chat. + + app.js fetches the preferences after sign-in; GroupPage chose its tab at + mount and never looked again. + """ + case = cases["preference arrives after the group opened"] + assert case["active"] == 2, ( + f"the preference arrived and was ignored: landed on tab {case['active']}") + + +def test_a_late_preference_does_not_undo_a_tab_the_reader_chose(cases): + """Arriving late must not yank someone off a tab they just clicked.""" + case = cases["tab chosen before the preference arrives"] + assert case["active"] == 1, ( + f"the reader clicked Files and was moved to tab {case['active']}") + + def test_a_preference_the_group_offers_is_kept(cases): """The fallback must not become 'always the first app'.""" case = cases["preferred app present"] |