Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Sinha <manish.sinha@xamarin.com>2015-08-27 18:53:44 +0300
committerManish Sinha <manish.sinha@xamarin.com>2015-08-27 19:02:08 +0300
commit9fc1465bb8d2149be600a79926fb38fbc7412359 (patch)
tree69bff4710554568ab6ec81b331f9fa47dd7179b8 /main/tests/UserInterfaceTests/Ide.cs
parent0c6a2949e0033f9bfc196a0bfaab78bedb96341b (diff)
[UITest] Extend WaitForPackageUpdate and fix TestLocalCopyPreservedUpdate
Diffstat (limited to 'main/tests/UserInterfaceTests/Ide.cs')
-rw-r--r--main/tests/UserInterfaceTests/Ide.cs34
1 files changed, 23 insertions, 11 deletions
diff --git a/main/tests/UserInterfaceTests/Ide.cs b/main/tests/UserInterfaceTests/Ide.cs
index 4c4bd5d97a..6c78efc494 100644
--- a/main/tests/UserInterfaceTests/Ide.cs
+++ b/main/tests/UserInterfaceTests/Ide.cs
@@ -101,18 +101,24 @@ namespace UserInterfaceTests
public readonly static Action EmptyAction = delegate { };
+ static string[] waitForNuGetMessages = {
+ "Package updates are available.",
+ "Packages are up to date.",
+ "No updates found but warnings were reported.",
+ "Packages successfully added.",
+ "Packages successfully updated.",
+ "Packages added with warnings.",
+ "Packages updated with warnings."};
public readonly static Action WaitForPackageUpdate = delegate {
- WaitForStatusMessage (new [] {
- "Package updates are available.",
- "Packages are up to date.",
- "No updates found but warnings were reported.",
- "Packages successfully added.",
- "Packages successfully updated.",
- "Packages added with warnings.",
- "Packages updated with warnings."},
- timeoutInSecs: 180, pollStepInSecs: 5);
+ WaitForStatusMessage (waitForNuGetMessages, timeoutInSecs: 180, pollStepInSecs: 5);
};
+ public static void WaitForPackageUpdateExtra (List<string> otherMessages)
+ {
+ otherMessages.AddRange (waitForNuGetMessages);
+ WaitForStatusMessage (otherMessages.ToArray (), timeoutInSecs: 180, pollStepInSecs: 5);
+ }
+
public readonly static Action WaitForSolutionCheckedOut = delegate {
WaitForStatusMessage (new [] {"Solution checked out", "Solution Loaded."}, timeoutInSecs: 360, pollStepInSecs: 5);
};
@@ -138,8 +144,14 @@ namespace UserInterfaceTests
static void PollStatusMessage (string[] statusMessage, int timeoutInSecs, int pollStepInSecs, bool waitForMessage = true)
{
Ide.WaitUntil (() => {
- var actualStatusMessage = Workbench.GetStatusMessage ();
- return waitForMessage == (statusMessage.Contains (actualStatusMessage, StringComparer.OrdinalIgnoreCase));
+ try {
+ var actualStatusMessage = Workbench.GetStatusMessage ();
+ return waitForMessage == (statusMessage.Contains (actualStatusMessage, StringComparer.OrdinalIgnoreCase));
+ } catch (TimeoutException e) {
+ throw new TimeoutException (
+ string.Format ("Timed out. Found status message '{0}'\nand expected one of these:\n\t",
+ string.Join ("\n\t", statusMessage)), e);
+ }
}, pollStep: pollStepInSecs * 1000, timeout: timeoutInSecs * 1000);
}
}