|
6 | 6 | package com.magento.idea.magento2plugin; |
7 | 7 |
|
8 | 8 | import com.intellij.openapi.util.text.StringUtil; |
| 9 | +import com.intellij.testFramework.IndexingTestUtil; |
9 | 10 | import com.intellij.testFramework.PlatformTestUtil; |
10 | 11 | import com.intellij.testFramework.fixtures.BasePlatformTestCase; |
11 | 12 | import com.magento.idea.magento2plugin.indexes.IndexManager; |
@@ -50,20 +51,23 @@ protected void enablePluginAndReindex() { |
50 | 51 | settings.mftfSupportEnabled = true; |
51 | 52 | IndexManager.manualReindex(); |
52 | 53 | PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); |
| 54 | + IndexingTestUtil.waitUntilIndexesAreReady(myFixture.getProject()); |
53 | 55 | } |
54 | 56 |
|
55 | 57 | protected void disablePluginAndReindex() { |
56 | 58 | final Settings settings = Settings.getInstance(myFixture.getProject()); |
57 | 59 | settings.pluginEnabled = false; |
58 | 60 | IndexManager.manualReindex(); |
59 | 61 | PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); |
| 62 | + IndexingTestUtil.waitUntilIndexesAreReady(myFixture.getProject()); |
60 | 63 | } |
61 | 64 |
|
62 | 65 | protected void disableMftfSupportAndReindex() { |
63 | 66 | final Settings settings = Settings.getInstance(myFixture.getProject()); |
64 | 67 | settings.mftfSupportEnabled = false; |
65 | 68 | IndexManager.manualReindex(); |
66 | 69 | PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); |
| 70 | + IndexingTestUtil.waitUntilIndexesAreReady(myFixture.getProject()); |
67 | 71 | } |
68 | 72 |
|
69 | 73 | protected String prepareFixturePath( |
|
0 commit comments