15
15
public class UIToolkitBaseTestWindow < T > where T : EditorWindow
16
16
{
17
17
protected T m_Window ;
18
+ protected const double kDefaultTimeoutSecs = 10.0 ;
18
19
19
20
#region setup and teardown
20
21
[ OneTimeSetUp ]
@@ -124,7 +125,7 @@ protected void SimulateDeleteCommand()
124
125
/// Wait for UI toolkit scheduler to process the frame
125
126
/// </summary>
126
127
/// <param name="timeoutSecs">Maximum time to wait in seconds.</param>
127
- protected IEnumerator WaitForSchedulerLoop ( double timeoutSecs = 5.0 )
128
+ protected IEnumerator WaitForSchedulerLoop ( double timeoutSecs = kDefaultTimeoutSecs )
128
129
{
129
130
bool done = false ;
130
131
m_Window . rootVisualElement . schedule . Execute ( ( ) => done = true ) ;
@@ -136,7 +137,7 @@ protected IEnumerator WaitForSchedulerLoop(double timeoutSecs = 5.0)
136
137
/// </summary>
137
138
/// <param name="ve">VisualElement to be focused</param>
138
139
/// <param name="timeoutSecs">Maximum time to wait in seconds.</param>
139
- protected IEnumerator WaitForFocus ( VisualElement ve , double timeoutSecs = 5.0 )
140
+ protected IEnumerator WaitForFocus ( VisualElement ve , double timeoutSecs = kDefaultTimeoutSecs )
140
141
{
141
142
return WaitUntil ( ( ) => ve . focusController . focusedElement == ve , "WaitForFocus" , timeoutSecs ) ;
142
143
}
@@ -145,7 +146,7 @@ protected IEnumerator WaitForFocus(VisualElement ve, double timeoutSecs = 5.0)
145
146
/// Wait for the windows to be not dirty
146
147
/// </summary>
147
148
/// <param name="timeoutSecs">Maximum time to wait in seconds.</param>
148
- protected IEnumerator WaitForNotDirty ( double timeoutSecs = 5.0 )
149
+ protected IEnumerator WaitForNotDirty ( double timeoutSecs = kDefaultTimeoutSecs )
149
150
{
150
151
return WaitUntil ( ( ) => m_Window . rootVisualElement . panel . isDirty == false , "WaitForNotDirty" , timeoutSecs ) ;
151
152
}
@@ -156,7 +157,7 @@ protected IEnumerator WaitForNotDirty(double timeoutSecs = 5.0)
156
157
/// <param name="action">Lambda to call between frame</param>
157
158
/// <param name="assertMessage">Assert Message</param>
158
159
/// <param name="timeoutSecs">Maximum time to wait in seconds.</param>
159
- protected IEnumerator WaitUntil ( Func < bool > action , string assertMessage , double timeoutSecs = 5.0 )
160
+ protected IEnumerator WaitUntil ( Func < bool > action , string assertMessage , double timeoutSecs = kDefaultTimeoutSecs )
160
161
{
161
162
var endTime = EditorApplication . timeSinceStartup + timeoutSecs ;
162
163
do
0 commit comments