~singpolyma/biboumi

77c134a47b0e794080e424be393d778183fd1f37 — louiz’ 2 years ago 3584979
Demonstrate issue #3423 with e2e tests
M tests/end_to_end/scenarios/channel_force_join.py => tests/end_to_end/scenarios/channel_force_join.py +0 -20
@@ 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']",
             ],
    ),
)


M tests/end_to_end/scenarios/channel_join_with_different_nick.py => tests/end_to_end/scenarios/channel_join_with_different_nick.py +6 -0
@@ 11,4 11,10 @@ scenario = (
    send_stanza("<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_two}' />"),
    # 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("<presence from='{jid_one}/{resource_two}' to='#foo%{irc_server_one}/{nick_two}' />"),
    # 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"),
)