-
-
Notifications
You must be signed in to change notification settings - Fork 34
ADFA-365 - project build test with groovy gradle modules #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
app/src/androidTest/kotlin/com/itsaky/androidide/ProjectBuildHelper.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package com.itsaky.androidide | ||
|
|
||
| import com.itsaky.androidide.scenarios.InitializationProjectAndCancelingBuildScenario | ||
| import com.itsaky.androidide.scenarios.NavigateToMainScreenScenario | ||
| import com.itsaky.androidide.screens.TemplateScreen.selectTemplate | ||
| import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext | ||
|
|
||
| fun TestContext<Unit>.navigateToMainScreen() { | ||
| step("Initialize the app and navigate to the Main Screen") { | ||
| scenario(NavigateToMainScreenScenario()) | ||
| } | ||
| } | ||
|
|
||
| fun TestContext<Unit>.selectProjectTemplate(stepTitle: String, templateResId: Int) { | ||
| step(stepTitle) { | ||
| selectTemplate(templateResId) | ||
| } | ||
| } | ||
|
|
||
| fun TestContext<Unit>.initializeProjectAndCancelBuild() { | ||
| step("Initialization the project and cancelling the build") { | ||
| scenario(InitializationProjectAndCancelingBuildScenario()) | ||
| } | ||
| } |
210 changes: 210 additions & 0 deletions
210
app/src/androidTest/kotlin/com/itsaky/androidide/ProjectBuildTestWithGroovyGradle.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,210 @@ | ||
| package com.itsaky.androidide | ||
|
|
||
| import androidx.test.ext.junit.rules.activityScenarioRule | ||
| import com.itsaky.androidide.activities.SplashActivity | ||
| import com.itsaky.androidide.screens.HomeScreen.clickCreateProjectHomeScreen | ||
| import com.itsaky.androidide.screens.ProjectSettingsScreen.clickCreateProjectProjectSettings | ||
| import com.itsaky.androidide.screens.ProjectSettingsScreen.selectJavaLanguage | ||
| import com.itsaky.androidide.screens.ProjectSettingsScreen.selectKotlinLanguage | ||
| import com.itsaky.androidide.screens.ProjectSettingsScreen.uncheckeKotlinScript | ||
| import com.kaspersky.kaspresso.testcases.api.testcase.TestCase | ||
| import org.junit.Rule | ||
| import org.junit.Test | ||
|
|
||
| class ProjectBuildTestWithGroovyGradle : TestCase() { | ||
|
|
||
| @get:Rule | ||
| val activityRule = activityScenarioRule<SplashActivity>() | ||
|
|
||
| @Test | ||
| fun test_projectBuild_emptyProject_java_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the empty project", | ||
| R.string.template_empty | ||
| ) | ||
| selectJavaLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_emptyProject_kotlin_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the empty project", | ||
| R.string.template_empty | ||
| ) | ||
| selectKotlinLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_baseProject_java_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the basic project", | ||
| R.string.template_basic | ||
| ) | ||
| selectJavaLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_baseProject_kotlin_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the basic project", | ||
| R.string.template_basic | ||
| ) | ||
| selectKotlinLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_navigationDrawerProject_java_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the navigation drawer project", | ||
| R.string.template_navigation_drawer | ||
| ) | ||
| selectJavaLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_navigationDrawerProject_kotlin_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the navigation drawer project", | ||
| R.string.template_navigation_drawer | ||
| ) | ||
| selectKotlinLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_bottomNavigationProject_java_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the bottom navigation project", | ||
| R.string.template_navigation_tabs | ||
| ) | ||
| selectJavaLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_bottomNavigationProject_kotlin_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the bottom navigation project", | ||
| R.string.template_navigation_tabs | ||
| ) | ||
| selectKotlinLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_tabbedActivityProject_java_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the tabbed activity project", | ||
| R.string.template_tabs | ||
| ) | ||
| selectJavaLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_tabbedActivityProject_kotlin_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the tabbed activity project", | ||
| R.string.template_tabs | ||
| ) | ||
| selectKotlinLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_noAndroidXProject_java_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the no AndroidX project", | ||
| R.string.template_no_AndroidX | ||
| ) | ||
| selectJavaLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun test_projectBuild_noAndroidXProject_kotlin_groovyGradle() { | ||
| run { | ||
| navigateToMainScreen() | ||
| clickCreateProjectHomeScreen() | ||
| selectProjectTemplate( | ||
| "Select the no AndroidX project", | ||
| R.string.template_no_AndroidX | ||
| ) | ||
| selectKotlinLanguage() | ||
| uncheckeKotlinScript() | ||
| clickCreateProjectProjectSettings() | ||
| initializeProjectAndCancelBuild() | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand this file contains all groovy tests. And ProjectBuildTest has all gradle.kts test. If so can you later rename ProjectBuildTest to ProjectBuildTestWithKtsGradle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done