-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5492 from jdi-testing/master
sync with master
- Loading branch information
Showing
89 changed files
with
662 additions
and
691 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
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
5 changes: 2 additions & 3 deletions
5
...light-material-ui-tests/src/main/java/io/github/com/pages/navigation/ContextMenuPage.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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package io.github.com.pages.navigation; | ||
|
||
import com.epam.jdi.light.elements.complex.Menu; | ||
import com.epam.jdi.light.elements.composite.WebPage; | ||
import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI; | ||
import com.epam.jdi.light.material.elements.navigation.Menu; | ||
import com.epam.jdi.light.ui.html.elements.common.Text; | ||
|
||
public class ContextMenuPage extends WebPage { | ||
|
||
@UI("p.MuiTypography-root") | ||
public static Text pageText; | ||
|
||
// @todo #5297 Check the locator, looks like it points to item, not for Menu | ||
@UI(".MuiMenuItem-root") | ||
@UI(".MuiMenu-list") | ||
public static Menu contextMenuList; | ||
} |
7 changes: 4 additions & 3 deletions
7
jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/StepperPage.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
17 changes: 9 additions & 8 deletions
17
jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/TabPage.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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
package io.github.com.pages.navigation; | ||
|
||
import com.epam.jdi.light.elements.common.UIElement; | ||
import com.epam.jdi.light.elements.composite.WebPage; | ||
import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI; | ||
import com.epam.jdi.light.material.elements.layout.Container; | ||
import com.epam.jdi.light.material.elements.navigation.Tabs; | ||
|
||
public class TabPage extends WebPage { | ||
|
||
@UI("h2+div[1] .MuiTabs-root") | ||
@UI("//h2[text()='Simple tabs']/following::div//div[@class='MuiTabs-root']") | ||
public static Tabs simpleTabs; | ||
|
||
// @todo #5297 Fix locator to be more stable for layout | ||
@UI("//div[./h2[text()='Simple tabs']]/div[1]/div[@role='tabpanel' and not(@hidden)]") | ||
public static Container simplePanels; | ||
// @todo #5347 Box control should be added as a Container https://v4.mui.com/api/container/ | ||
// test page also exists https://jdi-testing.github.io/jdi-light/material/box_layout | ||
@UI("//h2[text()='Simple tabs']/following::div/div[@role='tabpanel' and not(@hidden)]") | ||
public static UIElement simplePanels; | ||
|
||
@UI("h2+div[2] .MuiTabs-root") | ||
@UI("//h2[text()='Scrollable tabs']/following::div//div[@class='MuiTabs-root']") | ||
public static Tabs scrollableTabs; | ||
|
||
@UI("h2+div[3] .MuiTabs-root") | ||
@UI("//h2[text()='Prevent scroll buttons']/following::div//div[@class='MuiTabs-root']") | ||
public static Tabs preventScrollTabs; | ||
|
||
@UI("h2+div[4] .MuiTabs-root") | ||
@UI("//h2[text()='Vertical tab']/following::div//div[contains(@class,'MuiTabs-root')]") | ||
public static Tabs verticalTabs; | ||
} |
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
16 changes: 0 additions & 16 deletions
16
jdi-light-material-ui-tests/src/main/java/io/github/com/pages/utils/PopoverHoverFrame.java
This file was deleted.
Oops, something went wrong.
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
39 changes: 39 additions & 0 deletions
39
...ial-ui-tests/src/test/java/io/github/epam/material/tests/navigation/ContextMenuTests.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,39 @@ | ||
package io.github.epam.material.tests.navigation; | ||
|
||
import com.epam.jdi.light.ui.html.elements.common.Button; | ||
import io.github.epam.TestsInit; | ||
import io.github.epam.test.data.MenuDataProvider; | ||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import static com.jdiai.tools.Timer.waitCondition; | ||
import static io.github.com.StaticSite.contextMenuPage; | ||
import static io.github.com.StaticSite.simpleMenuPage; | ||
import static io.github.com.pages.navigation.ContextMenuPage.contextMenuList; | ||
import static io.github.com.pages.navigation.ContextMenuPage.pageText; | ||
import static io.github.com.pages.navigation.SimpleMenuPage.*; | ||
|
||
public class ContextMenuTests extends TestsInit { | ||
|
||
private static final List<String> CONTEXT_MENU_ITEMS = Arrays.asList("Copy", "Print", "Highlight", "Email"); | ||
|
||
@BeforeMethod | ||
public void before() { | ||
contextMenuPage.open(); | ||
contextMenuPage.isOpened(); | ||
} | ||
|
||
@Test | ||
public void contextMenuTest() { | ||
pageText.is().displayed(); | ||
|
||
pageText.rightClick(); | ||
menu.is().displayed().and().has().itemsTexts(CONTEXT_MENU_ITEMS); | ||
contextMenuList.select("Print"); | ||
waitCondition(() -> menu.isHidden()); | ||
menu.is().hidden(); | ||
} | ||
} |
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
Oops, something went wrong.