Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync with master #5492

Merged
merged 73 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
3486e61
#5302 removing case, as it is not good
pnatashap Apr 6, 2024
0ad7ee6
#5308 add interfaces instead of validating styles in assertion
pnatashap Apr 6, 2024
a1b4fea
#5308 fix test
pnatashap Apr 6, 2024
5e50faf
Merge pull request #5419 from jdi-testing/5308
pnatashap Apr 7, 2024
9fb57e0
#5309 beautify chip
pnatashap Apr 7, 2024
701ec06
Merge pull request #5427 from jdi-testing/5309
pnatashap Apr 7, 2024
2f45675
#5309 fix locators
pnatashap Apr 7, 2024
50d193f
#5309 fix imports
pnatashap Apr 7, 2024
1b2c933
Merge pull request #5429 from jdi-testing/5355
pnatashap Apr 7, 2024
0cad90a
#5341 fix ButtonGroup class
pnatashap Apr 8, 2024
1de3f66
#5341 fix ButtonGroup wrong usage
pnatashap Apr 8, 2024
f4761f8
#5341 remove unused imports
pnatashap Apr 8, 2024
66d1f66
#5341 remove unused imports
pnatashap Apr 8, 2024
1b9aabe
#5341 disable test
pnatashap Apr 8, 2024
2ac235e
#5341 disable test
pnatashap Apr 8, 2024
b75fa5e
#5341 disable test
pnatashap Apr 9, 2024
02a7609
#5341 remove imports
pnatashap Apr 9, 2024
db9885f
Merge pull request #5430 from jdi-testing/5341
pnatashap Apr 9, 2024
5768e75
#5313 add some comments
pnatashap Apr 9, 2024
6665de5
#5314 clear Inputs control from notclear methods
pnatashap Apr 10, 2024
f88fbca
#5314 remove import
pnatashap Apr 10, 2024
c4780fe
Merge pull request #5440 from jdi-testing/5314
pnatashap Apr 10, 2024
b26897e
#5311 fix landscape and remove color reformating to keep-as-is
pnatashap Apr 10, 2024
365f72b
#5311 add background method
pnatashap Apr 10, 2024
37157ef
Merge pull request #5444 from jdi-testing/5311
pnatashap Apr 11, 2024
77ee404
#5324 remove comment
pnatashap Apr 11, 2024
572f0f8
#5310 Fix some validators
pnatashap Apr 11, 2024
4f96915
Merge pull request #5449 from jdi-testing/5310
pnatashap Apr 11, 2024
67556d7
#5318 refactor SlideGroup
pnatashap Apr 11, 2024
9ad153e
#5318 remove imports
pnatashap Apr 11, 2024
82a1d4f
Merge pull request #5453 from jdi-testing/5318
pnatashap Apr 12, 2024
00414e5
#5329 replace thid.find to core().find
pnatashap Apr 12, 2024
8f6b2e2
Merge pull request #5456 from jdi-testing/5329
pnatashap Apr 12, 2024
baa2d65
#5323 fixing items validation
pnatashap Apr 12, 2024
00b06bf
Merge pull request #5459 from jdi-testing/5323
pnatashap Apr 12, 2024
80391d5
#5331 fix ItemGroup
pnatashap Apr 13, 2024
7695efa
#5331 stabilize test
pnatashap Apr 13, 2024
3c3bdb1
Merge pull request #5461 from jdi-testing/5331
pnatashap Apr 13, 2024
c48e7f2
#5320 Fix TextField
pnatashap Apr 13, 2024
dc65a3a
Merge pull request #5462 from jdi-testing/5320
pnatashap Apr 13, 2024
fdaebe2
#5346 Fix Menu usage and MaterialUI Menu
pnatashap Apr 13, 2024
9b20345
Merge pull request #5464 from jdi-testing/5346
pnatashap Apr 14, 2024
95403e4
#5336 add area-label to index (if text is empty)
pnatashap Apr 14, 2024
67004cd
#5336 fix imports
pnatashap Apr 14, 2024
db4f4a2
#5336 add cmt for badge
pnatashap Apr 14, 2024
f197988
Merge pull request #5466 from jdi-testing/5336
pnatashap Apr 14, 2024
5b09e51
#5336 add cmt for badge
pnatashap Apr 14, 2024
b31b7d0
Merge pull request #5468 from jdi-testing/5319
pnatashap Apr 14, 2024
1184b47
#5431 add assertions for Dialog
pnatashap Apr 15, 2024
3122b3a
Merge pull request #5469 from jdi-testing/5431
pnatashap Apr 15, 2024
f80e669
#5420 add HasRounded to Autocomplete
pnatashap Apr 16, 2024
6bc0a38
#5420 add isEnabled override
pnatashap Apr 16, 2024
50fcda8
Merge pull request #5472 from jdi-testing/5420
pnatashap Apr 16, 2024
1f83145
#5474 add isEnabled implementation
pnatashap Apr 17, 2024
f309667
Merge pull request #5475 from jdi-testing/5474
pnatashap Apr 17, 2024
b30ceca
#5365 fix locators
pnatashap Apr 17, 2024
a879e85
Merge pull request #5476 from jdi-testing/5365
pnatashap Apr 17, 2024
ea29b42
#5359 fix locators to be clear
pnatashap Apr 18, 2024
c109bb3
Merge pull request #5477 from jdi-testing/5359
pnatashap Apr 18, 2024
a53a2d8
#5361 Fix locators
pnatashap Apr 19, 2024
ee02db7
Merge pull request #5478 from jdi-testing/5361
pnatashap Apr 21, 2024
08be07c
#5351 Not required class
pnatashap Apr 21, 2024
72d00db
Merge pull request #5480 from jdi-testing/5351
pnatashap Apr 21, 2024
70867b9
#5363 Fix locators, add tasks
pnatashap Apr 22, 2024
b281431
Merge pull request #5481 from jdi-testing/5363
pnatashap Apr 22, 2024
d9d4442
#5349 Fix appbar locator
pnatashap Apr 23, 2024
64c778f
Merge pull request #5484 from jdi-testing/5349
pnatashap Apr 23, 2024
d4efc2d
#5347 change locators
pnatashap Apr 24, 2024
e05b205
#5347 remove import
pnatashap Apr 24, 2024
bb9782f
#5347 fix locator
pnatashap Apr 24, 2024
3150f5b
Merge pull request #5486 from jdi-testing/5347
pnatashap Apr 24, 2024
e51f8c0
#5347 fix locator
pnatashap Apr 25, 2024
01cb8c3
Merge pull request #5489 from jdi-testing/5343
pnatashap Apr 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.github.epam.html.tests.elements.complex;

