File tree 3 files changed +0
-22
lines changed
src/test/java/ru/mystamps/web/tests
3 files changed +0
-22
lines changed Original file line number Diff line number Diff line change 21
21
22
22
import ru .mystamps .web .tests .page .AbstractPageWithForm ;
23
23
import ru .mystamps .web .tests .page .element .Form .Field ;
24
- import ru .mystamps .web .tests .page .element .Form .SubmitButton ;
25
24
26
25
import static ru .mystamps .web .tests .TranslationUtils .tr ;
27
26
@@ -37,7 +36,6 @@ abstract class WhenAnyUserAtAnyPageWithForm<T extends AbstractPageWithForm>
37
36
38
37
protected void checkStandardStructure () {
39
38
shouldHaveFields ();
40
- shouldHaveSubmitButton ();
41
39
42
40
requiredFieldsShouldBeMarkedByAsterisk ();
43
41
mayExistsLegendAboutRequiredFields ();
@@ -56,18 +54,6 @@ private void shouldHaveFields() {
56
54
}
57
55
}
58
56
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
-
71
57
private void requiredFieldsShouldBeMarkedByAsterisk () {
72
58
for (Field field : page .getForm ().getRequiredFields ()) {
73
59
assertThat (page .inputHasAsterisk (field .getId ()))
Original file line number Diff line number Diff line change @@ -56,10 +56,6 @@ public boolean isFieldHasError(String id) {
56
56
return elementWithXPathExists (String .format (FIELD_ERROR_LOCATOR , id ));
57
57
}
58
58
59
- public boolean isSubmitButtonExists (SubmitButton button ) {
60
- return elementWithXPathExists (button .toString ());
61
- }
62
-
63
59
public AbstractPage submit () {
64
60
65
61
Validate .validState (
Original file line number Diff line number Diff line change @@ -137,17 +137,13 @@ public static SubmitButton submitButton(String value) {
137
137
//
138
138
139
139
public static class SubmitButton {
140
- @ Getter private final String value ;
141
-
142
140
private final String xpath ;
143
141
144
142
public SubmitButton () {
145
- this .value = "" ;
146
143
this .xpath = SUBMIT_BUTTON_LOCATOR ;
147
144
}
148
145
149
146
public SubmitButton (String value ) {
150
- this .value = value ;
151
147
this .xpath = String .format (SUBMIT_WITH_VALUE_LOCATOR , value );
152
148
}
153
149
You can’t perform that action at this time.
0 commit comments