Search in sources :

Example 11 with PatternTextMatcher

use of org.fest.swing.util.PatternTextMatcher in project android by JetBrains.

the class LayoutInspectorTest method launchLayoutInspector.

/**
   * <p>This is run to qualify releases. Please involve the test team in substantial changes.
   * <p>TR ID: C14581570
   * <pre>
   *   Verifies that the layout inspector launches successfully and shows relevant layout elements
   *   Test Steps
   *   1. Import a project
   *   2. Run the Project to Emulator
   *   3. Click on Layout Inspector
   *   Verification
   *   1. Verify for Layout elements in Hierarchy View of Layout Inspector
   * </pre>
   */
@Ignore("http://b/30795134")
@Test
@RunIn(TestGroup.QA)
public void launchLayoutInspector() throws Exception {
    guiTest.ideFrame().runApp("app").selectDevice(AVD_NAME).clickOk();
    guiTest.ideFrame().getRunToolWindow().findContent("app").waitForOutput(new PatternTextMatcher(LOCAL_PATH_OUTPUT), 120);
    List<String> layoutElements = guiTest.ideFrame().getAndroidToolWindow().selectProcess(PROCESS_NAME).selectDevicesTab().clickLayoutInspector().getLayoutElements();
    assertThat(layoutElements).contains("android.widget.RelativeLayout");
    assertThat(layoutElements).contains("android.widget.TextView");
    assertThat(layoutElements).contains("android.widget.FrameLayout");
}
Also used : PatternTextMatcher(org.fest.swing.util.PatternTextMatcher) RunIn(com.android.tools.idea.tests.gui.framework.RunIn)

Aggregations

PatternTextMatcher (org.fest.swing.util.PatternTextMatcher)11 RunIn (com.android.tools.idea.tests.gui.framework.RunIn)6 IdeFrameFixture (com.android.tools.idea.tests.gui.framework.fixture.IdeFrameFixture)6 Test (org.junit.Test)3 Ignore (org.junit.Ignore)2 DebugToolWindowFixture (com.android.tools.idea.tests.gui.framework.fixture.DebugToolWindowFixture)1 ExecutionToolWindowFixture (com.android.tools.idea.tests.gui.framework.fixture.ExecutionToolWindowFixture)1 NewModuleDialogFixture (com.android.tools.idea.tests.gui.framework.fixture.NewModuleDialogFixture)1 ProjectViewFixture (com.android.tools.idea.tests.gui.framework.fixture.ProjectViewFixture)1 GradleToolWindowFixture (com.android.tools.idea.tests.gui.framework.fixture.gradle.GradleToolWindowFixture)1 Notification (com.intellij.notification.Notification)1 HashMap (com.intellij.util.containers.HashMap)1 IOException (java.io.IOException)1