11from uuid import uuid4
22import pytest
33from steps import messenger
4+ from resources .constants import FULL_NODE , LIGHT_CLIENT
45from resources .enums import MessageContentType
56
67
78@pytest .mark .rpc
9+ @pytest .mark .parametrize (
10+ "waku_light_client" ,
11+ [
12+ pytest .param (False , id = FULL_NODE ),
13+ pytest .param (True , id = LIGHT_CLIENT , marks = pytest .mark .xfail (reason = "status-go#7393 filter subscription race" , strict = False )),
14+ ],
15+ indirect = True ,
16+ )
817class TestCreatePrivateGroups :
918
1019 @pytest .fixture ()
11- def community_admin (self , backend_new_profile ):
12- return backend_new_profile ("community_admin" )
20+ def community_admin (self , backend_new_profile , waku_light_client ):
21+ return backend_new_profile ("community_admin" , waku_light_client = waku_light_client )
1322
1423 @pytest .fixture ()
15- def community_member (self , backend_new_profile ):
16- return backend_new_profile ("community_member" )
24+ def community_member (self , backend_new_profile , waku_light_client ):
25+ return backend_new_profile ("community_member" , waku_light_client = waku_light_client )
1726
1827 def test_create_group_chat_with_members (self , community_admin , community_member ):
1928 messenger .make_contacts (community_admin , community_member )
@@ -60,8 +69,8 @@ def test_leave_group_chat(self, community_admin, community_member):
6069 assert len (members_after_leave ) == 1
6170 assert community_admin .public_key not in str (members_after_leave )
6271
63- def test_send_group_chat_invitation_request (self , community_admin , community_member , backend_new_profile ):
64- third_node = backend_new_profile ("third_node" )
72+ def test_send_group_chat_invitation_request (self , community_admin , community_member , backend_new_profile , waku_light_client ):
73+ third_node = backend_new_profile ("third_node" , waku_light_client = waku_light_client )
6574 messenger .make_contacts (community_admin , third_node )
6675
6776 messenger .make_contacts (community_admin , community_member )
@@ -103,8 +112,8 @@ def test_create_group_chat_from_invitation(self, community_admin, community_memb
103112 assert chats [0 ].get ("invitationAdmin" , "" ) == community_admin .public_key
104113 assert chats [0 ].get ("name" , "" ) == invitation_group
105114
106- def test_add_members_to_group_chat (self , community_admin , community_member , backend_new_profile ):
107- third_node = backend_new_profile ("third_node" )
115+ def test_add_members_to_group_chat (self , community_admin , community_member , backend_new_profile , waku_light_client ):
116+ third_node = backend_new_profile ("third_node" , waku_light_client = waku_light_client )
108117 messenger .make_contacts (community_admin , third_node )
109118
110119 messenger .make_contacts (community_admin , community_member )
@@ -146,8 +155,8 @@ def test_remove_member_from_group_chat(self, community_admin, community_member):
146155 message_pattern = f"@{ community_member .public_key } left the group" ,
147156 )[0 ]
148157
149- def test_remove_members_from_group_chat (self , community_admin , community_member , backend_new_profile ):
150- third_node = backend_new_profile ("third_node" )
158+ def test_remove_members_from_group_chat (self , community_admin , community_member , backend_new_profile , waku_light_client ):
159+ third_node = backend_new_profile ("third_node" , waku_light_client = waku_light_client )
151160 messenger .make_contacts (community_admin , third_node )
152161
153162 messenger .make_contacts (community_admin , community_member )
@@ -211,8 +220,8 @@ def test_change_group_chat_name(self, community_admin, community_member):
211220 assert chats [0 ].get ("name" , "" ) == new_group_name
212221
213222 @pytest .mark .skip (reason = "waiting for https://github.com/status-im/status-go/issues/6752 resolution" )
214- def test_get_group_chat_invitations (self , community_admin , community_member , backend_new_profile ):
215- third_node = backend_new_profile ("third_node" )
223+ def test_get_group_chat_invitations (self , community_admin , community_member , backend_new_profile , waku_light_client ):
224+ third_node = backend_new_profile ("third_node" , waku_light_client = waku_light_client )
216225 messenger .make_contacts (community_admin , third_node )
217226
218227 messenger .make_contacts (community_admin , community_member )
@@ -230,8 +239,8 @@ def test_get_group_chat_invitations(self, community_admin, community_member, bac
230239 third_node .wakuext_service .get_group_chat_invitations ()
231240 # TODO: Add more assertions on response
232241
233- def test_send_group_chat_invitation_rejection (self , community_admin , community_member , backend_new_profile ):
234- third_node = backend_new_profile ("third_node" )
242+ def test_send_group_chat_invitation_rejection (self , community_admin , community_member , backend_new_profile , waku_light_client ):
243+ third_node = backend_new_profile ("third_node" , waku_light_client = waku_light_client )
235244 messenger .make_contacts (community_admin , third_node )
236245
237246 messenger .make_contacts (community_admin , community_member )
0 commit comments