Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Run StartMutedTest in both p2p mode (as intended) and jvb mode. #333

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions src/test/java/org/jitsi/meet/test/StartMutedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public void setupClass()
@Test
public void checkboxesTest()
{
WebDriver driver1 = getParticipant1().getDriver();

WebParticipant participant1 = getParticipant1();

participant1.getToolbar().clickSettingsButton();
Expand Down Expand Up @@ -88,8 +86,7 @@ public void configOptionsTest()
WebParticipant participant2 = getParticipant2();

final WebDriver driver2 = participant2.getDriver();
consolePrint(participant1,
"Start configOptionsTest, second participant: " + participant2.getEndpointId());
consolePrint(participant1, "Start configOptionsTest, second participant: " + participant2.getEndpointId());

participant1.waitForIceConnected();

Expand All @@ -103,8 +100,7 @@ public void configOptionsTest()

// Unmute and see if the audio works
participant2.getToolbar().clickAudioMuteButton();
consolePrint(participant1,
"configOptionsTest, unmuted second participant");
consolePrint(participant1, "configOptionsTest, unmuted second participant");
MeetUIUtils.waitForAudioMuted(
participant1.getDriver(),
driver2,
Expand All @@ -117,6 +113,12 @@ public void configOptionsTest()
*/
@Test(dependsOnMethods = { "configOptionsTest" })
public void startWithVideoMutedCanUnmute()
{
startWithVideoMutedCanUnmute(true);
startWithVideoMutedCanUnmute(false);
}

private void startWithVideoMutedCanUnmute(boolean enableP2p)
{
WebParticipant participant1 = getParticipant1();
WebParticipant participant2 = getParticipant2();
Expand All @@ -138,14 +140,18 @@ public void startWithVideoMutedCanUnmute()

hangUpAllParticipants();

// Explicitly enable P2P due to a regression with unmute not updating
// large video while in P2P.
JitsiMeetUrl url
= getJitsiMeetUrl().appendConfig(
"config.startWithVideoMuted=true&" +
"config.p2p.enabled=true");
JitsiMeetUrl url = getJitsiMeetUrl()
.appendConfig("config.startWithVideoMuted=true")
.appendConfig("config.p2p.enabled=" + enableP2p);
ensureTwoParticipants(url, url);

// Make sure we're using the expected connection (the call starts in jvb and might need some time to switch
// to p2p).
TestUtils.waitForCondition(
participant1.getDriver(),
10,
d -> participant1.getRtpStatistics().getRtpTransport().isP2P() == enableP2p);

MeetUIUtils.assertMuteIconIsDisplayed(
participant1.getDriver(),
participant2.getDriver(),
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/jitsi/meet/test/web/WebParticipant.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public String getProtocol()
* {@inheritDoc}
*/
@Override
protected RtpStatistics getRtpStatistics()
public RtpStatistics getRtpStatistics()
{
return new WebRtpStatistics(this);
}
Expand Down