import io.github.epam.TestsInit;
import org.openqa.selenium.By;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

Expand Down Expand Up @@ -66,12 +65,4 @@ public void isValidationTest() {
public void assertValidationTest() {
odds.assertThat().values(contains("1", "3", "5", "7"));
}

// @todo #5048 Transform to test, now there is no validation
@Test(enabled = false)
public void problems() {
odds.list();
odds.core().finds(By.xpath("../")).get(1).getTagName();
odds.core().findElements(By.xpath("../"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
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.displaydata.Badge;
import com.epam.jdi.light.material.elements.inputs.ButtonGroup;
import com.epam.jdi.light.material.elements.inputs.Switch;
import com.epam.jdi.light.ui.html.elements.common.Button;

import java.util.List;

Expand All @@ -18,12 +18,8 @@ public class BadgePage extends WebPage {
@UI("#secondaryColorBadge")
public static Badge secondaryColorBadgeContainer;

// @todo #5297 Button should be used from ButtomGruop, not directly as single
@UI(".MuiButtonGroup-root button[aria-label='reduce']")
public static Button buttonReduce;

@UI(".MuiButtonGroup-root button[aria-label='increase']")
public static Button buttonIncrease;
@UI(".MuiButtonGroup-root")
public static ButtonGroup buttons;

@UI("//span[text()='Show Zero']/preceding-sibling::span[contains(@class,'MuiSwitch-root')]")
public static Switch switchShowZero;
Expand Down
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
Expand Up @@ -9,38 +9,38 @@

public class TextFieldPage extends WebPage {

// @todo #5297 Fix locators for more stable variant
@UI("//input[@id='standard-required']/../..")
@UI("//*[contains(@class, 'MuiTextField-root')][.//input[@id='standard-required']]")
public static TextField requiredTextField;

@UI("//input[@id='standard-disabled']/../..")
@UI("//*[contains(@class, 'MuiTextField-root')][.//input[@id='standard-disabled']]")
public static TextField disabledTextField;

@UI("//input[@id='standard-password-input']/../..")
@UI("//*[contains(@class, 'MuiTextField-root')][.//input[@id='standard-password-input']]")
public static TextField passwordTextField;

@UI("//input[@id='standard-read-only-input']/../..")
@UI("//*[contains(@class, 'MuiTextField-root')][.//input[@id='standard-read-only-input']]")
public static TextField readOnlyTextField;

@UI("//input[@id='standard-number']/../..")
@UI("//*[contains(@class, 'MuiTextField-root')][.//input[@id='standard-number']]")
public static TextField numberTextField;

@UI("//input[@id='standard-search']/../..")
@UI("//*[contains(@class, 'MuiTextField-root')][.//input[@id='standard-search']]")
public static TextField searchTextField;

@UI("//input[@id='standard-helperText']/../..")
@UI("//*[contains(@class, 'MuiTextField-root')][.//input[@id='standard-helperText']]")
public static TextField helperTextTextField;

@UI("//form[@id='formProps']/div[2]/div[contains(@class, 'MuiTextField-root')]")
@UI("//h2[text()='Validation']//following::div[1]/*[contains(@class, 'MuiTextField-root')]")
public static List<TextField> validationTextFields;

@UI("//form[@id='formProps']/div[3]/div[contains(@class, 'MuiTextField-root')]")
@UI("//h2[text()='Multiline']//following::div[1]/*[contains(@class, 'MuiTextField-root')]")
public static List<MultilineTextField> multilineTextFields;

@UI("//form[@id='formProps']/div[4]/div[contains(@class, 'MuiTextField-root')]")
@UI("//h2[text()='Select']//following::div[1]/*[contains(@class, 'MuiTextField-root')]")
public static List<SelectTextField> selectTextFields;

@UI("//form[@id='formProps']/div[5]/div[contains(@class, 'MuiFormControl-root')]")
// @todo #5343 Check that all fields are TextFields, only two of them has such class
@UI("//h2[text()='Input Adornments']//following::div[1]/*[contains(@class, 'MuiFormControl-root')]")
public static List<TextField> inputAdornmentsTextFields;

}
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;
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
package io.github.com.pages.navigation;

import com.epam.jdi.light.elements.complex.WebList;
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.inputs.ButtonGroup;
import com.epam.jdi.light.material.elements.inputs.MUIButton;
import com.epam.jdi.light.material.elements.navigation.steppers.MUIStepper;
import com.epam.jdi.light.material.elements.navigation.steppers.MobileStepper;
import com.epam.jdi.light.ui.html.elements.common.Text;


public class StepperPage extends WebPage {

@UI("#simpleStepper")
public static MUIStepper simpleLinearStepper;

@UI("#simpleStepper < * button")
public static ButtonGroup simpleLinearButtons;
public static WebList simpleLinearButtons;

@UI("p.MuiTypography-root")
public static Text activeLinearStepText;

@UI("#nonLinearStepper")
public static MUIStepper nonlinearStepper;
@UI("#nonLinearStepper + div button")
public static ButtonGroup nonLinearButtons;
public static WebList nonLinearButtons;

@UI("#activeNonLinearStep")
public static Text activeNonLinearStepText;
Expand Down
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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

public class BackToTopAppBarPage extends WebPage {

// @todo #5297 Check the locator, looks like it is not for AppBar (or use correct classname)
@UI(".MuiBox-root[1]")
@UI(".MuiAppBar-root")
public static AppBar backToTopAppBar;

@UI("div[role=presentation]")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.com.pages.surfaces;

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.inputs.Switch;
import com.epam.jdi.light.material.elements.navigation.Menu;
import com.epam.jdi.light.material.elements.surfaces.AppBar;

public class SimpleAppBarPage extends WebPage {
Expand All @@ -17,7 +17,7 @@ public class SimpleAppBarPage extends WebPage {
@UI(".MuiAppBar-root[2]")
public static AppBar appBarWithMenu;

@UI(".MuiMenuItem-root")
@UI(".MuiMenu-list")
public static Menu appBarMenuItems;

@UI(".MuiAppBar-root[3]")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import static com.epam.jdi.light.material.elements.utils.enums.Position.TOP_RIGHT;
import static io.github.com.StaticSite.badgePage;
import static io.github.com.pages.displaydata.BadgePage.badgeDifferentPosition;
import static io.github.com.pages.displaydata.BadgePage.buttonIncrease;
import static io.github.com.pages.displaydata.BadgePage.buttonReduce;
import static io.github.com.pages.displaydata.BadgePage.buttons;
import static io.github.com.pages.displaydata.BadgePage.dotBadgeContainer;
import static io.github.com.pages.displaydata.BadgePage.secondaryColorBadgeContainer;
import static io.github.com.pages.displaydata.BadgePage.switchShowBadge;
Expand All @@ -31,7 +30,7 @@ public void variousBadgeTest() {
.and().has().text(Matchers.equalTo("1"))
.and().has().position(TOP_RIGHT.toString());

buttonReduce.click();
buttons.button("reduce").click();
secondaryColorBadgeContainer
.has().text(Matchers.equalTo("0"))
.and().is().notVisible();
Expand All @@ -46,7 +45,7 @@ public void variousBadgeTest() {
public void maxValueTest() {
for (int i = 1; i <= 10; i++) {
secondaryColorBadgeContainer.has().text(Matchers.equalTo(String.valueOf(i)));
buttonIncrease.click();
buttons.button("increase").click();
}
secondaryColorBadgeContainer.has().text(Matchers.equalTo("10+"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ public void before() {
dialogPage.isOpened();
}


@Test(dataProviderClass = DialogDataProvider.class, dataProvider = "simpleDialogDataProvider")
// @todo #5341 Closing dialog should not change anything on the page,
// only explicit click on buttons should be used
@Test(enabled = false, dataProviderClass = DialogDataProvider.class, dataProvider = "simpleDialogDataProvider")
public void simpleDialogTest(String titleText, int index, String text) {
simpleDialogButton.click();
simpleDialogButton.dialog().is().displayed();
simpleDialogButton.dialog().is().displayed().and().has().title();
simpleDialogButton.dialog().title().has().text(titleText);
simpleDialogButton.dialog().list().has().size(3);
simpleDialogButton.dialog().list().items().get(index).has().text(text);
Expand All @@ -53,7 +54,8 @@ public void alertDialogTest() {
alertDialogButton.actionText().has().text("Selected: ok");
}

@Test
// @todo #5341 Closing dialog should not change anything on the page, explicit click on buttons should be used
@Test(enabled = false)
public void formDialogsTest() {
final String email = "email@example.com";
formDialogButton.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ public void standardAmountAdornmentTextFieldTests() {
amountAdornmentTextField.has().text(randomString);
}

@Test
// @todo #5343 Check SelectTextField on Select functionality, default locators does not work
@Test(enabled = false)
public void selectTextFieldTest() {
SelectTextField selectTextField = selectTextFields.get(1);
selectTextField.show();
Expand Down
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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
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.iconMenuButton;
import static io.github.com.pages.navigation.SimpleMenuPage.menu;
import static io.github.com.pages.navigation.SimpleMenuPage.scrollMenuButton;
Expand All @@ -26,8 +21,6 @@

public class MenuTests extends TestsInit {

private static final List<String> CONTEXT_MENU_ITEMS = Arrays.asList("Copy", "Print", "Highlight", "Email");

@BeforeMethod
public void before() {
simpleMenuPage.open();
Expand Down Expand Up @@ -90,17 +83,4 @@ public void scrollMenuTest() {
menu.select(option);
selectedScrollMenuItem.has().text("Selected menu: " + option);
}

@Test
public void contextMenuTest() {
contextMenuPage.open();
contextMenuPage.isOpened();
pageText.is().displayed();

pageText.rightClick();
menu.is().displayed().and().has().itemsTexts(CONTEXT_MENU_ITEMS);
contextMenuList.select("Print");
waitCondition(() -> menu.isHidden());
menu.is().hidden();
}
}
Loading