mirror of https://github.com/OpenVidu/openvidu.git
e2e tests updated to support new styled insecure tutorials
parent
58ec882eff
commit
028362fd8a
|
@ -9,14 +9,14 @@ Feature: Connecting To Session
|
||||||
And users fill "sessionId" input with session name <session>
|
And users fill "sessionId" input with session name <session>
|
||||||
When users click on "commit" button
|
When users click on "commit" button
|
||||||
Then users should see title <session> in element with id "session-header"
|
Then users should see title <session> in element with id "session-header"
|
||||||
And "1" video element/s should be shown in element with id "publisher"
|
And "1" video element/s should be shown in element with id "main-video"
|
||||||
And "1" video element/s in "publisher" should be playing media
|
And "1" video element/s in "main-video" should be playing media
|
||||||
And users should see other users nicknames in paragraph element
|
And users should see other users nicknames
|
||||||
And all video elements should be shown in element with id "subscriber"
|
And all video elements should be shown in element with id "video-container"
|
||||||
And all video elements in "subscriber" should be playing media
|
And all video elements in "video-container" should be playing media
|
||||||
And <firefoxUsers> leave session
|
And <firefoxUsers> leave session
|
||||||
And <firefoxUsers> see "Join a video session" text in "h1" element
|
And <firefoxUsers> see "Join a video session" text in "h1" element
|
||||||
And <chromeUsers> div "subscriber" should have <chromeUsers> videos
|
And <chromeUsers> div "video-container" should have <chromeUsers> videos
|
||||||
And close all browsers
|
And close all browsers
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class StepsConnectingToSession {
|
||||||
public void all_video_elements_should_be_shown_in_element_with_id_something(String strArg1) throws Throwable {
|
public void all_video_elements_should_be_shown_in_element_with_id_something(String strArg1) throws Throwable {
|
||||||
for (BrowserUser user : this.browserUsers.values()) {
|
for (BrowserUser user : this.browserUsers.values()) {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
user.getWaiter().until(ExpectedConditions.numberOfElementsToBe(By.cssSelector("#" + strArg1 + " video"), this.browserUsers.size() - 1));
|
user.getWaiter().until(ExpectedConditions.numberOfElementsToBe(By.cssSelector("#" + strArg1 + " video"), this.browserUsers.size()));
|
||||||
}).run();
|
}).run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,19 +126,17 @@ public class StepsConnectingToSession {
|
||||||
numOfVideosPlaying++;
|
numOfVideosPlaying++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.assertEquals(numOfVideosPlaying, this.browserUsers.size() - 1);
|
Assert.assertEquals(numOfVideosPlaying, this.browserUsers.size());
|
||||||
}).run();
|
}).run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Then("^users should see other users nicknames in paragraph element$")
|
@Then("^users should see other users nicknames$")
|
||||||
public void users_should_see_other_users_nicknames_in_paragraph_element() throws Throwable {
|
public void users_should_see_other_users_nicknames_in_paragraph_element() throws Throwable {
|
||||||
for (BrowserUser user : this.browserUsers.values()) {
|
for (BrowserUser user : this.browserUsers.values()) {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
for (Entry<String, BrowserUser> entry : this.browserUsers.entrySet()) {
|
for (Entry<String, BrowserUser> entry : this.browserUsers.entrySet()) {
|
||||||
if (entry.getValue().getUserName() != user.getUserName()) {
|
user.getWaiter().until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector("#data-" + entry.getKey() + " p"), entry.getKey()));
|
||||||
user.getWaiter().until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector("div#subscriber p#data-" + entry.getKey()), entry.getKey()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}).run();
|
}).run();
|
||||||
}
|
}
|
||||||
|
@ -172,9 +170,7 @@ public class StepsConnectingToSession {
|
||||||
List<String> users = this.fromArrayStringifyToList(usersInRoom);
|
List<String> users = this.fromArrayStringifyToList(usersInRoom);
|
||||||
if (users.contains(user.getUserName())) {
|
if (users.contains(user.getUserName())) {
|
||||||
for (String u : users) {
|
for (String u : users) {
|
||||||
if (!u.equals(user.getUserName())) {
|
user.getWaiter().until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("#" + strArg1 + " video#" + "native-video-" + u + "_webcam")));
|
||||||
user.getWaiter().until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("#" + strArg1 + " video#" + "native-video-" + u + "_webcam")));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).run();
|
}).run();
|
||||||
|
|
Loading…
Reference in New Issue