Skip to content
Snippets Groups Projects
Commit d856bd27 authored by Pavan Koushik Nellore's avatar Pavan Koushik Nellore Committed by Adrien Béraud
Browse files

Revert "tests: fix UI tests"

This reverts commit da9f52a4.

Reason for revert: Fix the Keyboard padding issue in Android 15 in the activity instead of handling it in tests.

Change-Id: I9151d62695f50871b947181896d8a9dd816eee58
parent d04bd272
No related branches found
No related tags found
No related merge requests found
...@@ -660,11 +660,7 @@ class AccountSettings { ...@@ -660,11 +660,7 @@ class AccountSettings {
onView(withId(R.id.existing_password)).perform(typeText("123456"), closeSoftKeyboard()) onView(withId(R.id.existing_password)).perform(typeText("123456"), closeSoftKeyboard())
onView(withId(R.id.link_button)).perform(click()) onView(withId(R.id.link_button)).perform(click())
try {
AccountCreation.skipBiometrics() AccountCreation.skipBiometrics()
} catch (e: Exception) {
Log.d(TAG, "Biometrics dialog not shown, skipping...")
}
// Check that we are in the home activity. // Check that we are in the home activity.
onView(withId(R.id.search_bar)).check(matches(isDisplayed())) onView(withId(R.id.search_bar)).check(matches(isDisplayed()))
......
...@@ -114,7 +114,7 @@ class AccountCreation { ...@@ -114,7 +114,7 @@ class AccountCreation {
fun accountCreation_SpecifyPasswordOnly() { fun accountCreation_SpecifyPasswordOnly() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click()) onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click())
...@@ -162,7 +162,7 @@ class AccountCreation { ...@@ -162,7 +162,7 @@ class AccountCreation {
fun accountCreation_SpecifyProfileName() { fun accountCreation_SpecifyProfileName() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click()) onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click())
...@@ -170,11 +170,13 @@ class AccountCreation { ...@@ -170,11 +170,13 @@ class AccountCreation {
.perform(replaceText("Bonjour"), closeSoftKeyboard()) .perform(replaceText("Bonjour"), closeSoftKeyboard())
onView(allOf(withId(R.id.next_create_account), isDisplayed())).perform(click()) onView(allOf(withId(R.id.next_create_account), isDisplayed())).perform(click())
// Check that we are in the home activity. // Check that we are in the home activity.
waitForView(withId(R.id.search_bar)).perform(waitUntil(isDisplayed())) waitForView(withId(R.id.search_bar)).perform(waitUntil(isDisplayed()))
Thread.sleep(1000)
// Go to account settings. Click on search bar menu. // Go to account settings. Click on search bar menu.
onView(withId(R.id.menu_overflow)).perform(click()) onView(withId(R.id.menu_overflow)).perform(click())
// Click on account settings. Don't know why but doesn't work to select by ID. // Click on account settings. Don't know why but doesn't work to select by ID.
onView(allOf(withText(R.string.menu_item_account_settings), isDisplayed())).perform(click()) onView(allOf(withText(R.string.menu_item_account_settings), isDisplayed())).perform(click())
...@@ -190,7 +192,7 @@ class AccountCreation { ...@@ -190,7 +192,7 @@ class AccountCreation {
fun accountCreation_SpecifyProfilePictureViaCamera() { fun accountCreation_SpecifyProfilePictureViaCamera() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click()) onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click())
...@@ -231,7 +233,6 @@ class AccountCreation { ...@@ -231,7 +233,6 @@ class AccountCreation {
// Check that we are in the home activity. // Check that we are in the home activity.
waitForView(withId(R.id.search_bar)).perform(waitUntil(isDisplayed())) waitForView(withId(R.id.search_bar)).perform(waitUntil(isDisplayed()))
Thread.sleep(1000)
// Go to account settings. Click on search bar menu. // Go to account settings. Click on search bar menu.
onView(withId(R.id.menu_overflow)).perform(click()) onView(withId(R.id.menu_overflow)).perform(click())
...@@ -249,7 +250,7 @@ class AccountCreation { ...@@ -249,7 +250,7 @@ class AccountCreation {
fun accountCreation_SpecifyProfilePictureViaGallery() { fun accountCreation_SpecifyProfilePictureViaGallery() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click()) onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click())
...@@ -278,7 +279,6 @@ class AccountCreation { ...@@ -278,7 +279,6 @@ class AccountCreation {
// Check that we are in the home activity. // Check that we are in the home activity.
waitForView(withId(R.id.search_bar)).perform(waitUntil(isDisplayed())) waitForView(withId(R.id.search_bar)).perform(waitUntil(isDisplayed()))
Thread.sleep(1000)
// Go to account settings. Click on search bar menu. // Go to account settings. Click on search bar menu.
onView(withId(R.id.menu_overflow)).perform(click()) onView(withId(R.id.menu_overflow)).perform(click())
...@@ -296,7 +296,7 @@ class AccountCreation { ...@@ -296,7 +296,7 @@ class AccountCreation {
fun accountCreation_SpecifyProfilePicture_CanCancel(){ fun accountCreation_SpecifyProfilePicture_CanCancel(){
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click()) onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click())
...@@ -390,7 +390,7 @@ class AccountCreation { ...@@ -390,7 +390,7 @@ class AccountCreation {
fun passwordSelection_EnableSection() { fun passwordSelection_EnableSection() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click()) onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click())
...@@ -408,7 +408,7 @@ class AccountCreation { ...@@ -408,7 +408,7 @@ class AccountCreation {
fun passwordSelection_LessThan6Characters_InvalidPassword() { fun passwordSelection_LessThan6Characters_InvalidPassword() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click()) onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click())
...@@ -431,7 +431,7 @@ class AccountCreation { ...@@ -431,7 +431,7 @@ class AccountCreation {
fun passwordSelection_WrongRecopy() { fun passwordSelection_WrongRecopy() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click()) onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click())
...@@ -456,7 +456,7 @@ class AccountCreation { ...@@ -456,7 +456,7 @@ class AccountCreation {
fun passwordSelection_ValidPassword() { fun passwordSelection_ValidPassword() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click()) onView(allOf(withId(R.id.ring_password_switch), isDisplayed())).perform(click())
...@@ -473,7 +473,7 @@ class AccountCreation { ...@@ -473,7 +473,7 @@ class AccountCreation {
private fun createDefaultAccount() { private fun createDefaultAccount() {
onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click()) onView(withId(R.id.ring_create_btn)).perform(scrollTo(), click())
performClickWithKeyboardClosed(R.id.skip) onView(allOf(withId(R.id.skip), isDisplayed())).perform(click())
onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click()) onView(allOf(withId(R.id.create_account_password), isDisplayed())).perform(click())
...@@ -516,12 +516,6 @@ class AccountCreation { ...@@ -516,12 +516,6 @@ class AccountCreation {
Log.d(TAG, "Account created: $username") Log.d(TAG, "Account created: $username")
} }
private fun performClickWithKeyboardClosed(viewId: Int) {
onView(isRoot()).perform(closeSoftKeyboard())
onView(withId(viewId)).perform(waitUntil(isDisplayed()), click())
}
companion object { companion object {
private val TAG = AccountCreation::class.java.simpleName private val TAG = AccountCreation::class.java.simpleName
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment