From 77c134a47b0e794080e424be393d778183fd1f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 2 Mar 2020 23:17:48 +0100 Subject: Demonstrate issue #3423 with e2e tests --- tests/end_to_end/scenarios/channel_force_join.py | 20 -------------------- .../scenarios/channel_join_with_different_nick.py | 6 ++++++ 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'tests') diff --git a/tests/end_to_end/scenarios/channel_force_join.py b/tests/end_to_end/scenarios/channel_force_join.py index 089da51..9a24c06 100644 --- a/tests/end_to_end/scenarios/channel_force_join.py +++ b/tests/end_to_end/scenarios/channel_force_join.py @@ -21,25 +21,5 @@ scenario = ( "/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]" ] ), - - # And also, that was not the same nickname, so everyone receives a nick change - expect_unordered( - [ - "/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='unavailable']/muc_user:x/muc_user:item[@nick='Bernard']", - "/presence/muc_user:x/muc_user:status[@code='303']", - ], - [ - "/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_two}/{resource_one}']", - ], - [ - "/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='unavailable']/muc_user:x/muc_user:item[@nick='Bernard']", - "/presence/muc_user:x/muc_user:status[@code='303']", - "/presence/muc_user:x/muc_user:status[@code='110']", - ], - [ - "/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_one}/{resource_one}']", - "/presence/muc_user:x/muc_user:status[@code='110']", - ], - ), ) diff --git a/tests/end_to_end/scenarios/channel_join_with_different_nick.py b/tests/end_to_end/scenarios/channel_join_with_different_nick.py index 388b098..87ae80c 100644 --- a/tests/end_to_end/scenarios/channel_join_with_different_nick.py +++ b/tests/end_to_end/scenarios/channel_join_with_different_nick.py @@ -11,4 +11,10 @@ scenario = ( send_stanza(""), # We must receive a join presence in response, without any nick change (nick_two) must be ignored expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#bar", nick = "{nick_one}"), + + # An different resource joins the same channel, with a different nick + send_stanza(""), + # We must receive a join presence in response, without any nick change (nick_two) must be ignored + expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']"), + expect_stanza("/message/subject"), ) -- cgit v1.2.3