aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-04-03 21:36:20 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-05-11 18:04:03 +0000
commit28e33e5b97ca20a516f6c5aded7dab508033cf46 (patch)
treee85c6eaa388ebd9d8ee2219e2d5c7cace302d273 /tests
parent4a424bd5df903caae1d36dafe05be5ee4fc224b9 (diff)
Add Vietnamese keyboard layout
[ChangeLog] Added Vietnamese keyboard layout Change-Id: I9191e76a3ff268ffa93af87786412c27da022950 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/inputpanel/data/inputpanel/inputpanel.qml2
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml22
2 files changed, 23 insertions, 1 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
index ded8aee3..8b61bd89 100644
--- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
@@ -344,7 +344,7 @@ InputPanel {
testcase.wait(20)
if (alternativeKey) {
alternativeKeysSpy.wait()
- var keyIndex = keyObj.effectiveAlternativeKeys.indexOf(key)
+ var keyIndex = keyObj.effectiveAlternativeKeys.indexOf(key.toLowerCase())
var itemX = keyIndex * keyboard.style.alternateKeysListItemWidth + keyboard.style.alternateKeysListItemWidth / 2
virtualKeyPressPoint.x = inputPanel.mapFromItem(alternativeKeys.listView, itemX, 0).x
testcase.mouseMove(inputPanel, virtualKeyPressPoint.x, virtualKeyPressPoint.y)
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
index 27202a35..229b1e96 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -1113,6 +1113,28 @@ Rectangle {
compare(textInput.selectedText, "")
}
+ function test_vietnameseInputMethod_data() {
+ return [
+ { initLocale: "vi_VN", inputSequence: "Xin chào", outputText: "Xin chào" },
+ { initLocale: "vi_VN", inputSequence: "Ảo", outputText: "Ảo" },
+ { initLocale: "vi_VN", inputSequence: "Cũng", outputText: "Cũng" },
+ { initLocale: "vi_VN", inputSequence: "Chiếc", outputText: "Chiếc" },
+ { initLocale: "vi_VN", inputSequence: "Giọt", outputText: "Giọt" },
+ ]
+ }
+
+ function test_vietnameseInputMethod(data) {
+ prepareTest(data)
+
+ for (var inputIndex in data.inputSequence) {
+ verify(inputPanel.virtualKeyClick(data.inputSequence[inputIndex]))
+ }
+
+ Qt.inputMethod.commit()
+ waitForRendering(inputPanel)
+ compare(textInput.text, data.outputText)
+ }
+
function test_hwrInputSequence_data() {
return [
{ initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 0, inputSequence: "abcdefghij", outputText: "Abcdefghij" },