Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ public class HomeConstants {
public static final String ALOW_GOOGLE_IN_TELLA = "xpath://android.widget.Button[@resource-id=\"com.google.android.gms:id/agree_and_share_button\"]";
public static final String SLIDE_DELETE = "id:org.hzontal.tella:id/panic_seek";
public static final String LBL_CONNECTIOS = "id:org.hzontal.tella:id/serversText";
public static final String BTN_CLOSES_APP = "xpath://android.widget.ImageButton[@content-desc=\"quick exit\"]";
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

public class LockUnlockConstants {
public static final String START_BUTTON = "xpath://android.widget.TextView[@resource-id=\"org.hzontal.tella:id/startBtn\"]";
public static final String REOPEN_APP_PASSWORD_VERIFICATION= "id:password_msgTV";
public static final String REOPEN_APP_PIN_VERIFICATION= "id:pin_enterTV";
public static final String REOPEN_APP_PASSWORD_VERIFICATION = "id:password_msgTV";
public static final String REOPEN_APP_PIN_VERIFICATION = "id:pin_enterTV";
public static final String NEXT_BUTTON = "id:next_btn";
public static final String LOCK_PASSWORD_BUTTON = "id:lockPasswordBtn";
public static final String PASSWORD_RIGHT_BUTTON = "id:password_right_button";
Expand All @@ -20,4 +20,6 @@ public class LockUnlockConstants {
public static final String TELLA_APP = "ACCESSIBILITY_ID:Tella";
public static final String VIEW_NOT_DISPLAYED_MESSAGE = "Login page is not displayed.";

public static final String BTN_UNLOCK = "id:org.hzontal.tella:id/password_right_button";

}
12 changes: 5 additions & 7 deletions src/main/java/com/crowdar/tella/services/HomeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
import com.crowdar.core.actions.MobileActionManager;
import com.crowdar.tella.constants.HomeConstants;
import com.crowdar.tella.constants.HomeConstantsIOS;

import io.appium.java_client.android.AndroidDriver;


import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;

import org.testng.Assert;


import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;


public class HomeService {
Expand Down Expand Up @@ -80,7 +75,7 @@ public static void isConnection() {

public static void isNotConnection() {
isHomeLoaded();
try{
try {
//Hacemos falla al proposito para indicar que el LBl de conexion ya no esta.
// Indicando que la conexion desaparecio
boolean flag = MobileActionManager.getElement(HomeConstants.LBL_CONNECTIOS).isDisplayed();
Expand All @@ -94,4 +89,7 @@ public static void clicHomeButton() {
MobileActionManager.waitClickable(HomeConstants.HOME_BUTTON).click();
}

public static void clicClosesBtnInHome() {
MobileActionManager.waitClickable(HomeConstants.BTN_CLOSES_APP).click();
}
}
33 changes: 13 additions & 20 deletions src/main/java/com/crowdar/tella/services/ServersService.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,29 +218,22 @@ public static void googleDrive() {
}



public static void clicNextBtn() {
//Como el boton esta abajo de la pantalla, tenemos q escroliar hasta el final
// por ello utilizamos PointerInput para simular el movimiento del dedo
AndroidDriver<?> driver = (AndroidDriver<?>) GenericService.getDriver();

Dimension size = driver.manage().window().getSize();
int width = size.width / 2;

// Cambiar: empezar desde abajo y mover hacia arriba
int startY = (int) (size.height * 0.70); // más abajo
int endY = (int) (size.height * 0.30); // más arriba
WebElement botonOK = scrollAndroid("text", "OK", 0);
MobileActionManager.waitPresence(FilesConstants.NEXT_BTN).click();

PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
Sequence swipe = new Sequence(finger, 1);
swipe.addAction(finger.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), width, startY));
swipe.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
swipe.addAction(finger.createPointerMove(Duration.ofMillis(300), PointerInput.Origin.viewport(), width, endY));
swipe.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(List.of(swipe));
}

MobileActionManager.waitPresence(FilesConstants.NEXT_BTN).click();
private static WebElement scrollAndroid(String locatorType, String locatorValue, int index) {
String locator = String.format(
"new UiScrollable(new UiSelector().scrollable(true).instance(0))" +
".setAsVerticalList()" +
".scrollForward()" +
".scrollIntoView(new UiSelector().%s(\"%s\").instance(%d))",
locatorType, locatorValue, index
);

return DriverManager.getDriverInstance().findElement(MobileBy.AndroidUIAutomator(locator));
}

}
}
5 changes: 1 addition & 4 deletions src/main/java/com/crowdar/tella/services/UnlockService.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public static void setPassword(String password) {
public static void enterPassword(String password) throws InterruptedException {
if (MobileActionManager.isAndroid()) {
MobileActionManager.setInput(LockUnlockConstants.PASSWORD_INPUT, password);
EventFiringWebDriver driver = DriverManager.getDriverInstance();
driver.getKeyboard().sendKeys(Keys.ENTER);
MobileActionManager.waitClickable(LockUnlockConstants.BTN_UNLOCK).click();
} else {
Thread.sleep(1000);
MobileActionManager.waitVisibility(LockUnlockConstantsIOS.PASSWORD_INPUT);
Expand Down Expand Up @@ -201,8 +200,6 @@ public static void reopenTheApp() throws InterruptedException {
driver.activateApp("org.hzontal.tella");
} else {
driver.activateApp("org.wearehorizontal.tella"); // Usa el package name de tu app para traerla de vuelta al frente


}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/crowdar/tella/steps/HomeSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ public void theUserOpensTheAppForTheFirstTime() {
public void seesThatTheFilesHaveBeenDeleted() {
System.out.println("");
}


}
18 changes: 18 additions & 0 deletions src/main/java/com/crowdar/tella/steps/SettingsSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,22 @@ public void theUserHasAlreadyConnectedToTheTellaWebServer() {
public void theUserIsNoLongerConnectedToTheTellaWebServer() {
HomeService.isNotConnection();
}

@And("the user closes and reopens the Tella app")
public void theUserClosesTheTellaApplicationFromTheCloseButton() throws InterruptedException {
SettingsService.goToHomeFromSecurityPage();
HomeService.isHomeLoaded();
HomeService.clicClosesBtnInHome();
Thread.sleep(2000);
GenericService.openAppTella();
}

@Then("the app displays the {string} screen to the user")
public void theAppDisplaysTheScreenToTheUser(String arg0) {
GenericService.openAppTella();
UnlockService.isViewLoaded();
UnlockService.setPassword(PropertyManager.getProperty("password"));
UnlockService.goTella();
HomeService.isHomeLoaded();
}
}
8 changes: 4 additions & 4 deletions src/test/resources/features/Audio/Audio.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: Audio
Background:
Given the user is in Tella home page

@Smoke @Automated #@ok
@Smoke @Automated #@TestAngi #paso en BS
Scenario Outline: Record an audio file
When the user press the Rec option
And the user press the microphone
Expand All @@ -15,7 +15,7 @@ Feature: Audio
| message_title |
| The audio recording was saved to your Tella files |

@Smoke @Automated #@ok
@Smoke @Automated #@TestAngi
Scenario Outline: Record an audio file in two parts
When the user press the Rec option
And the user press the microphone
Expand All @@ -28,7 +28,7 @@ Feature: Audio
| message_title |
| The audio recording was saved to your Tella files |

@Smoke @Automated
@Smoke @Automated #@TestAngi
Scenario Outline: Rename an audio file
When the user press the Rec option
And the user press the pencil icon
Expand All @@ -41,7 +41,7 @@ Feature: Audio
| recording_name |
| Audio1 |

@Smoke @Automated
@Smoke @Automated #@TestAngi
Scenario Outline: Rename an audio file during the recording
When the user press the Rec option
And the user press the microphone
Expand Down
43 changes: 23 additions & 20 deletions src/test/resources/features/Settings/Security.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Feature: Security
And taps "next" button
Then "Your lock has been changed" message is shown

@Smoke @SmokeManual @LockTimeout @LockFlow #@TestAngi
@Smoke @SmokeManual @LockTimeout @LockFlow @Automated @TestAngi
Scenario Outline: Security - Lock Timeout
Given the user sets the app lock timeout to <timeout>
When the user leaves the app, waits for the configured time <timeout> , and returns
Expand All @@ -43,11 +43,11 @@ Feature: Security
| timeout |
| Immediately |
| 1 minute |
| 5 minutes |
#| 5 minutes |
#| 30 minutes |
#| 1 hour |

@Smoke @LockTimeout @Automated #@TestAngi
@Smoke @LockTimeout @Automated @TestAngi
Scenario Outline: Security - Change Lock Timeout
When the user clicks the "Lock Timeout" option
And select timeout <timeout> option
Expand All @@ -62,7 +62,7 @@ Feature: Security
#| 30 minutes |
#| 1 hour |

@Smoke @LockTimeout @Automated #@TestAngi
@Smoke @LockOnDeviceScreenOff @Automated @TestAngi
Scenario Outline: Security - Lock on Device Screen Off
Given the user sets the app lock timeout to <timeout>
When the user locks the device screen, waits for the configured time <timeout>, and unlocks it
Expand All @@ -76,23 +76,25 @@ Feature: Security
#| 30 minutes |
#| 1 hour |

@Smoke @DeleteAfterFailedUnlock @SmokeManual
@Smoke @DeleteAfterFailedUnlock @SmokeManual @E2E #@TestAngi
Scenario Outline: Security - Delete after failed unlock
Given the user records an audio file
When the user clicks the "Delete after failed unlock" option
And select attempts <attempts> option
And taps "OK" button
And the sucessfull message <message> is displayed
And the user close the app
And the user closes and reopens the Tella app
And the user set incorrect <PIN> in <attempts>
Then sees that the files have been deleted
Then the app displays the "Get started" screen to the user
And that files were deleted

Examples:
| attempts | PIN | message |
| 5 attempts | 123450 | Your Tella data will be deleted after 5 failed unlock attempts |
#| 10 attempts | 123451 | Your Tella data will be deleted after 10 failed unlock attempts |
#| 20 attempts | 123450 | Your Tella data will be deleted after 20 failed unlock attempts |

@Smoke @DeleteAfterFailedUnlock @Automated
@Smoke @DeleteAfterFailedUnlock @Automated @LockFlow @TestAngi
Scenario Outline: Security - Delete after failed unlock
When the user clicks the "Delete after failed unlock" option
And select attempts <attempts> option
Expand All @@ -104,8 +106,8 @@ Feature: Security
| attempts | status | message |
| Off (do not delete data) | Off | |
| 5 attempts | On | Your Tella data will be deleted after 5 failed unlock attempts |
| 10 attempts | On | Your Tella data will be deleted after 10 failed unlock attempts |
| 20 attempts | On | Your Tella data will be deleted after 20 failed unlock attempts |
#| 10 attempts | On | Your Tella data will be deleted after 10 failed unlock attempts |
#| 20 attempts | On | Your Tella data will be deleted after 20 failed unlock attempts |

@Smoke @Camouflage @SmokeManual
Scenario Outline: Security - camouflage - change camuflaje method - change name and icon
Expand Down Expand Up @@ -141,7 +143,7 @@ Feature: Security
| Calculator_3 | Please wait. You will return to your device's home screen in a few seconds. |
| Calculator_4 | Please wait. You will return to your device's home screen in a few seconds. |

@Smoke @QuickDelete @SmokeManual #@TestAngi #Ok # Prueba E2E, de crear un archivo y eliminarlo
@Smoke @QuickDelete @SmokeManual @Automated #@TestAngi @E2E
Scenario: Security - Quick delete - Delete files
Given the user records an audio file
When toggle the switch on the "Quick delete" option
Expand All @@ -156,7 +158,7 @@ Feature: Security
Then that files were deleted


@Smoke @QuickDelete @SmokeManual @TestAngi @E2E #Ok # Prueba E2E, de eliminar conexion
@Smoke @QuickDelete @SmokeManual @Automated @E2E #@TestAngi
Scenario: Security - Quick delete - Delete connection to the server
Given The user has already connected to the Tella web server
When toggle the switch on the "Quick delete" option
Expand All @@ -169,14 +171,14 @@ Feature: Security
And set security code valid
Then The user is no longer connected to the Tella web server.

@Smoke @QuickDelete @SmokeManual #@TestAngi #Ok #Validamos que este el Slider para eliminar.
@Smoke @QuickDelete @SmokeManual @Automated @TestAngi
Scenario: Security - Quick delete - Verify slide Delete
When toggle the switch on the "Quick delete" option
And Go to the Tella homepage from Security Page
Then verify slide "DELETE" button is present


@Smoke @QuickDelete @SmokeManual #Ok #En la APP no esta el check para eliminar la APP
@Smoke @QuickDelete @SmokeManual #En la APP no esta el check para eliminar la APP
Scenario: Security - Quick delete - Delete Tella
When toggle the switch on the "Quick delete" option
And select check box “Delete Tella”
Expand All @@ -187,7 +189,7 @@ Feature: Security
And waits finish counter
Then uninstall message appears

#@Smoke @QuickDelete @Automated #@TestAngi #Ok
@Smoke @QuickDelete @HelpInfo @Automated @TestAngi
Scenario Outline: Security - Quick delete - Help info
When toggle the switch on the "Quick delete" option
And click on the help icon in <deleteOption>
Expand Down Expand Up @@ -262,8 +264,8 @@ Feature: Security
| timeout |
| Immediately |
| 1 minute |
| 5 minutes |
| 30 minutes |
#| 5 minutes |
#| 30 minutes |
#| 1 hour |


Expand Down Expand Up @@ -331,7 +333,7 @@ Feature: Security
| Calculator_3 | Please wait. You will return to your device's home screen in a few seconds. |
| Calculator_4 | Please wait. You will return to your device's home screen in a few seconds. |

@Smoke @QuickDelete @SmokeManual #RepetidoEscenarioEstaMasArriba
@Smoke @QuickDelete @SmokeManual #RepetidoEscenarioDeletefiles
Scenario Outline: Security - Quick delete - <quickDeleteCheck>
When taps switch in "Quick delete" option
And select check box "<quickDeleteCheck>"
Expand All @@ -350,7 +352,8 @@ Feature: Security
| Delete files |
| Delete draft and submitted forms |
| Delete server settings |
#RepetidoEscenarioEstaMasArriba

#RepetidoEscenarioEstaMasArribaDeleteTella
Scenario: Security - Quick delete - Delete Tella
When taps switch in "Quick delete" option
And select check box “Delete Tella”
Expand All @@ -362,7 +365,7 @@ Feature: Security
And view closed the Tella application
Then view uninstall message

#RepetidoEscenarioEstaMasArriba
#EscenaioRepetidoCon@HelpInfo
@Smoke @QuickDelete @ToBeAutomated @Bug
Scenario Outline: Security - Quick delete - help info
When taps switch in "Quick delete" option
Expand Down
Loading