fix flaky JavaAutoPopupTest: handle cases when completion is a bit slower than usual

This commit is contained in:
peter
2017-12-29 12:07:30 +01:00
parent ebe0944ba6
commit 7509a3342d
@@ -1774,7 +1774,11 @@ class Foo {
void "test autopopup after package completion"() {
myFixture.addClass("package foo.bar.goo; class Foo {}")
myFixture.configureByText "a.java", "class Foo { { foo.b<caret> } }"
assert myFixture.completeBasic() == null
def items = myFixture.completeBasic()
if (items != null) { // completion took a bit longer, and the single item wasn't inserted automatically
assert myFixture.lookupElementStrings == ['bar']
myFixture.type('\n')
}
assert myFixture.editor.document.text.contains('foo.bar. ')
joinAutopopup()
joinCompletion()