Umuzi-org / Tilde

Open source agile, collaborative learning platform.
52 stars 34 forks source link

Fix: Intermittent Test Failures #707

Closed kingraphaii closed 4 months ago

kingraphaii commented 6 months ago

Related issues:

A couple of tests fail after exhausting the default 30-second timeout.

By temporarily introducing a delay before each request/action:

class FrontendTestMixin(StaticLiveServerTestCase):
    def setUp(self):
        super().setUp()

        self.context = self.browser.new_context();
        def delay_request(route, request):
            time.sleep(4)
            route.continue_()

        self.context.route("", delay_request)

        self.page = self.context.new_page()

I came to this conclusion:

On the board page(s), there are a couple of external resources that are loaded (font-awesome, google-fonts, htmx cdn, tailwind cdn) and may delay painting for some elements, so depending on the tilde server's network connection or the external platforms' servers, things like self.page.click("text=Start") may timeout.

Description:

This PR removes the timeout constraint by setting it to 0 for all problematic statements, and also increases the card alert display time to 10s.

Screenshots/videos

I solemnly swear that: