Use editor instead of file in TypingIndentationTest
Nobody guarantees that changes in editor are saved immediately
This commit is contained in:
committed by
Nikolay Krasko
parent
10c840327d
commit
329c1a1e72
@@ -66,7 +66,7 @@ public abstract class AbstractTypingIndentationTestBase extends LightCodeInsight
|
||||
|
||||
CaretModel caretModel = getEditor().getCaretModel();
|
||||
int offset = caretModel.getOffset();
|
||||
String actualTextWithCaret = new StringBuilder(getFile().getText()).insert(offset, EditorTestUtil.CARET_TAG).toString();
|
||||
String actualTextWithCaret = new StringBuilder(getEditor().getDocument().getText()).insert(offset, EditorTestUtil.CARET_TAG).toString();
|
||||
|
||||
KotlinTestUtils.assertEqualsToFile(new File(afterFilePath), actualTextWithCaret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user