mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
hotspots: Remove intro_reply hotspot.
Zulip shows two guides on How to reply, first one by the welcome bot and second one is intro_reply hotspot. To simply and avoid redundancy, intro_reply hotspot is removed. Fixes #20482.
This commit is contained in:
@@ -16,14 +16,14 @@ class TestGetNextHotspots(ZulipTestCase):
|
||||
def test_first_hotspot(self) -> None:
|
||||
hotspots = get_next_hotspots(self.user)
|
||||
self.assert_length(hotspots, 1)
|
||||
self.assertEqual(hotspots[0]["name"], "intro_reply")
|
||||
self.assertEqual(hotspots[0]["name"], "intro_streams")
|
||||
|
||||
def test_some_done_some_not(self) -> None:
|
||||
do_mark_hotspot_as_read(self.user, "intro_reply")
|
||||
do_mark_hotspot_as_read(self.user, "intro_streams")
|
||||
do_mark_hotspot_as_read(self.user, "intro_compose")
|
||||
hotspots = get_next_hotspots(self.user)
|
||||
self.assert_length(hotspots, 1)
|
||||
self.assertEqual(hotspots[0]["name"], "intro_streams")
|
||||
self.assertEqual(hotspots[0]["name"], "intro_topics")
|
||||
|
||||
def test_all_intro_hotspots_done(self) -> None:
|
||||
with self.settings(TUTORIAL_ENABLED=True):
|
||||
@@ -54,16 +54,16 @@ class TestHotspots(ZulipTestCase):
|
||||
def test_hotspots_url_endpoint(self) -> None:
|
||||
user = self.example_user("hamlet")
|
||||
self.login_user(user)
|
||||
result = self.client_post("/json/users/me/hotspots", {"hotspot": "intro_reply"})
|
||||
result = self.client_post("/json/users/me/hotspots", {"hotspot": "intro_streams"})
|
||||
self.assert_json_success(result)
|
||||
self.assertEqual(
|
||||
list(UserHotspot.objects.filter(user=user).values_list("hotspot", flat=True)),
|
||||
["intro_reply"],
|
||||
["intro_streams"],
|
||||
)
|
||||
|
||||
result = self.client_post("/json/users/me/hotspots", {"hotspot": "invalid"})
|
||||
self.assert_json_error(result, "Unknown hotspot: invalid")
|
||||
self.assertEqual(
|
||||
list(UserHotspot.objects.filter(user=user).values_list("hotspot", flat=True)),
|
||||
["intro_reply"],
|
||||
["intro_streams"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user