Skip to content

Commit

Permalink
#5347 fix locator
Browse files Browse the repository at this point in the history
  • Loading branch information
pnatashap committed Apr 24, 2024
1 parent e05b205 commit bb9782f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public class TabPage extends WebPage {
@UI("//h2[text()='Prevent scroll buttons']/following::div//div[@class='MuiTabs-root']")
public static Tabs preventScrollTabs;

@UI("//h2[text()='Vertical tab']/following::div//div[@class='MuiTabs-root']")
@UI("//h2[text()='Vertical tab']/following::div//div[contains(@class,'MuiTabs-root')]")
public static Tabs verticalTabs;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public void before() {

@Test
public void simpleTabTest() {
simpleTabs.show();
simpleTabs.has().values(equalTo(asList("ITEM ONE", "ITEM TWO", "ITEM THREE", "ITEM FOUR", "ITEM FIVE")));
simpleTabs.has().selected(1).and().value("ITEM ONE");
simpleTabs.select(2);
Expand All @@ -31,6 +32,7 @@ public void simpleTabTest() {

@Test
public void scrollableTabTest() {
scrollableTabs.show();
scrollableTabs.has().values(equalTo(asList("ITEM ONE", "ITEM TWO", "ITEM THREE", "ITEM FOUR", "ITEM FIVE",
"ITEM SIX", "ITEM SEVEN", "ITEM EIGHT", "ITEM NINE", "ITEM TEN", "ITEM ELEVEN")));
scrollableTabs.select(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,14 @@ public String imageLocator() {
public Typography typography() {
return new Typography().setCore(Typography.class, core().find(".MuiTypography-root"));
}

@Override
public boolean isDisabled() {
return core().hasClass("Mui-disabled");
}

@Override
public boolean isEnabled() {
return !this.isDisabled();
}
}

0 comments on commit bb9782f

Please sign in to comment.