Fix a test
To some extent, the test was wrong here. After space is typed in this case, we wait a small delay before updating the suggestion strip so that we can display bigram predictions without introducing delays. The suggestion strip is not displayed until then. The test was bypassing this by simulating a press on the suggestion strip, but for LatinIME it was not displayed yet, hence the bug. The new code waits for the delay, makes sure the suggestion strip is actually displaying punctuation marks, then press the mark and do the intended test on space. Change-Id: I18f82da1bc0a8e584e9b1bac59ff48823d78ec12
This commit is contained in:
parent
e31060dc77
commit
cbad260cf3
1 changed files with 4 additions and 0 deletions
|
@ -389,6 +389,10 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> {
|
|||
final String PUNCTUATION_FROM_STRIP = "!";
|
||||
final String EXPECTED_RESULT = "this!! ";
|
||||
type(WORD_TO_TYPE);
|
||||
sleep(DELAY_TO_WAIT_FOR_UNDERLINE);
|
||||
runMessages();
|
||||
assertTrue("type word then type space should display punctuation strip",
|
||||
mLatinIME.isShowingPunctuationList());
|
||||
mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
|
||||
mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
|
||||
assertEquals("type word then type space then punctuation from strip twice", EXPECTED_RESULT,
|
||||
|
|
Loading…
Reference in a new issue