Commit 26fdb935 authored by Aneta Steimarova's avatar Aneta Steimarova

#929 Removed wait(WAIT_TIME) from test of game Crime Scene

parent 7639b5b5
......@@ -22,6 +22,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.games.crime_scene.CrimeSceneGame;
import cz.nic.tablexia.screen.AbstractTablexiaScreen;
import cz.nic.tablexia.util.ui.actionwidget.Action;
import cz.nic.tablexia.util.ui.actionwidget.ActionsStripWidget;
import cz.nic.tablexia.util.ui.tilemapgenerator.Position;
......@@ -32,6 +33,7 @@ import cz.nic.tablexia.util.ui.tilemapgenerator.Position;
* Created by danilov on 18.4.16.
*/
public class GameObject extends Group implements Action.ActionListener {
public static final String EVENT_DROP_DOWN = "drop down card";
private ActionsStripWidget actionsStripWidget;
private CrimeSceneGame crimeSceneGame;
......@@ -74,7 +76,7 @@ public class GameObject extends Group implements Action.ActionListener {
@Override
public void onActionDrop(Action action, int collidesWithNumber) {
AbstractTablexiaScreen.triggerScenarioStepEvent(EVENT_DROP_DOWN);
if (collidesWithNumber != Action.NO_COLLISION_NUMBER) {
// FIXME: 10/30/17 why to store action number if using ordinal?
if (!crimeSceneGame.isActionAdded(action)) actionsStripWidget.addSelectedAction(GameObjectType.values()[action.getActionNumber()].getActionTexturePath(), collidesWithNumber, crimeSceneGame, action.getActionNumber());
......
TestGameInTheDarknessEasy
TestGameInTheDarknessMedium
TestGameInTheDarknessHard
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
TestGameInTheDarknessHardScenario
\ No newline at end of file
TestGameCrimeSceneEasyNoneStar
TestGameCrimeSceneEasyOneStar
TestGameCrimeSceneEasyTwoStar
TestGameCrimeSceneEasyThreeStar
TestGameCrimeSceneMediumNoneStar
TestGameCrimeSceneMediumOneStar
TestGameCrimeSceneMediumTwoStar
TestGameCrimeSceneMediumThreeStar
TestGameCrimeSceneHardNoneStar
TestGameCrimeSceneHardOneStar
TestGameCrimeSceneHardTwoStar
TestGameCrimeSceneHardThreeStar
\ No newline at end of file
......@@ -53,7 +53,6 @@ import cz.nic.tablexia.util.ui.dialog.components.TwoButtonContentDialogComponent
public abstract class AbstractTestGame extends AbstractTestScenario {
protected final String SCENARIO_GAME_ACTION = "game action";
protected final int WAIT_TIME = 500;
protected GameDifficulty difficulty = GameDifficulty.EASY;
protected AbstractTablexiaGame.GameResult expectedResult = AbstractTablexiaGame.GameResult.THREE_STAR;
......
......@@ -184,7 +184,7 @@ public class TestGameCrimeScene extends AbstractTestGame {
//Move showed game object action to strip widget
moveActionToMenu(incGetSteps() + ". Move game object["+gameObject.getGameObjectType()+"] to strip widget",actionX,actionY,finishX,finishY,gameObject.getAction(),menu);
wait(WAIT_TIME);
waitForEvent(incGetSteps() + ". Wait for event card drop down", GameObject.EVENT_DROP_DOWN);
actionNumberList.add(gameObject.getGameObjectType().getActionNumber());
}
......
......@@ -565,7 +565,7 @@ public class TestGameInTheDarkness extends AbstractTestGame {
moveActionToMenu(incGetSteps() + ". Move action with action number: " + action.getActionNumber() + " to menu",xStart,yStart,xMoveFinish,yMoveFinish,action,menu);
waitForEvent(incGetSteps() + ". " , ActionsWidget.EVENT_DROP_DOWN);
waitForEvent(incGetSteps() + ". Wait for event card drop down" , ActionsWidget.EVENT_DROP_DOWN);
}
private Action findActionByActionType(InTheDarknessActionType type, List<Action> actions){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment