-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* multiple tabs * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * cust_args * test cases,multiple tabs will getting topic id from home Merge branch 'develop' of https://github.com/oppia/oppia-android into topic-player-multiple-tabs # Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt # domain/src/main/java/org/oppia/domain/exploration/ExplorationRetriever.kt * nit * nit * nit * nit * nit * separate test cases for all four tabs * nit * nit * nit * nit * nit * nit * nit * nit * Topic Overview see more click and tab switch * Topic Overview see more click and tab switch * Topic Overview see more click and tab switch * topic id todo's are implemented, test cases updated as per new data through topic id * Topic Overview see more click and tab switch * nit * nit * merged with base branch * nit * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * revert back to develop * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * set title on the basis of selected topic in topic screen.other nit changes * nit * Merge branches 'develop' and 'topic-player-multiple-tabs' of https://github.com/oppia/oppia-android into topic-player-multiple-tabs # Conflicts: # app/src/main/java/org/oppia/app/home/HomeActivity.kt # app/src/main/java/org/oppia/app/home/HomeFragmentPresenter.kt # app/src/main/java/org/oppia/app/topic/TopicActivity.kt # app/src/main/res/layout/home_fragment.xml * nit * nit * nit * nit * Merge branches 'develop' and 'topic-player-multiple-tabs' of https://github.com/oppia/oppia-android into topic-player-multiple-tabs # Conflicts: # app/src/main/AndroidManifest.xml * nit in TopicFragmentPresenter changed var to val in line number 69 * nit * shorten stackoverflow link,testcase method name change * nit changes suggested by Rajat * nit * nit * used enum to set current tab in TopicFragmentPresenter. other nit changes. * nit * nit * nit * nit * nit * nit * nit * nit * Fix #135:Topic issues fixes part 2 (#318) * nit * TopicTestActivityTest,TopicTestActivityForStory and TopicTestActivityForStoryTest introdused for testing topic multiple tabs * TopicTestActivityTest,TopicTestActivityForStory and TopicTestActivityForStoryTest introdused for testing topic multiple tabs * Removed Topic and Exploration Button from HomeFragment, Removed topicButtonClick Implementation * nit * nit * test cases fix due to change in data. * nit * nit * nit * nit
- Loading branch information
1 parent
adebdf4
commit ed6aa46
Showing
14 changed files
with
311 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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 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 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
64 changes: 64 additions & 0 deletions
64
app/src/main/java/org/oppia/app/testing/TopicTestActivity.kt
This file contains 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,64 @@ | ||
package org.oppia.app.testing | ||
|
||
import android.os.Bundle | ||
import org.oppia.app.activity.InjectableAppCompatActivity | ||
import org.oppia.app.home.RouteToExplorationListener | ||
import org.oppia.app.player.exploration.ExplorationActivity | ||
import org.oppia.app.story.StoryActivity | ||
import org.oppia.app.topic.RouteToConceptCardListener | ||
import org.oppia.app.topic.RouteToQuestionPlayerListener | ||
import org.oppia.app.topic.RouteToStoryListener | ||
import org.oppia.app.topic.RouteToTopicPlayListener | ||
import org.oppia.app.topic.TOPIC_FRAGMENT_TAG | ||
import org.oppia.app.topic.TopicActivityPresenter | ||
import org.oppia.app.topic.TopicFragment | ||
import org.oppia.app.topic.TopicTab | ||
import org.oppia.app.topic.conceptcard.ConceptCardFragment | ||
import org.oppia.app.topic.questionplayer.QuestionPlayerActivity | ||
import org.oppia.domain.topic.TEST_TOPIC_ID_0 | ||
import javax.inject.Inject | ||
|
||
/** The activity for testing [TopicFragment]. */ | ||
class TopicTestActivity : InjectableAppCompatActivity(), RouteToQuestionPlayerListener, RouteToConceptCardListener, | ||
RouteToTopicPlayListener, RouteToStoryListener, RouteToExplorationListener { | ||
@Inject | ||
lateinit var topicActivityPresenter: TopicActivityPresenter | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
activityComponent.inject(this) | ||
topicActivityPresenter.handleOnCreate(topicId = TEST_TOPIC_ID_0, storyId = "") | ||
} | ||
|
||
override fun routeToQuestionPlayer(skillIdList: ArrayList<String>) { | ||
startActivity(QuestionPlayerActivity.createQuestionPlayerActivityIntent(this, skillIdList)) | ||
} | ||
|
||
override fun routeToStory(storyId: String) { | ||
startActivity(StoryActivity.createStoryActivityIntent(this, storyId)) | ||
} | ||
|
||
override fun routeToTopicPlayFragment() { | ||
val topicFragment = supportFragmentManager.findFragmentByTag(TOPIC_FRAGMENT_TAG) as TopicFragment | ||
topicFragment.topicFragmentPresenter.setCurrentTab(TopicTab.PLAY) | ||
} | ||
|
||
override fun routeToConceptCard(skillId: String) { | ||
if (getConceptCardFragment() == null) { | ||
val conceptCardFragment: ConceptCardFragment = ConceptCardFragment.newInstance(skillId) | ||
conceptCardFragment.showNow(supportFragmentManager, TAG_CONCEPT_CARD_DIALOG) | ||
} | ||
} | ||
|
||
override fun routeToExploration(explorationId: String) { | ||
startActivity(ExplorationActivity.createExplorationActivityIntent(this, explorationId)) | ||
} | ||
|
||
private fun getConceptCardFragment(): ConceptCardFragment? { | ||
return supportFragmentManager.findFragmentByTag(TAG_CONCEPT_CARD_DIALOG) as ConceptCardFragment? | ||
} | ||
|
||
companion object { | ||
internal const val TAG_CONCEPT_CARD_DIALOG = "CONCEPT_CARD_DIALOG" | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
app/src/main/java/org/oppia/app/testing/TopicTestActivityForStory.kt
This file contains 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,66 @@ | ||
package org.oppia.app.testing | ||
|
||
import android.os.Bundle | ||
import org.oppia.app.activity.InjectableAppCompatActivity | ||
import org.oppia.app.home.RouteToExplorationListener | ||
import org.oppia.app.player.exploration.ExplorationActivity | ||
import org.oppia.app.story.StoryActivity | ||
import org.oppia.app.topic.RouteToConceptCardListener | ||
import org.oppia.app.topic.RouteToQuestionPlayerListener | ||
import org.oppia.app.topic.RouteToStoryListener | ||
import org.oppia.app.topic.RouteToTopicPlayListener | ||
import org.oppia.app.topic.TOPIC_FRAGMENT_TAG | ||
import org.oppia.app.topic.TopicActivityPresenter | ||
import org.oppia.app.topic.TopicFragment | ||
import org.oppia.app.topic.TopicTab | ||
import org.oppia.app.topic.conceptcard.ConceptCardFragment | ||
import org.oppia.app.topic.questionplayer.QuestionPlayerActivity | ||
import org.oppia.domain.topic.TEST_STORY_ID_1 | ||
import org.oppia.domain.topic.TEST_TOPIC_ID_0 | ||
import javax.inject.Inject | ||
|
||
/** The test activity for [TopicFragment] to test displaying story by storyId. */ | ||
class TopicTestActivityForStory : InjectableAppCompatActivity(), RouteToQuestionPlayerListener, | ||
RouteToConceptCardListener, | ||
RouteToTopicPlayListener, RouteToStoryListener, RouteToExplorationListener { | ||
@Inject | ||
lateinit var topicActivityPresenter: TopicActivityPresenter | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
activityComponent.inject(this) | ||
topicActivityPresenter.handleOnCreate(topicId = TEST_TOPIC_ID_0, storyId = TEST_STORY_ID_1) | ||
} | ||
|
||
override fun routeToQuestionPlayer(skillIdList: ArrayList<String>) { | ||
startActivity(QuestionPlayerActivity.createQuestionPlayerActivityIntent(this, skillIdList)) | ||
} | ||
|
||
override fun routeToStory(storyId: String) { | ||
startActivity(StoryActivity.createStoryActivityIntent(this, storyId)) | ||
} | ||
|
||
override fun routeToTopicPlayFragment() { | ||
val topicFragment = supportFragmentManager.findFragmentByTag(TOPIC_FRAGMENT_TAG) as TopicFragment | ||
topicFragment.topicFragmentPresenter.setCurrentTab(TopicTab.PLAY) | ||
} | ||
|
||
override fun routeToConceptCard(skillId: String) { | ||
if (getConceptCardFragment() == null) { | ||
val conceptCardFragment: ConceptCardFragment = ConceptCardFragment.newInstance(skillId) | ||
conceptCardFragment.showNow(supportFragmentManager, TAG_CONCEPT_CARD_DIALOG) | ||
} | ||
} | ||
|
||
override fun routeToExploration(explorationId: String) { | ||
startActivity(ExplorationActivity.createExplorationActivityIntent(this, explorationId)) | ||
} | ||
|
||
private fun getConceptCardFragment(): ConceptCardFragment? { | ||
return supportFragmentManager.findFragmentByTag(TAG_CONCEPT_CARD_DIALOG) as ConceptCardFragment? | ||
} | ||
|
||
companion object { | ||
internal const val TAG_CONCEPT_CARD_DIALOG = "CONCEPT_CARD_DIALOG" | ||
} | ||
} |
This file contains 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 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 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 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 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 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
Oops, something went wrong.