Skip to content

Commit

Permalink
#5341 fix ButtonGroup class
Browse files Browse the repository at this point in the history
  • Loading branch information
pnatashap committed Apr 8, 2024
1 parent 1b2c933 commit 0cad90a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@

public class ButtonGroupPage extends WebPage {

// @todo #5297 Check locators, the class is the same is for Button
@UI("div[aria-label = 'outlined primary button group'] .MuiButton-root")
@UI("div[aria-label = 'outlined primary button group'].MuiButtonGroup-root")
public static ButtonGroup basicButtonGroup;

@UI("div[aria-label = 'vertical contained primary button group'] .MuiButton-root")
@UI("div[aria-label = 'vertical contained primary button group'].MuiButtonGroup-root")
public static ButtonGroup verticalButtonGroup;

@UI("div[aria-label = 'split button'] .MuiButton-root")
@UI("div[aria-label = 'split button'].MuiButtonGroup-root")
public static ButtonGroup splitButtonGroup;

@UI("#split-button-menu")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.epam.jdi.light.material.elements.inputs;

import com.epam.jdi.light.common.JDIAction;
import com.epam.jdi.light.elements.base.JDIBase;
import com.epam.jdi.light.elements.base.UIListBase;
import com.epam.jdi.light.elements.common.UIElement;
import com.epam.jdi.light.elements.complex.WebList;
import com.epam.jdi.light.material.asserts.inputs.ButtonGroupAssert;
import com.epam.jdi.light.ui.html.elements.common.Button;
import java.util.List;
Expand All @@ -12,10 +14,16 @@
* Represents button group MUI component on GUI.
*
* @see <a href="https://v4.mui.com/components/button-group/">Button group MUI documentation</a>
* @see <a href="https://jdi-testing.github.io/jdi-light/material">MUI test page</a>
* @see <a href="https://jdi-testing.github.io/jdi-light/material/button_groups">MUI test page</a>
*/
public class ButtonGroup extends UIListBase<ButtonGroupAssert> {

@Override
public WebList list() {
WebList webList = new WebList(core().find(".//button")).setup(JDIBase::searchVisible);
webList.setStartIndex(getStartIndex());
return webList;
}
/**
* Gets specific button of this button group using its index.
*
Expand Down

0 comments on commit 0cad90a

Please sign in to comment.