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

4953+4965: Angular input implementing and refactoring tests #5058

Merged
merged 9 commits into from
Dec 21, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.github.com.pages.AngularPage;
import io.github.com.pages.AutocompletePage;
import io.github.com.pages.BadgePage;
import io.github.com.pages.InputPage;
import io.github.com.pages.ButtonTogglePage;
import io.github.com.pages.ButtonsPage;
import io.github.com.pages.CheckBoxPage;
Expand All @@ -24,6 +25,9 @@ public class StaticSite {
@Url("progress_spinner")
public static ProgressSpinnerPage progressSpinnerPage;

@Url("input")
public static InputPage inputPage;

@Url("buttons")
public static ButtonsPage buttonsPage;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
package io.github.com.pages.sections;
package io.github.com.entities;

import com.epam.jdi.light.angular.elements.common.Input;
import com.epam.jdi.light.angular.elements.common.TextArea;
import com.epam.jdi.light.elements.composite.Form;
import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI;
import com.epam.jdi.light.ui.html.elements.common.TextField;
import io.github.com.entities.User;

public class InputsForm extends Form<User> {

@UI("[id^='mat-input-']")
public Input company;

@UI("#inputs_form_firstName")
public TextField firstName;
public Input firstName;

@UI("#inputs_form_lastName")
public TextField lastName;
public Input lastName;

@UI("#inputs_form_address")
public TextField address;
public TextArea address;

@UI("#inputs_form_address2")
public TextField address2;
public TextArea address2;

@UI("#inputs_form_city")
public TextField city;
public Input city;

@UI("#inputs_form_state")
public TextField state;
public Input state;

@UI("#inputs_form_postalCode")
public TextField postalCode;
public Input postalCode;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class AngularPage extends WebPage {
public static Dialog dialog;
public static ToolbarSection toolbarSection;
public static SlideToggleSection slideToggleSection;
public static InputSection inputSection;
public static SelectSection selectSection;
public static ListSection listSection;
public static GridListSection gridListSection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class CheckBoxPage extends NewAngularPage {
@UI("#checkbox-required-option")
public static Checkbox requiredCheckbox;

@UI("//*[@class='error']")
@UI("//*[contains(@class, 'error')]")
public static Text requiredCheckboxText;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package io.github.com.pages;

import com.epam.jdi.light.angular.elements.common.Input;
import com.epam.jdi.light.angular.elements.common.TextArea;
import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI;
import com.epam.jdi.light.ui.html.elements.common.Button;
import com.epam.jdi.light.ui.html.elements.common.Icon;
import com.epam.jdi.light.ui.html.elements.common.Text;
import io.github.com.entities.InputsForm;

public class InputPage extends NewAngularPage {

@UI("#inputs_basic_food")
public static Input inputBasicFood;

@UI("#inputs_basic_comment")
public static TextArea textAreaBasicLeaveAComment;

@UI("#inputs_errorStateMatcher_email")
public static Input inputEmailErrorStateMatcher;

@UI("#inputs_errorStateMatcher_message")
public static Text messageErrorStateMatcher;

@UI("#inputs_autosize_textarea")
public static TextArea textAreaAutoSize;

@UI("#inputs_clearable_textbox")
public static Input inputWithClearButton;

@UI("#inputs_clearable_button")
public static Button buttonClear;

@UI("#inputs_error_email")
public static Input inputErrorMail;

@UI("#inputs_error_message")
public static Text messageError;

@UI("input-form-example form")
public static InputsForm inputsForm;

@UI("#inputs_hints_message")
public static Input inputWithMessageHint;

@UI("#inputs_hints_text")
public static Text messageHint;

@UI("#inputs_hints_counter")
public static Text messageHintCounter;

@UI("#inputs_prefixes")
public static Text prefixForInput;

@UI("#inputs_suffixes")
public static Icon suffixForInput;
kira-vlsv marked this conversation as resolved.
Show resolved Hide resolved

@UI("#inputs_prefixes_suffixes_phone")
public static Input inputTelephone;

@UI("#input-readonly-option")
public static Input inputWithReadonly;

@UI("[id^='mat-input-'][type='text']")
public static Input inputAriaLabel;
}

This file was deleted.

Loading