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-10-13 20:51:30 +0300
committerManish Sinha <manish.sinha@xamarin.com>2015-10-13 20:51:30 +0300
commitc12a45ca175bf300797489ce34a80d4519d531a3 (patch)
tree09ad340f1791e95b10f71849f47750eed90b20ef /main/tests
parent09d70099dcdcfd418905dc86614cbd54958ce82c (diff)
Revert "[UITest] Copy MonoDevelopProperties.xml to test profile and disable updater"
This reverts commit 5db145c3f6249ed51d2ed68869f7d7d5bc9f2e88.
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/UserInterfaceTests/UITestBase.cs41
1 files changed, 19 insertions, 22 deletions
diff --git a/main/tests/UserInterfaceTests/UITestBase.cs b/main/tests/UserInterfaceTests/UITestBase.cs
index c9805395a8..924dcbfa09 100644
--- a/main/tests/UserInterfaceTests/UITestBase.cs
+++ b/main/tests/UserInterfaceTests/UITestBase.cs
@@ -77,7 +77,7 @@ namespace UserInterfaceTests
SetupScreenshotsFolder ();
SetupIdeLogFolder ();
- var mdProfile = CreateProfileAndInitSettings ();
+ var mdProfile = Util.CreateTmpDir ();
TestService.StartSession (MonoDevelopBinPath, mdProfile);
TestService.Session.DebugObject = new UITestDebug ();
@@ -85,34 +85,19 @@ namespace UserInterfaceTests
Session.WaitForElement (IdeQuery.DefaultWorkbench);
TakeScreenShot ("Application-Started");
+ CloseIfXamarinUpdateOpen ();
TakeScreenShot ("Application-Ready");
}
- static FilePath CreateProfileAndInitSettings ()
- {
- const string mdPropertiesFile = "MonoDevelopProperties.xml";
-
- var mdProfile = Util.CreateTmpDir ();
- var profileDir = Path.Combine (mdProfile, BrandingService.ApplicationName + "-" + MonoDevelop.BuildInfo.CompatVersion, "Config");
- Directory.CreateDirectory (profileDir);
-
- var fromMDFile = Path.Combine (UserProfile.Current.ConfigDir, mdPropertiesFile);
- var toMDFile = Path.Combine (profileDir, mdPropertiesFile);
- File.Copy (fromMDFile, toMDFile);
- Console.WriteLine ("Using Settings file: " + toMDFile);
-
- var property = Properties.Load (toMDFile);
- property.Set ("MonoDevelop.Ide.AddinUpdater.CheckForUpdates", false);
- property.Save (toMDFile);
- Console.WriteLine ("Disabled AddinUpdater.CheckForUpdates");
-
- return mdProfile;
- }
-
[TearDown]
public virtual void Teardown ()
{
try {
+ if (TestContext.CurrentContext.Result.Status != TestStatus.Passed) {
+ var updateOpened = Session.Query (IdeQuery.XamarinUpdate);
+ if (updateOpened != null && updateOpened.Any ())
+ Assert.Inconclusive ("Xamarin Update is blocking the application focus");
+ }
ValidateIdeLogMessages ();
LoggingService.RemoveLogger (Logger.Name);
@@ -146,6 +131,18 @@ namespace UserInterfaceTests
LogMessageValidator.Validate (Environment.GetEnvironmentVariable ("MONODEVELOP_LOG_FILE"));
}
+ protected void CloseIfXamarinUpdateOpen ()
+ {
+ try {
+ Session.WaitForElement (IdeQuery.XamarinUpdate, 10 * 1000);
+ TakeScreenShot ("Xamarin-Update-Opened");
+ Session.ClickElement (c => IdeQuery.XamarinUpdate (c).Children ().Button ().Text ("Close"));
+ }
+ catch (TimeoutException) {
+ TestService.Session.DebugObject.Debug ("Xamarin Update did not open");
+ }
+ }
+
void SetupTestResultFolder ()
{
currentTestResultFolder = Path.Combine (testResultFolder, TestContext.CurrentContext.Test.Name);