forked from jitsi/jitsi-meet-torture
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix end meeting tests (jitsi#616)
* fix: fix end meeting tests * revert test * remove incorrect comment * fix LobbyTest
- Loading branch information
Showing
5 changed files
with
87 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/test/java/org/jitsi/meet/test/pageobjects/web/Dialogs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright @ 2018 8x8 Pty Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jitsi.meet.test.pageobjects.web; | ||
|
||
import org.jitsi.meet.test.util.*; | ||
import org.jitsi.meet.test.web.*; | ||
import org.openqa.selenium.*; | ||
import org.openqa.selenium.NoSuchElementException; | ||
import org.openqa.selenium.interactions.*; | ||
|
||
import java.util.*; | ||
|
||
/** | ||
* Manages dialogs | ||
*/ | ||
public class Dialogs | ||
{ | ||
/** | ||
* The participant on current page. | ||
*/ | ||
private final WebParticipant participant; | ||
|
||
/** | ||
* The test id for the notification when a participant joins. | ||
*/ | ||
private static final String LEAVE_REASON_ID = "dialog.leaveReason"; | ||
|
||
public Dialogs(WebParticipant participant) | ||
{ | ||
this.participant = participant; | ||
} | ||
|
||
/** | ||
* Whether the given dialog is open. | ||
* @param testId the test id to search for. | ||
* @return whether the given dialog is open. | ||
*/ | ||
private boolean isDialogOpen(String testId) | ||
{ | ||
return this.participant.getDriver().findElements(ByTestId.testId(testId)).size() > 0; | ||
} | ||
|
||
/** | ||
* Whether the leave reason dialog is open. | ||
* @return whether the leave reason dialog is open. | ||
*/ | ||
public boolean isLeaveReasonDialogOpen() | ||
{ | ||
return isDialogOpen(LEAVE_REASON_ID); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters