-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4953+4965: Angular input implementing and refactoring tests (#5058)
* add new classes * add methods and tests * add unit tests and refactor page object + tests * refactor code * 4953-65-refactoringInputAfterRebase * 4953 Added methods and tests for Input and TextArea * 4953 Added methods and tests for scrolling text area * 4953 edited locator --------- Co-authored-by: Maya Afanaseva <afanasevaml@yandex.ru> Co-authored-by: Kira Vlasova <vlsv-kira@ya.ru>
- Loading branch information
1 parent
835bfbc
commit 786e1c9
Showing
12 changed files
with
578 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 13 additions & 10 deletions
23
...github/com/pages/sections/InputsForm.java → ...va/io/github/com/entities/InputsForm.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
jdi-light-angular-tests/src/main/java/io/github/com/pages/InputPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
@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; | ||
} |
56 changes: 0 additions & 56 deletions
56
jdi-light-angular-tests/src/main/java/io/github/com/pages/sections/InputSection.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.