diff --git a/deltachat-rpc-client/tests/test_securejoin.py b/deltachat-rpc-client/tests/test_securejoin.py index f4631bb1c9..f6cf297803 100644 --- a/deltachat-rpc-client/tests/test_securejoin.py +++ b/deltachat-rpc-client/tests/test_securejoin.py @@ -28,6 +28,34 @@ def test_qr_setup_contact(acfactory) -> None: assert alice_contact_bob_snapshot.is_profile_verified +@pytest.mark.xfail() +def test_qr_securejoin(acfactory): + alice, bob = acfactory.get_online_accounts(2) + + logging.info("Alice creates a verified group") + alice_chat = alice.create_group("Verified group", protect=True) + + logging.info("Bob joins verified group") + qr_code, _svg = alice_chat.get_qr_code() + bob.secure_join(qr_code) + while True: + event = alice.wait_for_event() + if event.kind == "SecurejoinInviterProgress" and event["progress"] == 1000: + break + + # Test that scanning Alice's QR code verifies Alice's profile. + bob_contact_alice = bob.get_contact_by_addr(alice.get_config("addr")) + bob_contact_alice_snapshot = bob_contact_alice.get_snapshot() + assert bob_contact_alice_snapshot.is_verified + assert bob_contact_alice_snapshot.is_profile_verified + + # Test that Alice symmetrically verified Bob's profile. + alice_contact_bob = alice.get_contact_by_addr(bob.get_config("addr")) + alice_contact_bob_snapshot = alice_contact_bob.get_snapshot() + assert alice_contact_bob_snapshot.is_verified + assert alice_contact_bob_snapshot.is_profile_verified + + @pytest.mark.xfail() def test_verified_group_recovery(acfactory, rpc) -> None: ac1, ac2, ac3 = acfactory.get_online_accounts(3)