Commit 1ede4deb authored by Aneta Steimarova's avatar Aneta Steimarova

#929 Added waiting for shaking pen before drag pen.

parent cbf41e01
......@@ -110,6 +110,7 @@ public class FormScreen extends AbstractTablexiaScreen<Void> {
public static final String SCENARIO_STEP_MUGSHOTS_VISIBLE = "mugshot images visible";
public static final String SCENARIO_STEP_IMAGE_CHOSEN = "image chosen";
public static final String SCENARIO_STEP_TEXT_FIELD_TIMEOUT = "text field timeout";
public static final String PEN_SHAKED = "pen shaked";
public static final String FORM_SIGNATURE_DIALOG = "signature dialog";
......@@ -584,7 +585,12 @@ public class FormScreen extends AbstractTablexiaScreen<Void> {
if (isValid(FormValidationEnum.SIGNATURE) == false) {
displayHintDialog(FormValidationEnum.SIGNATURE, signaturePlace);
playValidationSound(FormScreenAssets.VALIDATION_SIGNATURE_SOUND);
pen.addAction(Actions.forever(Actions.sequence(Actions.repeat(SHAKE_ANIMATION_REPEAT_COUNT, Actions.sequence(Actions.moveBy(SHAKE_ANIMATION_OFFSET, 0, SHAKE_ANIMATION_STEP_DURATION), Actions.moveBy(-SHAKE_ANIMATION_OFFSET, 0, SHAKE_ANIMATION_STEP_DURATION))), Actions.delay(1))));
pen.addAction(Actions.forever(Actions.sequence(Actions.repeat(SHAKE_ANIMATION_REPEAT_COUNT, Actions.sequence(Actions.moveBy(SHAKE_ANIMATION_OFFSET, 0, SHAKE_ANIMATION_STEP_DURATION), Actions.moveBy(-SHAKE_ANIMATION_OFFSET, 0, SHAKE_ANIMATION_STEP_DURATION))), Actions.delay(1), Actions.run(new Runnable() {
@Override
public void run() {
triggerScenarioStepEvent(PEN_SHAKED);
}
}))));
return false;
}
......
NewUserScenario
TestScenarioSpecial
TestScenarioHallOfFameRobberyTrophies
TestScenarioHeapOfTrophies
TestGameShootingRangeEasyNoneStar
TestGameRobberyMediumOneStar
TestGameInTheDarknessMedium
TestGameNightWatchHardThreeStar
TestGamePursuitMediumNoneStar
TestGameCrimeSceneHardOneStar
TestGameKidnappingEasyTwoStar
TestGameRunesMediumThreeStar
TestGameProtocolEasyOneStar
TestGameSafeHardNoneStars
TestStatisticsInTheDarkness
TestEncyclopedia
TestProfile
OfficeTestScenario
\ No newline at end of file
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
NewUserScenario
\ No newline at end of file
......@@ -80,20 +80,21 @@ public class NewUserScenario extends AbstractTestScenario {
clickAt("31. Click at switch button female", FormScreen.SWITCH_BUTTON_FORM_GENDER_FEMALE);
if(movePenOverSignature("32. Move pen over signature"))logOK();
waitForEvent("32. Wait for event shaking pen", FormScreen.PEN_SHAKED);
if(movePenOverSignature("33. Move pen over signature"))logOK();
else logFail();
waitForDialog("33. Wait for signature dialog", FormScreen.FORM_SIGNATURE_DIALOG);
waitForDialog("34. Wait for signature dialog", FormScreen.FORM_SIGNATURE_DIALOG);
signTheForm("34. Signing the form");
signTheForm("35. Signing the form");
clickDialogButton("35. Click yes in signature dialog", FormScreen.FORM_SIGNATURE_DIALOG, 1);
waitForEvent("36. Wait for event form scene visible",FormScreen.SCENARIO_STEP_FORM_SCENE_VISIBLE);
clickDialogButton("36. Click yes in signature dialog", FormScreen.FORM_SIGNATURE_DIALOG, 1);
waitForEvent("37. Wait for event form scene visible",FormScreen.SCENARIO_STEP_FORM_SCENE_VISIBLE);
if(stampTheForm("37. Stamping the form"))logOK();
if(stampTheForm("38. Stamping the form"))logOK();
else logFail();
waitForScreen("38. Wait for office page visible", OfficeMenuScreen.class);
clickAt("39. Click at toggle help overlay button", OfficeMenuScreen.TOGGLE_HELP_OVERLAY_BUTTON_NAME);
waitForScreen("39. Wait for office page visible", OfficeMenuScreen.class);
clickAt("40. Click at toggle help overlay button", OfficeMenuScreen.TOGGLE_HELP_OVERLAY_BUTTON_NAME);
}
private void clickDetectiveDialogs(int numberSteps){
......
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