|
19 | 19 | import org.junit.runner.RunWith; |
20 | 20 | import org.junit.runners.MethodSorters; |
21 | 21 |
|
| 22 | +import com.espressif.idf.ui.handlers.Messages; |
22 | 23 | import com.espressif.idf.ui.test.common.WorkBenchSWTBot; |
23 | 24 | import com.espressif.idf.ui.test.common.utility.TestWidgetWaitUtility; |
24 | 25 | import com.espressif.idf.ui.test.operations.EnvSetupOperations; |
@@ -80,6 +81,7 @@ public void givenBNewProjectCreatedWhenCreateNewLaunchTargetThenProjectBuiltSucc |
80 | 81 | public void givenCNewProjectCreatedWhenDeleteSelectedLaunchTargetThenDeletedSuccessfully() |
81 | 82 | throws Exception |
82 | 83 | { |
| 84 | + Fixture.whenProjectFullCleanUsingContextMenu(); |
83 | 85 | Fixture.whenDeleteSelectedLaunchTarget(); |
84 | 86 | Fixture.thenLaunchTargetDeletedSuccessfully(); |
85 | 87 | } |
@@ -146,10 +148,7 @@ private static void whenDeleteLaunchTarget() throws Exception |
146 | 148 | TestWidgetWaitUtility.waitForDialogToAppear(bot, "New ESP Target", 20000); |
147 | 149 | SWTBotShell shell = bot.shell("New ESP Target"); |
148 | 150 | shell.setFocus(); |
149 | | - bot.button("Delete").click(); |
150 | | - TestWidgetWaitUtility.waitForDialogToAppear(bot, "IDF Launch Target Changed", 5000); |
151 | | - bot.button("Yes").click(); |
152 | | - bot.sleep(500); |
| 151 | + bot.button("Delete").click(); |
153 | 152 | } |
154 | 153 |
|
155 | 154 | private static void whenDeleteSelectedLaunchTarget() throws Exception |
@@ -207,6 +206,14 @@ private static void thenBuildFolderDeletedSuccessfully() throws Exception |
207 | 206 | assertTrue("Build folder was not deleted successfully!", ProjectTestOperations.findProjectFullCleanedFilesInBuildFolder(projectName, bot)); |
208 | 207 | } |
209 | 208 |
|
| 209 | + private static void whenProjectFullCleanUsingContextMenu() throws IOException |
| 210 | + { |
| 211 | + ProjectTestOperations.launchCommandUsingContextMenu(projectName, bot, "Project Full Clean"); |
| 212 | + ProjectTestOperations.joinJobByName(Messages.ProjectFullCleanCommandHandler_RunningFullcleanJobName); |
| 213 | + ProjectTestOperations.findInConsole(bot, "Espressif IDF Tools Console", "Done"); |
| 214 | + TestWidgetWaitUtility.waitForOperationsInProgressToFinishSync(bot); |
| 215 | + } |
| 216 | + |
210 | 217 | private static void cleanTestEnv() |
211 | 218 | { |
212 | 219 | TestWidgetWaitUtility.waitForOperationsInProgressToFinishAsync(bot); |
|
0 commit comments