use of com.android.tools.idea.tests.gui.framework.fixture.theme.ThemeEditorFixture in project android by JetBrains.
the class NewStyleDialogGuiTest method testCreateNewThemeSelection.
/**
* When "Create New Theme" is selected, opened dialog contains theme that was edited
* as a parent.
*
* Is a regression test for http://b.android.com/180575
*/
@Test
public void testCreateNewThemeSelection() throws IOException {
guiTest.importSimpleApplication();
final ThemeEditorFixture themeEditor = ThemeEditorGuiTestUtils.openThemeEditor(guiTest.ideFrame());
final JComboBoxFixture themesComboBox = themeEditor.getThemesComboBox();
themesComboBox.selectItem("Theme.AppCompat.Light.NoActionBar");
themesComboBox.selectItem("Create New Theme");
final NewStyleDialogFixture newStyleDialog1 = NewStyleDialogFixture.find(guiTest.robot());
assertEquals("Theme.AppCompat.Light.NoActionBar", newStyleDialog1.getParentComboBox().selectedItem());
newStyleDialog1.clickCancel();
themeEditor.waitForThemeSelection("Theme.AppCompat.Light.NoActionBar");
themesComboBox.selectItem("Theme.AppCompat.NoActionBar");
themesComboBox.selectItem("Create New Theme");
final NewStyleDialogFixture newStyleDialog2 = NewStyleDialogFixture.find(guiTest.robot());
assertEquals("Theme.AppCompat.NoActionBar", newStyleDialog2.getParentComboBox().selectedItem());
newStyleDialog2.clickCancel();
}
Aggregations