-
Notifications
You must be signed in to change notification settings - Fork 47
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
4935 test refactoring element sidenav #5375
Open
EvgStep
wants to merge
4
commits into
angular_rework_development
Choose a base branch
from
4935_Test-refactoring-element-Sidenav
base: angular_rework_development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
18 changes: 18 additions & 0 deletions
18
jdi-light-angular-tests/src/main/java/io/github/com/enums/ConfigurableMode.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,18 @@ | ||
package io.github.com.enums; | ||
|
||
public enum ConfigurableMode { | ||
|
||
OVER("over"), | ||
SIDE("side"), | ||
PUSH("push"); | ||
|
||
private final String mode; | ||
|
||
ConfigurableMode(String mode) { | ||
this.mode = mode; | ||
} | ||
|
||
public String getMode() { | ||
return mode; | ||
} | ||
} |
94 changes: 94 additions & 0 deletions
94
jdi-light-angular-tests/src/main/java/io/github/com/pages/SideNavPage.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,94 @@ | ||
package io.github.com.pages; | ||
|
||
import com.epam.jdi.light.angular.elements.common.Button; | ||
import com.epam.jdi.light.angular.elements.common.Checkbox; | ||
import com.epam.jdi.light.angular.elements.complex.radiobuttons.RadioGroup; | ||
import com.epam.jdi.light.angular.elements.composite.MaterialSelectorContainer; | ||
import com.epam.jdi.light.angular.elements.composite.SideNavContainer; | ||
import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI; | ||
import com.epam.jdi.light.ui.html.elements.common.TextField; | ||
import io.github.com.pages.sections.SideNavSection; | ||
|
||
public class SideNavPage extends NewAngularPage { | ||
|
||
public static SideNavContainer basicSideNav; | ||
public static SideNavContainer basicDrawer; | ||
public static SideNavContainer sidenavBackdropContainer; | ||
public static SideNavContainer implicitMainContent; | ||
public static SideNavContainer openCloseBehavior; | ||
|
||
@UI("#open-close-behavior mat-checkbox") | ||
public static Checkbox sideNavOpened; | ||
|
||
@UI("#open-close-behavior button") | ||
public static Button sideNavToggle; | ||
|
||
public static SideNavContainer configurableMode; | ||
|
||
@UI("#configurable-mode .mat-sidenav button") | ||
public static Button sideToggle; | ||
|
||
@UI("#configurable-mode .mat-sidenav-content button") | ||
public static Button contentToggle; | ||
|
||
@UI("#configurable-mode .mat-sidenav .mat-mdc-radio-group") | ||
public static RadioGroup sideNavRadioGroup; | ||
@UI("#mat-select-position") | ||
public static MaterialSelectorContainer sideNavPosition; | ||
|
||
@UI("#mat-select-focus-on-the-first-item") | ||
public static MaterialSelectorContainer sideNavFocusSelection; | ||
|
||
@UI("#configurable-mode .mat-sidenav-content .mat-mdc-radio-group") | ||
public static RadioGroup contentRadioGroup; | ||
|
||
public static SideNavContainer customEscapeBackdrop; | ||
|
||
@UI("#custom-escape-backdrop .mat-sidenav button") | ||
public static Button toggleSideNav; | ||
|
||
@UI("#custom-escape-backdrop .mat-sidenav-content button") | ||
public static Button openSideNav; | ||
|
||
public static SideNavContainer autoSizeSideNav; | ||
|
||
@UI("#auto-size-side-nav .mat-drawer-content button") | ||
public static Button toggleAutoNav; | ||
|
||
@UI("#auto-size-side-nav .mat-drawer button") | ||
public static Button toggleExtraText; | ||
|
||
public static SideNavContainer fixedPosition; | ||
|
||
@UI("#fixed-position mat-checkbox") | ||
public static Checkbox fixSideNav; | ||
|
||
@UI("#fixed-position .mat-sidenav-content button") | ||
public static Button toggleFixedSideNav; | ||
|
||
@UI("#fixed-position .mat-sidenav-content mat-form-field input[formcontrolname='top']") | ||
public static TextField topGap; | ||
|
||
@UI("#fixed-position .mat-sidenav-content mat-form-field input[formcontrolname='bottom']") | ||
public static TextField bottomGap; | ||
|
||
public static SideNavSection sidenavBackdropDrawer; | ||
|
||
public static SideNavContainer responsiveContent; | ||
|
||
@UI("//*[@id='responsive-content']/preceding-sibling::mat-toolbar/button") | ||
public static Button toolbarToggle; | ||
|
||
@UI("#mat-drawer-open-button") | ||
public static Button backDropToggle; | ||
|
||
@UI("//button[.//span[contains(@class, 'mdc-button__label') and text()='First Element']]") | ||
public static Button firstElement; | ||
|
||
// @UI("//button[.//span[contains(@class, 'mdc-button__label') and text()='First Element'] and contains(@class, 'cdk-focused')]") | ||
@UI("//button[contains(@class, 'cdk-focused') and contains(@class, 'cdk-program-focused') and //span[contains(@class, 'mdc-button__label') and text()='First Element']]") | ||
public static Button firstElementFocused; | ||
|
||
@UI("//button[.//span[contains(@class, 'mdc-button__label') and text()='Second Element']]") | ||
public static Button secondElement; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
обычно еще делают метод получения Enum по строковому значению