From b7cd1a2261f0554ef7240148e3da3b60c990de54 Mon Sep 17 00:00:00 2001 From: rogurotus Date: Fri, 25 Aug 2023 12:56:20 +0300 Subject: [PATCH] fix web merge --- e2e/src/object/tracks_store.rs | 10 +++++++--- e2e/tests/steps/track.rs | 4 ++-- e2e/tests/world/member.rs | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/e2e/src/object/tracks_store.rs b/e2e/src/object/tracks_store.rs index fa3d75b7c..ab2c0bbb7 100644 --- a/e2e/src/object/tracks_store.rs +++ b/e2e/src/object/tracks_store.rs @@ -221,11 +221,15 @@ impl Object> { if ({remote}) {{ for (track of store.tracks) {{ var tr = track.track; - if ({live} && !track.stopped - && tr.media_direction() == 0) {{ + if ({live} && + !track.stopped && + tr.media_direction() == 0) + {{ count++; }} else if (!{live} && - (track.stopped || tr.media_direction() != 0)) {{ + (track.stopped || + tr.media_direction() != 0)) + {{ count++; }} }} diff --git a/e2e/tests/steps/track.rs b/e2e/tests/steps/track.rs index eb2632a6f..abd783139 100644 --- a/e2e/tests/steps/track.rs +++ b/e2e/tests/steps/track.rs @@ -1,4 +1,4 @@ -use std::time::Duration; +use std::{env, time::Duration}; use cucumber::then; use medea_e2e::object::{MediaKind, MediaSourceKind}; @@ -178,7 +178,7 @@ async fn then_doesnt_have_remote_track( kind: String, partner_id: String, ) { - let live = cfg!(feature = "sfu") && !live.is_empty(); + let live = env::var("SFU").is_ok() && !live.is_empty(); let member = world.get_member(&id).unwrap(); let partner_connection = member .connections() diff --git a/e2e/tests/world/member.rs b/e2e/tests/world/member.rs index 9e06c038b..de495027e 100644 --- a/e2e/tests/world/member.rs +++ b/e2e/tests/world/member.rs @@ -1,6 +1,6 @@ //! Medea media server member representation. -use std::{cell::RefCell, collections::HashMap, fmt, time::Duration}; +use std::{cell::RefCell, collections::HashMap, env, fmt, time::Duration}; use derive_more::{Display, Error, From}; use medea_e2e::{ @@ -219,7 +219,7 @@ impl Member { /// [`RemoteTrack`]: crate::object::remote_track::RemoteTrack #[must_use] pub fn count_of_tracks_between_members(&self, other: &Self) -> (u64, u64) { - if cfg!(feature = "sfu") { + if env::var("SFU").is_ok() { return (3, 3); }