public void testMainMenuButton() { solo.clickOnText(solo.getString(R.string.main_menu_continue)); solo.waitForActivity(ProjectActivity.class.getSimpleName()); solo.clickOnText(backgroundName); UiTestUtils.clickOnHomeActionBarButton(solo); solo.waitForActivity(MainMenuActivity.class.getSimpleName()); assertTrue( "Clicking on main menu button did not cause main menu to be displayed", solo.getCurrentActivity() instanceof MainMenuActivity); }
public void testLookButtonTextChange() { String spriteName = "sprite1"; solo.clickOnText(solo.getString(R.string.main_menu_continue)); solo.waitForActivity(ProjectActivity.class.getSimpleName()); UiTestUtils.addNewSprite(solo, spriteName, lookFile, null); solo.clickOnText(spriteName); solo.waitForActivity(ProgramMenuActivity.class.getSimpleName()); assertTrue( "Text on look button is not 'Looks'", solo.searchText(solo.getString(R.string.looks))); UiTestUtils.clickOnHomeActionBarButton(solo); solo.clickOnText(solo.getString(R.string.main_menu_continue)); solo.clickOnText(backgroundName); solo.waitForText(solo.getString(R.string.backgrounds)); assertTrue( "Text on look button is not 'Backgrounds'", solo.searchText(solo.getString(R.string.backgrounds))); }