Skip to content

Commit 7ea2e86

Browse files
committed
WhenAnyUserAtAnyPageWithForm(shouldHaveForm): remove check.
I don't want to port it to the Robot Framework because I'm trying to make tests to test a behavior instead of the pages state. No functional changes.
1 parent 3c1c3ed commit 7ea2e86

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/test/java/ru/mystamps/web/tests/cases/WhenAnyUserAtAnyPageWithForm.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ abstract class WhenAnyUserAtAnyPageWithForm<T extends AbstractPageWithForm>
3636
}
3737

3838
protected void checkStandardStructure() {
39-
shouldHaveForm();
4039
shouldHaveFields();
4140
shouldHaveLabels();
4241
shouldHaveSubmitButton();
@@ -48,12 +47,6 @@ protected void checkStandardStructure() {
4847
fieldsValuesShouldBePreservedWhenErrorOccurs();
4948
}
5049

51-
private void shouldHaveForm() {
52-
assertThat(page.formExists())
53-
.overridingErrorMessage("form tag should exists")
54-
.isTrue();
55-
}
56-
5750
private void shouldHaveFields() {
5851
for (Field field : page.getForm().getFields()) {
5952
if (field.isAccessibleByAll()) {

src/test/java/ru/mystamps/web/tests/page/AbstractPageWithForm.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,6 @@ public AbstractPage submit() {
8787
return this;
8888
}
8989

90-
public boolean formExists() {
91-
Validate.validState(
92-
form != null,
93-
"You are trying to check form at page which does not has form"
94-
);
95-
96-
return elementWithXPathExists(form.toString());
97-
}
98-
9990
public String getInputLabelValue(String id) {
10091
return getTextOfElementByXPath(String.format(LABEL_LOCATOR, id));
10192
}

0 commit comments

Comments
 (0)