Skip to content

Commit ab00ebf

Browse files
committed
Solidify the contact form tests
1 parent 305f6c2 commit ab00ebf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/com/serenitydojo/playwright/toolshop/contact/ContactForm.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
import com.microsoft.playwright.Locator;
44
import com.microsoft.playwright.Page;
55
import com.microsoft.playwright.options.AriaRole;
6+
import com.microsoft.playwright.options.WaitForSelectorState;
67

78
import java.nio.file.Path;
89

10+
import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;
11+
912
public class ContactForm {
1013
private final Page page;
1114
private Locator firstNameField;
@@ -59,5 +62,6 @@ public String getAlertMessage() {
5962

6063
public void clearField(String fieldName) {
6164
page.getByLabel(fieldName).clear();
65+
assertThat(page.getByLabel(fieldName)).isEmpty();
6266
}
6367
}

0 commit comments

Comments
 (0)