File tree Expand file tree Collapse file tree 3 files changed +0
-22
lines changed
src/test/java/ru/mystamps/web/tests Expand file tree Collapse file tree 3 files changed +0
-22
lines changed Original file line number Diff line number Diff line change 2121
2222import ru .mystamps .web .tests .page .AbstractPageWithForm ;
2323import ru .mystamps .web .tests .page .element .Form .Field ;
24- import ru .mystamps .web .tests .page .element .Form .SubmitButton ;
2524
2625import static ru .mystamps .web .tests .TranslationUtils .tr ;
2726
@@ -37,7 +36,6 @@ abstract class WhenAnyUserAtAnyPageWithForm<T extends AbstractPageWithForm>
3736
3837 protected void checkStandardStructure () {
3938 shouldHaveFields ();
40- shouldHaveSubmitButton ();
4139
4240 requiredFieldsShouldBeMarkedByAsterisk ();
4341 mayExistsLegendAboutRequiredFields ();
@@ -56,18 +54,6 @@ private void shouldHaveFields() {
5654 }
5755 }
5856
59- private void shouldHaveSubmitButton () {
60- for (SubmitButton button : page .getForm ().getSubmitButtons ()) {
61- assertThat (page .isSubmitButtonExists (button ))
62- .overridingErrorMessage (
63- String .format (
64- "submit button with value '%s' should exists" , button .getValue ()
65- )
66- )
67- .isTrue ();
68- }
69- }
70-
7157 private void requiredFieldsShouldBeMarkedByAsterisk () {
7258 for (Field field : page .getForm ().getRequiredFields ()) {
7359 assertThat (page .inputHasAsterisk (field .getId ()))
Original file line number Diff line number Diff line change @@ -56,10 +56,6 @@ public boolean isFieldHasError(String id) {
5656 return elementWithXPathExists (String .format (FIELD_ERROR_LOCATOR , id ));
5757 }
5858
59- public boolean isSubmitButtonExists (SubmitButton button ) {
60- return elementWithXPathExists (button .toString ());
61- }
62-
6359 public AbstractPage submit () {
6460
6561 Validate .validState (
Original file line number Diff line number Diff line change @@ -137,17 +137,13 @@ public static SubmitButton submitButton(String value) {
137137 //
138138
139139 public static class SubmitButton {
140- @ Getter private final String value ;
141-
142140 private final String xpath ;
143141
144142 public SubmitButton () {
145- this .value = "" ;
146143 this .xpath = SUBMIT_BUTTON_LOCATOR ;
147144 }
148145
149146 public SubmitButton (String value ) {
150- this .value = value ;
151147 this .xpath = String .format (SUBMIT_WITH_VALUE_LOCATOR , value );
152148 }
153149
You can’t perform that action at this time.
0 commit comments