diff options
author | Manish Sinha <manish.sinha@xamarin.com> | 2015-10-09 18:07:23 +0300 |
---|---|---|
committer | Manish Sinha <manish.sinha@xamarin.com> | 2015-10-09 18:07:23 +0300 |
commit | 64d1d9f899e5dc652b8ac4a0a67b14de82e0abfd (patch) | |
tree | 736d5cf456c11a3a9eda88508cee42b6f756abdf /main/tests/UserInterfaceTests/VersionControlTests | |
parent | 5db145c3f6249ed51d2ed68869f7d7d5bc9f2e88 (diff) |
[UITest] Handle Git's "User Information Conflict" dialog box
Diffstat (limited to 'main/tests/UserInterfaceTests/VersionControlTests')
-rw-r--r-- | main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs | 1 | ||||
-rw-r--r-- | main/tests/UserInterfaceTests/VersionControlTests/VCSBase.cs | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs b/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs index 379c145183..187c590f47 100644 --- a/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs +++ b/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs @@ -231,6 +231,7 @@ namespace UserInterfaceTests TakeScreenShot (string.Format ("{0}-Branch-Selected", branchName)); Session.ClickElement (c => IdeQuery.GitConfigurationDialog(c).Children ().Button ().Text ("Switch to Branch"), false); CheckIfNameEmailNeeded (); + CheckIfUserConflict (); Assert.IsTrue (IsBranchSwitched (branchName)); TakeScreenShot (string.Format ("Switched-To-{0}", branchName)); } diff --git a/main/tests/UserInterfaceTests/VersionControlTests/VCSBase.cs b/main/tests/UserInterfaceTests/VersionControlTests/VCSBase.cs index 9fb608ae2a..3a1ac15ff6 100644 --- a/main/tests/UserInterfaceTests/VersionControlTests/VCSBase.cs +++ b/main/tests/UserInterfaceTests/VersionControlTests/VCSBase.cs @@ -92,6 +92,7 @@ namespace UserInterfaceTests TakeScreenShot ("Commit-Msg-Entered"); Session.ClickElement (c => c.Window ().Marked ("MonoDevelop.VersionControl.Dialogs.CommitDialog").Children ().Button ().Marked ("buttonCommit"), false); CheckIfNameEmailNeeded (); + CheckIfUserConflict (); Ide.WaitForStatusMessage (new[] {"Commit operation completed."}); TakeScreenShot ("Commit-Completed"); } @@ -156,6 +157,15 @@ namespace UserInterfaceTests } catch (TimeoutException e) { } } + protected void CheckIfUserConflict () + { + try { + Session.WaitForElement (c => c.Window ().Marked ("User Information Conflict")); + Session.ClickElement (c => c.Window ().Marked ("User Information Conflict").Children ().Button ().Text ("OK")); + } catch (TimeoutException) { + } + } + protected override void OnBuildTemplate (int buildTimeoutInSecs = 180) { } |