Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-01-26 17:42:05 +0000
committerThomas Wolf2016-01-26 17:57:09 +0000
commit759c7560001739b0f8ed8c34a7c6d9b3b70940ce (patch)
treedd39f6fdd94dbad9aa80778d9464758761708da8 /org.eclipse.egit.ui.test
parent59867e05091568515731909ab4f6120b678fa896 (diff)
downloadegit-759c7560001739b0f8ed8c34a7c6d9b3b70940ce.tar.gz
egit-759c7560001739b0f8ed8c34a7c6d9b3b70940ce.tar.xz
egit-759c7560001739b0f8ed8c34a7c6d9b3b70940ce.zip
Make the gitflow UI tests independent of the keyboard layout
Use setText() instead of typeText(); otherwise these tests fail unless the keyboard layout happens to be en-us (or mac-en-us). Bug: 475804 Change-Id: I891dd82174f43f12a93cae03fad1a68dfc3ae0dd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/AbstractFeatureFinishHandlerTest.java2
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/FeatureFinishSquashHandlerTest.java6
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/InitHandlerTest.java6
3 files changed, 6 insertions, 8 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/AbstractFeatureFinishHandlerTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/AbstractFeatureFinishHandlerTest.java
index cafcf89e95..f527bad32b 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/AbstractFeatureFinishHandlerTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/AbstractFeatureFinishHandlerTest.java
@@ -72,7 +72,7 @@ public abstract class AbstractFeatureFinishHandlerTest extends AbstractGitflowHa
});
bot.waitUntil(shellIsActive(UIText.FeatureStartHandler_provideFeatureName));
- bot.text().typeText(featureName);
+ bot.text().setText(featureName);
bot.button("OK").click();
bot.waitUntil(Conditions.waitForJobs(JobFamilies.GITFLOW_FAMILY, "Git flow jobs"));
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/FeatureFinishSquashHandlerTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/FeatureFinishSquashHandlerTest.java
index 5393b84b66..b6ed49ea0e 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/FeatureFinishSquashHandlerTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/FeatureFinishSquashHandlerTest.java
@@ -91,9 +91,9 @@ public class FeatureFinishSquashHandlerTest extends
@Override
protected void preFinish() {
- int firstLine = 0;
- bot.styledText().selectLine(firstLine);
- bot.styledText().typeText(SQUASHED_COMMENT_SUMMARY);
+ String text = bot.styledText().getText();
+ text = text.substring(text.indexOf('\n'));
+ bot.styledText().setText(SQUASHED_COMMENT_SUMMARY + text);
bot.button("OK").click();
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/InitHandlerTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/InitHandlerTest.java
index 07786071c4..6662edf33e 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/InitHandlerTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/gitflow/InitHandlerTest.java
@@ -141,9 +141,7 @@ public class InitHandlerTest extends AbstractGitflowHandlerTest {
}
private void fillDialog(String masterBranch) {
- SWTBotText developText = bot.textWithLabel(InitDialog_developBranch);
- developText.selectAll();
- developText.typeText(ILLEGAL_BRANCH_NAME);
+ typeInto(InitDialog_developBranch, ILLEGAL_BRANCH_NAME);
SWTBotButton ok = bot.button("OK");
assertFalse(ok.isEnabled());
@@ -191,6 +189,6 @@ public class InitHandlerTest extends AbstractGitflowHandlerTest {
private void typeInto(String textLabel, String textInput) {
SWTBotText developText = bot.textWithLabel(textLabel);
developText.selectAll();
- developText.typeText(textInput);
+ developText.setText(textInput);
}
}

Back to the top