snoopdave commented on code in PR #230:
URL: https://github.com/apache/roller/pull/230#discussion_r4432723975


##########
it-playwright/src/test/java/org/apache/roller/playwright/BaseIT.java:
##########
@@ -349,11 +350,19 @@ protected void insertMediaFileThroughDialog(String 
weblogHandle) {
      * stacked form rows.
      */
     protected void assertPublishingTimeOnOneLine() {
+        // Wait for the collapse animation to end, then read all three 
positions
+        // in one pass so the panel or page cannot move between readings.
+        page.evaluate("() => 
document.querySelector('#collapseAdvanced').addEventListener('shown.bs.collapse',"
+                + " () => window.rollerAdvancedShown = true, {once: true})");
         page.locator("a[href='#collapseAdvanced']").click();
+        page.waitForFunction("() => window.rollerAdvancedShown === true");
         assertThat(page.locator("#collapseAdvanced")).isVisible();
-        double hours = 
page.locator("select[name='bean.hours']").boundingBox().y;
-        double minutes = 
page.locator("select[name='bean.minutes']").boundingBox().y;
-        double seconds = 
page.locator("select[name='bean.seconds']").boundingBox().y;
+        @SuppressWarnings("unchecked")
+        List<Number> tops = (List<Number>) page.evaluate("() => ['hours', 
'minutes', 'seconds'].map(n =>"

Review Comment:
   Done in ace094d5c. The test now asserts all three selects are visible before 
it reads their positions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to