Skip to content

Commit a5a2af8

Browse files
committed
Updated dependencies to Playwright 1.57.0 and JUnit 6.0.1
1 parent 628609f commit a5a2af8

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/test/java/com/serenitydojo/playwright/toolshop/catalog/pageobjects/SearchComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void filterBy(String filterName) {
3030
}
3131

3232
public void sortBy(String sortFilter) {
33-
page.waitForResponse("**/products?sort=**", () -> {
33+
page.waitForResponse("**/products?page=0&sort=**", () -> {
3434
page.getByTestId("sort").selectOption(sortFilter);
3535
});
3636
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.serenitydojo.playwright.toolshop.contact;
22

3+
import com.microsoft.playwright.assertions.LocatorAssertions;
34
import com.microsoft.playwright.options.AriaRole;
45
import com.serenitydojo.playwright.toolshop.catalog.pageobjects.NavBar;
56
import com.serenitydojo.playwright.toolshop.fixtures.PlaywrightTestCase;
@@ -69,12 +70,9 @@ void mandatoryFields(String fieldName) {
6970

7071
// Clear one of the fields
7172
contactForm.clearField(fieldName);
72-
73+
page.waitForTimeout(250);
7374
contactForm.submitForm();
7475

75-
if (!page.getByRole(AriaRole.ALERT).isVisible()) {
76-
int i = 0;
77-
}
7876
// Check the error message for that field
7977
var errorMessage = page.getByRole(AriaRole.ALERT).getByText(fieldName + " is required");
8078

src/test/java/com/serenitydojo/playwright/toolshop/fixtures/PlaywrightTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public abstract class PlaywrightTestCase {
2020
protected static ThreadLocal<Browser> browser = ThreadLocal.withInitial(() ->
2121
playwright.get().chromium().launch(
2222
new BrowserType.LaunchOptions()
23-
.setHeadless(true)
23+
.setHeadless(false)
2424
.setArgs(Arrays.asList("--no-sandbox", "--disable-extensions", "--disable-gpu"))
2525
)
2626
);

0 commit comments

Comments
 (0)