fix: preserve prefetched websocket payloads
This commit is contained in:
parent
40cc1a4cf2
commit
78518afbd5
|
|
@ -30,10 +30,12 @@ module TurniereE2E
|
|||
)
|
||||
)
|
||||
|
||||
wait_for! do |message|
|
||||
handshake_message = wait_for! do |message|
|
||||
message['type'] == 'confirm_subscription' ||
|
||||
(message['identifier'] == identifier && message['message'].is_a?(Hash))
|
||||
end
|
||||
|
||||
@messages << handshake_message if team_action_lists_payload_message?(handshake_message)
|
||||
end
|
||||
|
||||
def wait_for_payload!(timeout: 20)
|
||||
|
|
@ -136,5 +138,10 @@ module TurniereE2E
|
|||
rescue EOFError
|
||||
nil
|
||||
end
|
||||
|
||||
def team_action_lists_payload_message?(message)
|
||||
payload = message['message']
|
||||
payload.is_a?(Hash) && payload['type'] == 'team_action_lists.updated'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue