From a424923cfc0fc0e331dec0baa9a43be6135d624c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= <crazyserver@gmail.com>
Date: Thu, 14 Dec 2023 11:33:13 +0100
Subject: [PATCH] MOBILE-3947 site: Use ionInput event on sitefinder

---
 src/addons/mod/forum/tests/behat/groups.feature            | 2 --
 src/addons/notifications/tests/behat/notifications.feature | 1 -
 src/core/features/login/pages/site/site.html               | 2 +-
 src/core/features/login/tests/behat/basic_usage.feature    | 7 +------
 src/core/features/login/tests/behat/signup.feature         | 1 -
 .../reportbuilder/tests/behat/reportbuilder.feature        | 2 --
 src/core/features/user/tests/behat/basic_usage.feature     | 1 -
 src/tests/behat/navigation_deeplinks.feature               | 1 -
 8 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/src/addons/mod/forum/tests/behat/groups.feature b/src/addons/mod/forum/tests/behat/groups.feature
index e1a38f9e4..bd02d7162 100755
--- a/src/addons/mod/forum/tests/behat/groups.feature
+++ b/src/addons/mod/forum/tests/behat/groups.feature
@@ -105,7 +105,6 @@ Feature: Test usage of forum activity with groups in app
     And I should find "Disc vis ALL" in the app
     But I should not find "Disc vis G2" in the app
 
-  @ionic7_failure
   Scenario: Student can only add discussions in his groups
     Given I entered the forum activity "Separate groups forum" on course "Course 1" as "student1" in the app
     When I press "Add discussion topic" in the app
@@ -164,7 +163,6 @@ Feature: Test usage of forum activity with groups in app
     And I press "All participants" in the app
     Then I should find "My happy subject" in the app
 
-  @ionic7_failure
   Scenario: Teacher can add discussion to any group
     Given I entered the forum activity "Separate groups forum" on course "Course 1" as "teacher1" in the app
     And I press "Separate groups" in the app
diff --git a/src/addons/notifications/tests/behat/notifications.feature b/src/addons/notifications/tests/behat/notifications.feature
index 267fbb938..a7ac5528d 100644
--- a/src/addons/notifications/tests/behat/notifications.feature
+++ b/src/addons/notifications/tests/behat/notifications.feature
@@ -39,7 +39,6 @@ Feature: Notifications
       | Test 29  | student2 | student1 | 1649766628  | 1649766602 |
       | Test 30  | student2 | student1 | 1649766629  | null       |
 
-  @ionic7_failure
   Scenario: Mobile navigation
     Given I enter the app
     And I log in as "student1"
diff --git a/src/core/features/login/pages/site/site.html b/src/core/features/login/pages/site/site.html
index 882901ad7..b6833401a 100644
--- a/src/core/features/login/pages/site/site.html
+++ b/src/core/features/login/pages/site/site.html
@@ -32,7 +32,7 @@
             <ng-container *ngIf="siteSelector !== 'url'">
                 <ion-item lines="inset">
                     <ion-input name="url" placeholder="{{ 'core.login.siteaddressplaceholder' | translate }}" formControlName="siteUrl"
-                        [core-auto-focus]="showKeyboard && !showScanQR" (ionChange)="searchSite($event, siteForm.value.siteUrl)"
+                        [core-auto-focus]="showKeyboard && !showScanQR" (ionInput)="searchSite($event, siteForm.value.siteUrl)"
                         labelPlacement="stacked" [label]="'core.login.siteaddress' | translate" [clearInput]="true" />
                 </ion-item>
 
diff --git a/src/core/features/login/tests/behat/basic_usage.feature b/src/core/features/login/tests/behat/basic_usage.feature
index bdc38c3ac..8a4bbe9b4 100755
--- a/src/core/features/login/tests/behat/basic_usage.feature
+++ b/src/core/features/login/tests/behat/basic_usage.feature
@@ -42,14 +42,12 @@ Feature: Test basic usage of login in app
     And the UI should match the snapshot
     But I should not find "Log in" in the app
 
-  @ionic7_failure
   Scenario: Add a non existing account
     When I launch the app
     And I set the field "Your site" to "wrongsiteaddress" in the app
     And I press "Connect to your site" in the app
     Then I should find "Can't connect to site" in the app
 
