Skip to content

Commit

Permalink
select esp32s2 targt for DFU test (espressif#571)
Browse files Browse the repository at this point in the history
Co-authored-by: Denys Almazov <[email protected]>
  • Loading branch information
alirana01 and sigmaaa authored Jul 18, 2022
1 parent dae91d0 commit e63da82
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.espressif.idf.ui.test.operations.EnvSetupOperations;
import com.espressif.idf.ui.test.operations.ProjectTestOperations;
import com.espressif.idf.ui.test.operations.SWTBotTreeOperations;
import com.espressif.idf.ui.test.operations.selectors.LaunchBarTargetSelector;

/**
* Test class to test the project creation, build and basic operations
Expand Down Expand Up @@ -176,6 +177,7 @@ public void givenNewProjectCreatedDfuBuiltThenHasDfuBin() throws Exception
Fixture.givenNewEspressifIDFProjectIsSelected("EspressIf", "Espressif IDF Project");
Fixture.givenProjectNameIs("NewProjectTest");
Fixture.whenNewProjectIsSelected();
Fixture.thenLaunchTargetIsSelectedFromLaunchTargets("esp32s2");
Fixture.switchDfuStatus();
Fixture.whenProjectIsBuiltUsingContextMenu();
Fixture.thenProjectHasTheFile("dfu.bin", "/build");
Expand All @@ -189,12 +191,26 @@ private static class Fixture
private static String subCategory;
private static String projectName;
private static String projectTemplate;
private static LaunchBarTargetSelector launchBarTargetSelector;

private static void loadEnv() throws Exception
{
bot = WorkBenchSWTBot.getBot();
EnvSetupOperations.setupEspressifEnv(bot);
bot.sleep(1000);
try
{
launchBarTargetSelector = new LaunchBarTargetSelector(bot);
}
catch (WidgetNotFoundException e)
{
launchBarTargetSelector = new LaunchBarTargetSelector(bot, false);
}
}

public static void thenLaunchTargetIsSelectedFromLaunchTargets(String launchTargetName)
{
launchBarTargetSelector.select(launchTargetName);
}

private static void givenNewEspressifIDFProjectIsSelected(String category, String subCategory)
Expand Down

0 comments on commit e63da82

Please sign in to comment.