Skip to content

Commit

Permalink
fix(SharedVideoTest): remove.
Browse files Browse the repository at this point in the history
As explained in jitsi@759723c youtube shared video is not working. And we are also disabling the non-youtube URLs.
  • Loading branch information
hristoterezov committed Aug 13, 2024
1 parent 759723c commit 7eeb9c0
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 57 deletions.
112 changes: 57 additions & 55 deletions src/test/java/org/jitsi/meet/test/IFrameAPICommandsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,63 +214,65 @@ public void testCommandToggleLobby()
@Test(dependsOnMethods = {"testCommandToggleLobby"})
public void testCommandStartStopShareVideo()
{
// Currently most of the code of the test is commented temporary because of restrictions on the URLs we test
// with. Once a proper URL whitelist for shared video is implemented we should uncomment the code.
hangUpAllParticipants();

this.iFrameUrl = getIFrameUrl(null, null);
ensureTwoParticipants(this.iFrameUrl, null);

WebParticipant participant1 = getParticipant1();
WebParticipant participant2 = getParticipant2();
WebDriver driver1 = participant1.getDriver();
WebDriver driver2 = participant2.getDriver();

switchToIframeAPI(driver1);

TestUtils.executeScript(driver1,
"window.jitsiAPI.executeCommand('startShareVideo', '" + SharedVideoTest.V2_LINK + "');");

switchToMeetContent(this.iFrameUrl, driver1);

TestUtils.waitForDisplayedElementByID(
driver1,
"sharedVideoPlayer",
10);

// Now let's check the second participant state
// make sure we are in meet, not in the frame
driver2.switchTo().defaultContent();
TestUtils.waitForDisplayedElementByID(
driver2,
"sharedVideoPlayer",
10);

switchToIframeAPI(driver1);

TestUtils.executeScript(driver1,
"window.jitsiAPI.executeCommand('stopShareVideo');");

switchToMeetContent(this.iFrameUrl, driver1);

try
{
TestUtils.waitForNotDisplayedElementByID(
driver1, "sharedVideoPlayer", 5);
}
catch(StaleElementReferenceException ex)
{
// if the element is detached in a process of checking its display
// status, means it is not visible anymore
}
try
{
TestUtils.waitForNotDisplayedElementByID(
driver2, "sharedVideoPlayer", 5);
}
catch(StaleElementReferenceException ex)
{
// if the element is detached in a process of checking its display
// status, means it is not visible anymore
}
// this.iFrameUrl = getIFrameUrl(null, null);
// ensureTwoParticipants(this.iFrameUrl, null);

// WebParticipant participant1 = getParticipant1();
// WebParticipant participant2 = getParticipant2();
// WebDriver driver1 = participant1.getDriver();
// WebDriver driver2 = participant2.getDriver();

// switchToIframeAPI(driver1);

// TestUtils.executeScript(driver1,
// "window.jitsiAPI.executeCommand('startShareVideo', '" + SharedVideoTest.V2_LINK + "');");

// switchToMeetContent(this.iFrameUrl, driver1);

// TestUtils.waitForDisplayedElementByID(
// driver1,
// "sharedVideoPlayer",
// 10);

// // Now let's check the second participant state
// // make sure we are in meet, not in the frame
// driver2.switchTo().defaultContent();
// TestUtils.waitForDisplayedElementByID(
// driver2,
// "sharedVideoPlayer",
// 10);

// switchToIframeAPI(driver1);

// TestUtils.executeScript(driver1,
// "window.jitsiAPI.executeCommand('stopShareVideo');");

// switchToMeetContent(this.iFrameUrl, driver1);

// try
// {
// TestUtils.waitForNotDisplayedElementByID(
// driver1, "sharedVideoPlayer", 5);
// }
// catch(StaleElementReferenceException ex)
// {
// // if the element is detached in a process of checking its display
// // status, means it is not visible anymore
// }
// try
// {
// TestUtils.waitForNotDisplayedElementByID(
// driver2, "sharedVideoPlayer", 5);
// }
// catch(StaleElementReferenceException ex)
// {
// // if the element is detached in a process of checking its display
// // status, means it is not visible anymore
// }
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/desktop/testng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@
<class name="org.jitsi.meet.test.ReloadTest" />
</classes>
</test>
<test name="SharedVideoTest">
<!-- <test name="SharedVideoTest">
<classes>
<class name="org.jitsi.meet.test.SharedVideoTest" />
</classes>
</test>
</test> -->
<test name="SingleModeratorTest">
<classes>
<class name="org.jitsi.meet.test.misc.SingleModeratorTest" />
Expand Down

0 comments on commit 7eeb9c0

Please sign in to comment.