-  @ionic7_failure
   Scenario: Add a non existing account from accounts switcher
     When I enter the app
     And I log in as "student1"
@@ -78,7 +76,6 @@ Feature: Test basic usage of login in app
     Then I should find "Connect to Moodle" in the app
     But I should not find "Acceptance test site" in the app
 
-  @ionic7_failure
   Scenario: Require minium (previous) version of the app for a site
     # Log in with a previous required version
     Given the following config values are set as admin:
@@ -86,7 +83,6 @@ Feature: Test basic usage of login in app
     When I enter the app
     Then I should not find "App update required" in the app
 
-  @ionic7_failure
   Scenario: Require minium (future) version of the app for a site
     # Log in with a future required version
     Given the following config values are set as admin:
@@ -94,7 +90,6 @@ Feature: Test basic usage of login in app
     When I enter the app
     Then I should find "App update required" in the app
 
-  @ionic7_failure
   Scenario: Force password change
     Given I force a password change for user "student1"
     When I enter the app
@@ -144,7 +139,7 @@ Feature: Test basic usage of login in app
     When I press "Reconnect" in the app
     Then I should find "Acceptance test site" in the app
 
-  @ionic7_failure @lms_from4.1
+  @lms_from4.1
   Scenario: Forgot password
     Given the following config values are set as admin:
       | supportavailability | 2 |
diff --git a/src/core/features/login/tests/behat/signup.feature b/src/core/features/login/tests/behat/signup.feature
index 7ffb2cc3d..cf710ee13 100755
--- a/src/core/features/login/tests/behat/signup.feature
+++ b/src/core/features/login/tests/behat/signup.feature
@@ -8,7 +8,6 @@ Feature: Test signup in app
       | auth_instructions | These are the authentication instructions. |
       | passwordpolicy | 0 |
 
-  @ionic7_failure
   Scenario: View auth instructions even if signup is disabled
     Given the following config values are set as admin:
       | registerauth |  |
diff --git a/src/core/features/reportbuilder/tests/behat/reportbuilder.feature b/src/core/features/reportbuilder/tests/behat/reportbuilder.feature
index f42a8f91b..9c356811c 100644
--- a/src/core/features/reportbuilder/tests/behat/reportbuilder.feature
+++ b/src/core/features/reportbuilder/tests/behat/reportbuilder.feature
@@ -118,7 +118,6 @@ Feature: Report builder
       | username | firstname   | lastname | email              | city     |
       | student1 | Lionel      | Smith    | lionel@example.com | Bilbao   |
 
-  @ionic7_failure
   Scenario: Open report in mobile
     Given I enter the app
     And I log in as "student1"
@@ -132,7 +131,6 @@ Feature: Report builder
     And I should find "Lionel Smith" in the app
     But I should not find "My report 02" in the app
 
-  @ionic7_failure
   Scenario: Open report in tablet
     Given I enter the app
     And I change viewport size to "1200x640" in the app
diff --git a/src/core/features/user/tests/behat/basic_usage.feature b/src/core/features/user/tests/behat/basic_usage.feature
index d52d87488..3c7b1b048 100755
--- a/src/core/features/user/tests/behat/basic_usage.feature
+++ b/src/core/features/user/tests/behat/basic_usage.feature
@@ -6,7 +6,6 @@ Feature: Test basic usage of user features
       | username | firstname | lastname | timezone |
       | student1 | Student   | Student  | 99       |
 
-  @ionic7_failure
   Scenario: Complete missing fields
     Given the following "custom profile fields" exist:
       | datatype | shortname  | name           | required | param1 |
diff --git a/src/tests/behat/navigation_deeplinks.feature b/src/tests/behat/navigation_deeplinks.feature
index a74c7df31..bc0fe7966 100644
--- a/src/tests/behat/navigation_deeplinks.feature
+++ b/src/tests/behat/navigation_deeplinks.feature
@@ -23,7 +23,6 @@ Feature: It navigates properly using deep links.
       | forcelogout     | 1 | tool_mobile |
       | defaulthomepage | 0 |             |
 
-  @ionic7_failure
   Scenario: Receive a push notification
     Given I entered the app as "student2"
     When I log out in the app