From fe4ceb72d09968a16105c4c0864705f474d9a863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 24 Aug 2017 23:53:29 +0200 Subject: Add an e2e test to demonstrate bug #3291 --- tests/end_to_end/__main__.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index c6607d0..5317540 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -1480,6 +1480,24 @@ if __name__ == '__main__': ("/message/subject",), ]), + # demonstrate bug https://lab.louiz.org/louiz/biboumi/issues/3291 + # First user joins an other channel + partial(send_stanza, + ""), + partial(expect_stanza, "/message"), + partial(expect_stanza, "/presence/muc_user:x/muc_user:status[@code='110']"), + partial(expect_stanza, "/message[@type='groupchat']/subject"), + + # Second user joins + partial(send_stanza, + ""), + partial(expect_unordered, [ + ("/presence/muc_user:x/muc_user:item[@affiliation='none'][@role='participant']",), + ("/presence/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']",), + ("/presence/muc_user:x/muc_user:status[@code='110']",), + ("/message/subject",), + ]), + # Moderator kicks participant partial(send_stanza, "reported"), @@ -1495,6 +1513,14 @@ if __name__ == '__main__': ), ("/iq[@id='kick1'][@type='result']",), ]), + + # Bug 3291, suite. We must not receive any presence from #foo, here + partial(send_stanza, "QUIT bye bye"), + partial(expect_unordered, + [("/presence[@from='#bar%{irc_server_one}/{nick_two}'][@to='{jid_one}/{resource_one}']",), + ("/presence[@from='#bar%{irc_server_one}/{nick_two}'][@to='{jid_two}/{resource_one}']",), + ("/message",), + ("/message",)]) ]), Scenario("mode_change", [ -- cgit v1.2.3