Commit 3d2dc135 authored by Aneta Steimarova's avatar Aneta Steimarova

#929 Test for Crime Scene edited to be OK after merge with V3.7

parent c588d155
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
\ No newline at end of file
TestGameCrimeSceneEasyNoneStar
TestGameCrimeSceneEasyOneStar
TestGameCrimeSceneEasyTwoStar
TestGameCrimeSceneEasyThreeStar
TestGameCrimeSceneMediumNoneStar
TestGameCrimeSceneMediumOneStar
TestGameCrimeSceneMediumTwoStar
TestGameCrimeSceneMediumThreeStar
TestGameCrimeSceneHardNoneStar
TestGameCrimeSceneHardOneStar
TestGameCrimeSceneHardTwoStar
TestGameCrimeSceneHardThreeStar
......@@ -142,8 +142,8 @@ public abstract class AbstractTestScenario implements Runnable {
private Class<? extends AbstractTablexiaScreen> awaitingScreen = null;
private Class<? extends AbstractTablexiaScreen> lastScreen = null;
private String awaitingEvent = null;
private String lastEvent = null;
private static String awaitingEvent = null;
private static String lastEvent = null;
private String awaitingDialog = null;
private String lastDialog = null;
......@@ -959,12 +959,18 @@ public abstract class AbstractTestScenario implements Runnable {
@Handler
public void handleScenarioStepEvent(final AbstractTablexiaScreen.ScenarioStepEvent<String> step){
if(awaitingEvent!=null && awaitingEvent.equals(step.getStep())) {
clearTimeout();
wakeUp(EVENT_LOCK);
if(step.getStep()!=null) {
if (awaitingEvent != null) {
if (awaitingEvent.equals(step.getStep())){
clearTimeout();
wakeUp(EVENT_LOCK);
return;
}
else lastEvent = step.getStep();
}
//lastEvent will be always set to last event (empty if this is first caught event)
else lastEvent = step.getStep();
}
//lastEvent will be always set to last event (empty if this is first caught event)
if(step.getStep()!=null) lastEvent=step.getStep();
}
protected void waitForEvent(String infoMessage, String eventName) {
......
......@@ -169,8 +169,6 @@ public class TestGameCrimeScene extends AbstractTestGame {
List<Integer> actionNumberList = new ArrayList<>();
CrimeSceneGameState state = (CrimeSceneGameState)(getTablexia().getActualScreen()).getData();
setTimeout(DEFAULT_TASK_TIMEOUT*state.getSolution().size()*3,SCENARIO_GAME_ACTION);
for (int i = 0; i < state.getSolution().size(); i++) {
GameObject gameObject = null;
......@@ -196,10 +194,6 @@ public class TestGameCrimeScene extends AbstractTestGame {
actionNumberList.add(gameObject.getGameObjectType().getActionNumber());
}
AbstractTablexiaScreen.triggerScenarioStepEvent(SCENARIO_GAME_ACTION);
clearTimeout();
takeScreenShot();
clickAt(incGetSteps() + ". Click start button", CrimeSceneGame.BUTTON_START);
......
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