typedb / typedb-studio

TypeDB Studio (IDE)
https://typedb.com
Mozilla Public License 2.0
191 stars 44 forks source link

Hybrid wait-based approach for test suite #651

Closed jamesreprise closed 1 year ago

jamesreprise commented 1 year ago

What is the goal of this PR?

We've refactored the test suite to make use of a hybrid wait-based approach for the Studio test suite. That is, when we expect elements of the GUI to change we use ComposeTestRule's waitUntil, blocking until a given condition is satisfied or a timeout is reached. This polls the UI for changes and also recomposes inbetween polls.

We have not entirely refactored out our static delays as some of the events we wait for are outside the scope of elements that fall entirely within Studio's GUI.

What are the changes implemented in this PR?

We make use of ComposeTestRules waitUntil, providing some new functions:

Where appropriate, we now use one of the above wait 'family' of functions rather than more rudimentary functions like delayAndRecompose. However, not all of these have been removed.

While this PR has been open, we've migrated from grabl to Factory for our CI! We've included some of those changes here.

typedb-bot commented 1 year ago

PR Review Checklist

Do not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed.


Code

Architecture