From 961ed955635550912dd6e6602828f80aec88d6b7 Mon Sep 17 00:00:00 2001 From: Angelica Date: Thu, 24 Jul 2025 12:27:59 -0300 Subject: [PATCH 01/11] prueba de tags --- src/test/resources/features/Audio/Audio.feature | 8 ++++---- src/test/resources/features/Settings/Security.feature | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/resources/features/Audio/Audio.feature b/src/test/resources/features/Audio/Audio.feature index 7d2452e..b6a0cb1 100644 --- a/src/test/resources/features/Audio/Audio.feature +++ b/src/test/resources/features/Audio/Audio.feature @@ -4,7 +4,7 @@ Feature: Audio Background: Given the user is in Tella home page - @Smoke @Automated #@ok + @Smoke @Automated @TestAngi Scenario Outline: Record an audio file When the user press the Rec option And the user press the microphone @@ -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 @@ -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 @@ -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 diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index 06e91ef..4596463 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -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 @TestAngi Scenario Outline: Security - Lock Timeout Given the user sets the app lock timeout to When the user leaves the app, waits for the configured time , and returns @@ -43,7 +43,7 @@ Feature: Security | timeout | | Immediately | | 1 minute | - | 5 minutes | + #| 5 minutes | #| 30 minutes | #| 1 hour | @@ -156,7 +156,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual @TestAngi #Ok # Prueba E2E, de eliminar conexion + @Smoke @QuickDelete @SmokeManual #@TestAngi #Ok # Prueba E2E, de eliminar conexion 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 From 4efa5a8ac521fdc20bf4bb339b37bbe2fd6ecf9d Mon Sep 17 00:00:00 2001 From: Angelica Date: Thu, 24 Jul 2025 16:31:30 -0300 Subject: [PATCH 02/11] prueba --- src/test/resources/features/Audio/Audio.feature | 2 +- src/test/resources/features/Settings/Security.feature | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/resources/features/Audio/Audio.feature b/src/test/resources/features/Audio/Audio.feature index b6a0cb1..1630acd 100644 --- a/src/test/resources/features/Audio/Audio.feature +++ b/src/test/resources/features/Audio/Audio.feature @@ -4,7 +4,7 @@ Feature: Audio Background: Given the user is in Tella home page - @Smoke @Automated @TestAngi + @Smoke @Automated #@TestAngi Scenario Outline: Record an audio file When the user press the Rec option And the user press the microphone diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index 4596463..2464dee 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -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 #@TestAngi Scenario Outline: Security - Lock Timeout Given the user sets the app lock timeout to When the user leaves the app, waits for the configured time , and returns @@ -141,7 +141,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 @TestAngi #Ok # Prueba E2E, de crear un archivo y eliminarlo Scenario: Security - Quick delete - Delete files Given the user records an audio file When toggle the switch on the "Quick delete" option From dc6b8c58fd20fd137c81fa8caf74f0c928d5988f Mon Sep 17 00:00:00 2001 From: Angelica Date: Thu, 24 Jul 2025 17:31:00 -0300 Subject: [PATCH 03/11] tag E2E --- src/test/resources/features/Settings/Security.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index 06e91ef..842ed7d 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -156,7 +156,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual @TestAngi #Ok # Prueba E2E, de eliminar conexion + @Smoke @QuickDelete @SmokeManual @TestAngi @E2E #Ok # Prueba E2E, de eliminar conexion 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 From 0a4754d27e1e8b1171edd091efdb7a40ca1b7799 Mon Sep 17 00:00:00 2001 From: Angelica Date: Thu, 24 Jul 2025 17:31:50 -0300 Subject: [PATCH 04/11] tag E2E --- src/test/resources/features/Settings/Security.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index 842ed7d..f58e22a 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -156,7 +156,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual @TestAngi @E2E #Ok # Prueba E2E, de eliminar conexion + @Smoke @QuickDelete @SmokeManual @TestAngi @E2E #Ok # Prueba E2E,de eliminar conexion 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 From d46911cf20e18c9aa2d606fb2a9647622d51bdfa Mon Sep 17 00:00:00 2001 From: Angelica Date: Thu, 24 Jul 2025 17:33:53 -0300 Subject: [PATCH 05/11] tag E2E revisar --- src/test/resources/features/Settings/Security.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index f58e22a..db09003 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -156,7 +156,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual @TestAngi @E2E #Ok # Prueba E2E,de eliminar conexion + @Smoke @QuickDelete @SmokeManual @TestAngi @E2E #Ok # Prueba E2E,de eliminar conexion, revisar 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 From aeac5a85762a74347da18e970372e1514cf073ae Mon Sep 17 00:00:00 2001 From: Angelica Date: Thu, 24 Jul 2025 18:05:58 -0300 Subject: [PATCH 06/11] tag E2E revisar --- src/test/resources/features/Audio/Audio.feature | 2 +- src/test/resources/features/Settings/Security.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/resources/features/Audio/Audio.feature b/src/test/resources/features/Audio/Audio.feature index 1630acd..b6a0cb1 100644 --- a/src/test/resources/features/Audio/Audio.feature +++ b/src/test/resources/features/Audio/Audio.feature @@ -4,7 +4,7 @@ Feature: Audio Background: Given the user is in Tella home page - @Smoke @Automated #@TestAngi + @Smoke @Automated @TestAngi Scenario Outline: Record an audio file When the user press the Rec option And the user press the microphone diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index db09003..4e8a7fd 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -156,7 +156,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual @TestAngi @E2E #Ok # Prueba E2E,de eliminar conexion, revisar + @Smoke @QuickDelete @SmokeManual #@TestAngi @E2E #Ok # Prueba E2E,de eliminar conexion, revisar 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 From 8ecc8ad6d0b9d2afb10ff975b7246778d8f56d0d Mon Sep 17 00:00:00 2001 From: Angelica Date: Mon, 28 Jul 2025 10:55:58 -0300 Subject: [PATCH 07/11] ejecucion de @E2E --- src/test/resources/features/Audio/Audio.feature | 2 +- .../resources/features/Settings/Security.feature | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/resources/features/Audio/Audio.feature b/src/test/resources/features/Audio/Audio.feature index b6a0cb1..f68a441 100644 --- a/src/test/resources/features/Audio/Audio.feature +++ b/src/test/resources/features/Audio/Audio.feature @@ -4,7 +4,7 @@ Feature: Audio Background: Given the user is in Tella home page - @Smoke @Automated @TestAngi + @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 diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index 4e8a7fd..edb4ee7 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -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 When the user leaves the app, waits for the configured time , and returns @@ -43,7 +43,7 @@ Feature: Security | timeout | | Immediately | | 1 minute | - | 5 minutes | + #| 5 minutes | #| 30 minutes | #| 1 hour | @@ -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 When the user locks the device screen, waits for the configured time , and unlocks it @@ -141,7 +141,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 @E2E #@TestAngi Scenario: Security - Quick delete - Delete files Given the user records an audio file When toggle the switch on the "Quick delete" option @@ -156,7 +156,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual #@TestAngi @E2E #Ok # Prueba E2E,de eliminar conexion, revisar + @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 @@ -169,14 +169,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 #Validamos que este el Slider para eliminar. 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” @@ -187,7 +187,7 @@ Feature: Security And waits finish counter Then uninstall message appears - #@Smoke @QuickDelete @Automated #@TestAngi #Ok + @Smoke @QuickDelete @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 From 3579e7357a37adb1569906bdd4d4e3d4214b8c70 Mon Sep 17 00:00:00 2001 From: Angelica Date: Mon, 28 Jul 2025 12:20:26 -0300 Subject: [PATCH 08/11] ejecucion de @E2E --- .../tella/services/ServersService.java | 42 ++++++++++++------- .../features/Settings/Security.feature | 15 +++---- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/crowdar/tella/services/ServersService.java b/src/main/java/com/crowdar/tella/services/ServersService.java index 0182c49..bc090af 100644 --- a/src/main/java/com/crowdar/tella/services/ServersService.java +++ b/src/main/java/com/crowdar/tella/services/ServersService.java @@ -218,29 +218,41 @@ public static void googleDrive() { } - public static void clicNextBtn() { - //Como el boton esta abajo de la pantalla, tenemos q escroliar hasta el final + WebElement botonOK = scrollAndroid("text", "OK", 0); + //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(); + // AndroidDriver driver = (AndroidDriver) GenericService.getDriver(); - Dimension size = driver.manage().window().getSize(); - int width = size.width / 2; + //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 + //int startY = (int) (size.height * 0.70); // más abajo + //int endY = (int) (size.height * 0.30); // más arriba - 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)); + //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(); } -} \ No newline at end of file + 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)); + } + +} diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index edb4ee7..90644ed 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -141,7 +141,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 @Automated @E2E #@TestAngi + @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 @@ -156,7 +156,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual @Automated @E2E #@TestAngi + @Smoke @QuickDelete @SmokeManual @Automated @TestAngi @E2E 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 @@ -169,7 +169,7 @@ Feature: Security And set security code valid Then The user is no longer connected to the Tella web server. - @Smoke @QuickDelete @SmokeManual @Automated #@TestAngi #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 @@ -187,7 +187,7 @@ Feature: Security And waits finish counter Then uninstall message appears - @Smoke @QuickDelete @Automated #@TestAngi + @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 @@ -331,7 +331,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 - When taps switch in "Quick delete" option And select check box "" @@ -350,7 +350,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” @@ -362,7 +363,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 From afe8b7763e7e02e11ad9a82ee52edbb1ea6f1cf8 Mon Sep 17 00:00:00 2001 From: Angelica Date: Mon, 28 Jul 2025 15:06:53 -0300 Subject: [PATCH 09/11] ejecucion de @E2E --- src/test/resources/features/Settings/Security.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index 90644ed..d947f8f 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -141,7 +141,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 @Automated #@TestAngi @E2E + @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 From fbfc6a30cb709b3538e5dc94508ebc4c178b4e1e Mon Sep 17 00:00:00 2001 From: Angelica Date: Mon, 28 Jul 2025 16:34:02 -0300 Subject: [PATCH 10/11] prueba --- src/main/java/com/crowdar/tella/services/HomeService.java | 3 +++ src/test/resources/features/Settings/Security.feature | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/crowdar/tella/services/HomeService.java b/src/main/java/com/crowdar/tella/services/HomeService.java index 6bde7c0..151c1e3 100644 --- a/src/main/java/com/crowdar/tella/services/HomeService.java +++ b/src/main/java/com/crowdar/tella/services/HomeService.java @@ -7,6 +7,8 @@ import io.appium.java_client.android.AndroidDriver; +import org.openqa.selenium.Dimension; +import org.openqa.selenium.Point; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.PointerInput; import org.openqa.selenium.interactions.Sequence; @@ -16,6 +18,7 @@ import java.time.Duration; import java.util.Arrays; +import java.util.Collections; public class HomeService { diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index d947f8f..90644ed 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -141,7 +141,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 @Automated @TestAngi @E2E + @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 From e62e8296ed6caccc2434e93d8bd30dc3dc0f8ab8 Mon Sep 17 00:00:00 2001 From: Angelica Date: Tue, 29 Jul 2025 16:38:41 -0300 Subject: [PATCH 11/11] ejecucion para bs --- .../tella/constants/HomeConstants.java | 1 + .../tella/constants/LockUnlockConstants.java | 6 ++-- .../crowdar/tella/services/HomeService.java | 13 +++----- .../tella/services/ServersService.java | 19 ------------ .../crowdar/tella/services/UnlockService.java | 5 +--- .../com/crowdar/tella/steps/HomeSteps.java | 2 ++ .../crowdar/tella/steps/SettingsSteps.java | 18 +++++++++++ .../features/Settings/Security.feature | 30 ++++++++++--------- 8 files changed, 46 insertions(+), 48 deletions(-) diff --git a/src/main/java/com/crowdar/tella/constants/HomeConstants.java b/src/main/java/com/crowdar/tella/constants/HomeConstants.java index bbc1ea9..2ead9b6 100644 --- a/src/main/java/com/crowdar/tella/constants/HomeConstants.java +++ b/src/main/java/com/crowdar/tella/constants/HomeConstants.java @@ -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\"]"; } diff --git a/src/main/java/com/crowdar/tella/constants/LockUnlockConstants.java b/src/main/java/com/crowdar/tella/constants/LockUnlockConstants.java index ec83c5b..0b8cd5d 100644 --- a/src/main/java/com/crowdar/tella/constants/LockUnlockConstants.java +++ b/src/main/java/com/crowdar/tella/constants/LockUnlockConstants.java @@ -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"; @@ -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"; + } diff --git a/src/main/java/com/crowdar/tella/services/HomeService.java b/src/main/java/com/crowdar/tella/services/HomeService.java index 151c1e3..fb7c900 100644 --- a/src/main/java/com/crowdar/tella/services/HomeService.java +++ b/src/main/java/com/crowdar/tella/services/HomeService.java @@ -3,19 +3,11 @@ 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.Dimension; -import org.openqa.selenium.Point; 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; @@ -83,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(); @@ -97,4 +89,7 @@ public static void clicHomeButton() { MobileActionManager.waitClickable(HomeConstants.HOME_BUTTON).click(); } + public static void clicClosesBtnInHome() { + MobileActionManager.waitClickable(HomeConstants.BTN_CLOSES_APP).click(); + } } diff --git a/src/main/java/com/crowdar/tella/services/ServersService.java b/src/main/java/com/crowdar/tella/services/ServersService.java index bc090af..b86e8e4 100644 --- a/src/main/java/com/crowdar/tella/services/ServersService.java +++ b/src/main/java/com/crowdar/tella/services/ServersService.java @@ -220,25 +220,6 @@ public static void googleDrive() { public static void clicNextBtn() { WebElement botonOK = scrollAndroid("text", "OK", 0); - //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 - - //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(); } diff --git a/src/main/java/com/crowdar/tella/services/UnlockService.java b/src/main/java/com/crowdar/tella/services/UnlockService.java index d50df65..04af239 100644 --- a/src/main/java/com/crowdar/tella/services/UnlockService.java +++ b/src/main/java/com/crowdar/tella/services/UnlockService.java @@ -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); @@ -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 - - } } } diff --git a/src/main/java/com/crowdar/tella/steps/HomeSteps.java b/src/main/java/com/crowdar/tella/steps/HomeSteps.java index 874ab93..30df9e5 100644 --- a/src/main/java/com/crowdar/tella/steps/HomeSteps.java +++ b/src/main/java/com/crowdar/tella/steps/HomeSteps.java @@ -22,4 +22,6 @@ public void theUserOpensTheAppForTheFirstTime() { public void seesThatTheFilesHaveBeenDeleted() { System.out.println(""); } + + } diff --git a/src/main/java/com/crowdar/tella/steps/SettingsSteps.java b/src/main/java/com/crowdar/tella/steps/SettingsSteps.java index 66ac9cd..3709413 100644 --- a/src/main/java/com/crowdar/tella/steps/SettingsSteps.java +++ b/src/main/java/com/crowdar/tella/steps/SettingsSteps.java @@ -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(); + } } diff --git a/src/test/resources/features/Settings/Security.feature b/src/test/resources/features/Settings/Security.feature index 90644ed..e40e982 100644 --- a/src/test/resources/features/Settings/Security.feature +++ b/src/test/resources/features/Settings/Security.feature @@ -33,7 +33,7 @@ Feature: Security And taps "next" button Then "Your lock has been changed" message is shown - @Smoke @SmokeManual @LockTimeout @LockFlow @Automated #@TestAngi + @Smoke @SmokeManual @LockTimeout @LockFlow @Automated @TestAngi Scenario Outline: Security - Lock Timeout Given the user sets the app lock timeout to When the user leaves the app, waits for the configured time , and returns @@ -47,7 +47,7 @@ Feature: Security #| 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 option @@ -62,7 +62,7 @@ Feature: Security #| 30 minutes | #| 1 hour | - @Smoke @LockOnDeviceScreenOff @Automated #@TestAngi + @Smoke @LockOnDeviceScreenOff @Automated @TestAngi Scenario Outline: Security - Lock on Device Screen Off Given the user sets the app lock timeout to When the user locks the device screen, waits for the configured time , and unlocks it @@ -76,15 +76,17 @@ 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 option And taps "OK" button And the sucessfull message is displayed - And the user close the app + And the user closes and reopens the Tella app And the user set incorrect in - 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 | @@ -92,7 +94,7 @@ Feature: Security #| 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 option @@ -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 @@ -156,7 +158,7 @@ Feature: Security Then that files were deleted - @Smoke @QuickDelete @SmokeManual @Automated @TestAngi @E2E + @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 @@ -169,7 +171,7 @@ Feature: Security And set security code valid Then The user is no longer connected to the Tella web server. - @Smoke @QuickDelete @SmokeManual @Automated #@TestAngi + @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 @@ -187,7 +189,7 @@ Feature: Security And waits finish counter Then uninstall message appears - @Smoke @QuickDelete @HelpInfo @Automated #@TestAngi + @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 @@ -262,8 +264,8 @@ Feature: Security | timeout | | Immediately | | 1 minute | - | 5 minutes | - | 30 minutes | + #| 5 minutes | + #| 30 minutes | #| 1 hour |