summaryrefslogtreecommitdiff
path: root/android-uitests
diff options
context:
space:
mode:
authorSuyog Lokhande <suyoglokhande@google.com>2022-08-04 09:53:14 -0700
committerSuyog Lokhande <suyoglokhande@google.com>2022-08-04 17:38:06 +0000
commitabdbd2e5c53ca21aea2f66066ab0cdd9c0c995e5 (patch)
treef6611ca4b59c73bfa7ab97a05316ab4c1fb36faf /android-uitests
parent32b10f9dd4ebec7834146159db5a4ed3bcb45864 (diff)
downloadidea-abdbd2e5c53ca21aea2f66066ab0cdd9c0c995e5.tar.gz
Adding more validation to CreateNewAppModuleWithDefaultsTest and Test Tracker ID to OpenCloseVisualizationToolTest
Bug: 241294847 Test: https://fusion2.corp.google.com/invocations/107abe26-4cec-451d-9deb-efadda35a573 Change-Id: I07df35623ee91abb937921cae82b2408206c31e1
Diffstat (limited to 'android-uitests')
-rw-r--r--android-uitests/testSrc/com/android/tools/idea/tests/gui/gradle/CreateNewAppModuleWithDefaultsTest.java21
-rw-r--r--android-uitests/testSrc/com/android/tools/idea/tests/gui/uibuilder/OpenCloseVisualizationToolTest.java2
2 files changed, 18 insertions, 5 deletions
diff --git a/android-uitests/testSrc/com/android/tools/idea/tests/gui/gradle/CreateNewAppModuleWithDefaultsTest.java b/android-uitests/testSrc/com/android/tools/idea/tests/gui/gradle/CreateNewAppModuleWithDefaultsTest.java
index d94ee322a54..3e74b4ea2c4 100644
--- a/android-uitests/testSrc/com/android/tools/idea/tests/gui/gradle/CreateNewAppModuleWithDefaultsTest.java
+++ b/android-uitests/testSrc/com/android/tools/idea/tests/gui/gradle/CreateNewAppModuleWithDefaultsTest.java
@@ -29,6 +29,7 @@ import java.util.concurrent.TimeUnit;
import static com.android.tools.idea.testing.FileSubject.file;
import static com.google.common.truth.Truth.assertAbout;
+import static com.google.common.truth.Truth.assertThat;
@RunWith(GuiTestRemoteRunner.class)
public class CreateNewAppModuleWithDefaultsTest {
@@ -41,12 +42,14 @@ public class CreateNewAppModuleWithDefaultsTest {
* <p>TT ID: fd583b0a-bedd-4ec8-9207-70e4994ed761
* <pre>
* Test Steps
- * 1. File -> new module
+ * 1. Import 'SimpleApplication project and File -> New -> new module
* 2. Select Phone & Tablet module
- * 3. Choose no activity
+ * 3. Choose empty activity (so that class and layout xml file will be created)
* 3. Wait for build to complete
* Verification
- * a new folder matching the module name should have been created.
+ * 1. A new folder matching the module name should have been created.
+ * 2. A new layout file and class file is created
+ * 3. Build is successful
* </pre>
*/
@RunIn(TestGroup.SANITY_BAZEL)
@@ -58,8 +61,18 @@ public class CreateNewAppModuleWithDefaultsTest {
.enterModuleName("application_module")
.wizard()
.clickNext()
- .chooseActivity("No Activity")
+ .chooseActivity("Empty Activity")
+ .clickNext()
.clickFinishAndWaitForSyncToFinish(Wait.seconds(30));
assertAbout(file()).that(guiTest.getProjectPath("application_module")).isDirectory();
+
+ guiTest.ideFrame().getProjectView().assertFilesExist(
+ "/application_module/src/main/res/layout/activity_main.xml"
+ );
+ guiTest.ideFrame().getProjectView().assertFilesExist(
+ "/application_module/src/main/java/com/example/application_module/MainActivity.java"
+ );
+
+ assertThat(guiTest.ideFrame().invokeProjectMake().isBuildSuccessful()).isTrue();
}
}
diff --git a/android-uitests/testSrc/com/android/tools/idea/tests/gui/uibuilder/OpenCloseVisualizationToolTest.java b/android-uitests/testSrc/com/android/tools/idea/tests/gui/uibuilder/OpenCloseVisualizationToolTest.java
index aebcf48d188..8bdbcbfa5ef 100644
--- a/android-uitests/testSrc/com/android/tools/idea/tests/gui/uibuilder/OpenCloseVisualizationToolTest.java
+++ b/android-uitests/testSrc/com/android/tools/idea/tests/gui/uibuilder/OpenCloseVisualizationToolTest.java
@@ -34,7 +34,7 @@ public class OpenCloseVisualizationToolTest {
* This is run to qualify releases. Please involve the test team in substantial changes.
* </p>
*
- * TT ID: TODO
+ * TT ID: 1aa49fe7-0b4c-4eb7-84ca-a1e4c1ba18ff
* <p>
* <pre>
* This feature is for Android Studio 3.2 and above.