File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
src/test/com/intellij/lang/jsgraphql/operations Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 1010import com .google .common .collect .Lists ;
1111import com .intellij .codeInsight .completion .CompletionType ;
1212import com .intellij .openapi .application .ApplicationManager ;
13+ import com .intellij .openapi .editor .Document ;
1314import com .intellij .psi .PsiDocumentManager ;
15+ import com .intellij .psi .PsiFile ;
1416import com .intellij .testFramework .fixtures .LightCodeInsightFixtureTestCase ;
1517import org .junit .Test ;
1618
1921
2022public class JSGraphQLOperationsCodeInsightTest extends LightCodeInsightFixtureTestCase {
2123
24+ private PsiFile [] psiFiles ;
25+
2226 @ Override
2327 public void setUp () throws Exception {
2428 super .setUp ();
25- myFixture .configureByFiles ("CompletionSchema.graphqls" );
29+ psiFiles = myFixture .configureByFiles ("CompletionSchema.graphqls" );
30+ }
31+
32+ @ Override
33+ protected void tearDown () throws Exception {
34+ // clean up the schema discovery caches
35+ for (PsiFile psiFile : psiFiles ) {
36+ PsiDocumentManager documentManager = PsiDocumentManager .getInstance (psiFile .getProject ());
37+ final Document document = documentManager .getDocument (psiFile );
38+ assertNotNull (document );
39+ ApplicationManager .getApplication ().runWriteAction (() -> {
40+ document .setText ("" );
41+ documentManager .commitAllDocuments ();
42+ });
43+ }
44+ super .tearDown ();
2645 }
2746
2847 @ Override
You can’t perform that action at this time.
0 commit comments