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-22 05:13:38 +0300
committerManish Sinha <manish.sinha@xamarin.com>2015-10-22 18:44:03 +0300
commit467cacde5893c55ead88c8347751e4a172d87ba0 (patch)
tree3b5595533664f0072eaf49bb82933cf11ea7280c /main/tests
parent781e1f758bb83bac0f8ad013dbd3a6888fd7e50a (diff)
[UITest] Add Reproduction Steps for GitBase
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs29
1 files changed, 25 insertions, 4 deletions
diff --git a/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs b/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs
index 187c590f47..10686779eb 100644
--- a/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs
+++ b/main/tests/UserInterfaceTests/VersionControlTests/Git/GitBase.cs
@@ -52,10 +52,25 @@ namespace UserInterfaceTests
protected void SelectRemote (string remoteName, string remoteUrl = null)
{
+ ReproStep (string.Format ("Select a remote named '{0}' {1}", remoteName,
+ remoteUrl != null ? string.Format (" and Remote URL '{0}'", remoteUrl) : string.Empty));
Session.WaitForElement (c => remoteTreeName (c).Contains (remoteName));
- Assert.IsTrue (Session.SelectElement (c => remoteTreeName (c).Contains (remoteName)));
+
+ try {
+ Assert.IsTrue (Session.SelectElement (c => remoteTreeName (c).Contains (remoteName)));
+ } catch (AssertionException) {
+ ReproStep (string.Format ("Expected: Remote Name '{0}' exists\nActual: Remote Name '{0}' does not exist", remoteName));
+ throw;
+ }
if (remoteUrl != null) {
- Assert.IsTrue (Session.SelectElement (c => remoteTreeUrl (c).Contains (remoteUrl)));
+ try {
+ Assert.IsTrue (Session.SelectElement (c => remoteTreeUrl (c).Contains (remoteUrl)));
+ } catch (AssertionException) {
+ ReproStep (string.Format (
+ "Expected: Remote URL '{0}' with Name '{1}' exists\nActual: Remote URL '{0}' with Name '{1}' does not exist",
+ remoteUrl, remoteName));
+ throw;
+ }
}
TakeScreenShot (string.Format ("{0}-Remote-Selected", remoteName));
}
@@ -287,8 +302,14 @@ namespace UserInterfaceTests
protected void AssertButtonSensitivity (string buttonLabel, bool sensitivity)
{
- Assert.IsNotEmpty (Session.Query (c => c.Button ().Text (buttonLabel).Sensitivity (sensitivity)),
- string.Format ("{0} button is {1} enabled", buttonLabel, sensitivity ? notString : string.Empty));
+ var expected = string.Format ("{0} button is {1} enabled", buttonLabel, !sensitivity ? notString : string.Empty);
+ var actual = string.Format ("{0} button is {1} enabled", buttonLabel, sensitivity ? notString : string.Empty);
+ try {
+ Assert.IsNotEmpty (Session.Query (c => c.Button ().Text (buttonLabel).Sensitivity (sensitivity)), actual);
+ } catch (AssertionException) {
+ ReproStep (string.Format ("Expected: {0}\nActual: {1}", expected, actual));
+ throw;
+ }
}
#endregion