File tree 3 files changed +3
-30
lines changed
src/test/java/ru/mystamps/web/tests
3 files changed +3
-30
lines changed Original file line number Diff line number Diff line change 18
18
package ru .mystamps .web .tests .cases ;
19
19
20
20
import ru .mystamps .web .tests .page .AbstractPageWithForm ;
21
- import ru .mystamps .web .tests .page .element .Form .Field ;
22
-
23
- import static org .fest .assertions .api .Assertions .assertThat ;
24
21
25
22
@ SuppressWarnings ("checkstyle:abstractclassname" )
23
+ @ Deprecated
26
24
abstract class WhenAnyUserAtAnyPageWithForm <T extends AbstractPageWithForm >
27
25
extends WhenAnyUserAtAnyPage <T > {
28
26
29
27
WhenAnyUserAtAnyPageWithForm (Class <T > pageClass ) {
30
28
super (pageClass );
31
29
}
32
30
31
+ @ Deprecated
33
32
protected void checkStandardStructure () {
34
- shouldHaveFields ();
35
- }
36
-
37
- private void shouldHaveFields () {
38
- for (Field field : page .getForm ().getFields ()) {
39
- if (field .isAccessibleByAll ()) {
40
- assertThat (page .isFieldExists (field ))
41
- .overridingErrorMessage ("field with XPath '" + field + "' should exists" )
42
- .isTrue ();
43
- }
44
- }
45
33
}
46
34
47
35
}
Original file line number Diff line number Diff line change 23
23
import org .openqa .selenium .support .ui .Select ;
24
24
import ru .mystamps .web .tests .WebElementUtils ;
25
25
import ru .mystamps .web .tests .page .element .Form ;
26
- import ru .mystamps .web .tests .page .element .Form .Field ;
27
26
import ru .mystamps .web .tests .page .element .Form .SubmitButton ;
28
27
29
28
import java .util .List ;
@@ -43,10 +42,6 @@ protected void hasForm(Form form) {
43
42
this .form = form ;
44
43
}
45
44
46
- public boolean isFieldExists (Field field ) {
47
- return elementWithXPathExists (field .toString ());
48
- }
49
-
50
45
public boolean isFieldHasError (String id ) {
51
46
return elementWithXPathExists (String .format (FIELD_ERROR_LOCATOR , id ));
52
47
}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public final class Form {
35
35
// CheckStyle: ignore LineLength for next 1 line
36
36
private static final String SUBMIT_WITH_VALUE_LOCATOR = "//input[@type=\" submit\" ][@value=\" %s\" ]" ;
37
37
38
- @ Getter private List <Field > fields ;
38
+ private List <Field > fields ;
39
39
@ Getter private List <SubmitButton > submitButtons ;
40
40
41
41
private Form () {
@@ -143,7 +143,6 @@ public static class Field {
143
143
@ Getter private final String name ;
144
144
145
145
private final String xpath ;
146
- private boolean accessibleByAll = false ;
147
146
148
147
protected Field (String name , String xpath ) {
149
148
this .name = name ;
@@ -157,15 +156,6 @@ public Field and() {
157
156
return this ;
158
157
}
159
158
160
- public Field accessibleByAll (boolean visible ) {
161
- accessibleByAll = visible ;
162
- return this ;
163
- }
164
-
165
- public boolean isAccessibleByAll () {
166
- return accessibleByAll ;
167
- }
168
-
169
159
@ Override
170
160
public String toString () {
171
161
return xpath ;
You can’t perform that action at this time.
0 commit comments