Skip to content

Commit 628609f

Browse files
committed
Removed parallel execution for some of the tests to avoid flaky test outcomes in some situations
1 parent 0de2a25 commit 628609f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import org.junit.jupiter.api.BeforeEach;
1111
import org.junit.jupiter.api.DisplayName;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.parallel.Execution;
14+
import org.junit.jupiter.api.parallel.ExecutionMode;
1315
import org.junit.jupiter.params.ParameterizedTest;
1416
import org.junit.jupiter.params.provider.ValueSource;
1517

@@ -21,6 +23,7 @@
2123

2224
@DisplayName("Contact form")
2325
@Feature("Contact form")
26+
@Execution(ExecutionMode.SAME_THREAD)
2427
public class ContactFormTest extends PlaywrightTestCase {
2528

2629
ContactForm contactForm;
@@ -69,6 +72,9 @@ void mandatoryFields(String fieldName) {
6972

7073
contactForm.submitForm();
7174

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

0 commit comments

Comments
 (0)