File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
e2e-tests/src/main/java/io/kafbat/ui/screens Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1313import java .util .List ;
1414import java .util .stream .Collectors ;
1515import java .util .stream .Stream ;
16+ import org .openqa .selenium .By ;
1617
1718public class NaviSideBar extends BasePage {
1819
@@ -45,7 +46,7 @@ public String getPagePath(MenuItem menuItem) {
4546 @ Step
4647 public NaviSideBar openSideMenu (String clusterName , MenuItem menuItem ) {
4748 WebUtil .clickByActions (expandCluster (clusterName ).parent ()
48- .$x ( String . format ( sideMenuOptionElementLocator , menuItem .getNaviTitle ())));
49+ .find ( By . linkText ( menuItem .getNaviTitle ())));
4950 return this ;
5051 }
5152
Original file line number Diff line number Diff line change 99import io .qameta .allure .Step ;
1010import java .util .ArrayList ;
1111import java .util .List ;
12+ import java .util .NoSuchElementException ;
1213
1314public class TopicSettingsTab extends BasePage {
1415
1516 protected SelenideElement defaultValueColumnHeaderLocator = $x ("//div[text() = 'Default Value']" );
17+ protected SelenideElement nextButton = $x ("//button[contains(text(), 'Next')]" );
18+ protected SelenideElement previousButton = $x ("//button[contains(text(), 'Previous')]" );
1619
1720 @ Step
1821 public TopicSettingsTab waitUntilScreenReady () {
@@ -36,7 +39,25 @@ private TopicSettingsTab.SettingsGridItem getItemByKey(String key) {
3639
3740 @ Step
3841 public String getValueByKey (String key ) {
39- return getItemByKey (key ).getValue ();
42+ while (true ) {
43+ try {
44+ String value = getItemByKey (key ).getValue ();
45+ resetPageNavigation ();
46+ return value ;
47+ } catch (NoSuchElementException e ) {
48+ if (nextButton .isEnabled ()) {
49+ nextButton .click ();
50+ } else {
51+ throw e ;
52+ }
53+ }
54+ }
55+ }
56+
57+ private void resetPageNavigation () {
58+ while (previousButton .isEnabled ()) {
59+ previousButton .click ();
60+ }
4061 }
4162
4263 public static class SettingsGridItem extends BasePage {
You can’t perform that action at this time.
0 commit comments