Skip to content

Commit 487d1cb

Browse files
committed
Improve assertions for browser test #1843
Improve assertions in browser test case test_setTextContainingScript_applicationLayerProgressListenerMustSeeUpToDateDom to avoid further test execution when expected conditions have not been fulfilled before. Contributes to #1843
1 parent a92d9db commit 487d1cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,9 +1176,10 @@ public void test_setTextContainingScript_applicationLayerProgressListenerMustSee
11761176
</body>
11771177
</html>
11781178
""");
1179-
waitForPassCondition(completed::get);
1180-
waitForPassCondition(() -> title.get() != null);
1181-
assertEquals("ProgressListener: Found 1 h1 tag(s)", title.get());
1179+
assertTrue("progress completion not reported", waitForPassCondition(completed::get));
1180+
assertTrue("title not set", waitForPassCondition(() -> title.get() != null));
1181+
assertTrue(
1182+
"unexpected title: " + title.get(), waitForPassCondition(() -> title.get().contains("ProgressListener: Found 1 h1 tag(s)")));
11821183
}
11831184

11841185
@Test

0 commit comments

Comments
 (0)