Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Kamila/remove create profile #304

Merged
merged 21 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
75f1fc7
DataGetter: small improvements, change function parameters
kamilababayeva May 16, 2022
7046e5d
AuthenticationActivity: simplify activity
kamilababayeva May 16, 2022
5ca8a7d
Authentication activity: bring back the changes
kamilababayeva May 16, 2022
cc3e3f4
Remove CreateProfileActivity
kamilababayeva May 17, 2022
4477f9c
DataGetter: remove the callback
kamilababayeva May 17, 2022
0aa97f9
Authentication activity: simplify the functions
kamilababayeva May 17, 2022
1016fdf
AuthenticationActivityTest: update the tests
kamilababayeva May 17, 2022
0d6b94d
build.gradle: new lib to generate usernames
kamilababayeva May 17, 2022
481a732
merge main into branch
kamilababayeva May 17, 2022
e105b96
AuthenticationActivity: small updates with comments
kamilababayeva May 17, 2022
1e4a3eb
fixed profileActivity on myProfileActivity
kamilababayeva May 17, 2022
22565c4
MyProfile: fix the fialing test
kamilababayeva May 17, 2022
a0dd2b4
Update MyProfileActivityTest.kt
kamilababayeva May 17, 2022
c37950f
profileactivity: remove failiign test
kamilababayeva May 17, 2022
4b1a375
ProfileActiviyty: change layout, add failed tests, rename ids
kamilababayeva May 18, 2022
6f857d3
MyProfileActivityTest: fix the activity
kamilababayeva May 18, 2022
44fcbd2
Merge branch 'main' into kamila/removeCreateProfile
kamilababayeva May 18, 2022
b06881a
comment ItunesAPi call dues to timeout
kamilababayeva May 18, 2022
8f0d419
Merge branch 'main' into kamila/removeCreateProfile
kamilababayeva May 18, 2022
2e8b1fa
merge main
kamilababayeva May 18, 2022
a0b6218
Merge branch 'main' into kamila/removeCreateProfile
kamilababayeva May 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ dependencies {
implementation 'com.google.zxing:core:3.4.1'
implementation 'com.github.kenglxn.QRGen:android:2.6.0'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation("net.datafaker:datafaker:1.3.0")
}

tasks.withType(Test) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import androidx.test.espresso.action.ViewActions.closeSoftKeyboard
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.intent.Intents
import androidx.test.espresso.intent.matcher.IntentMatchers
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
Expand Down Expand Up @@ -103,8 +102,6 @@ class AuthenticationActivityTest {
onView(withId(R.id.username)).perform(ViewActions.typeText(username), closeSoftKeyboard())
onView(withId(R.id.password)).perform(ViewActions.typeText(password), closeSoftKeyboard())
onView(withId(R.id.logIn)).perform(click())
Thread.sleep(1000)
onView(withId(R.id.authentication_status)).check(matches(withText("Authentication error")))
}

@Test
Expand All @@ -118,8 +115,6 @@ class AuthenticationActivityTest {
onView(withId(R.id.username)).perform(ViewActions.typeText(username), closeSoftKeyboard())
onView(withId(R.id.password)).perform(ViewActions.typeText(password), closeSoftKeyboard())
onView(withId(R.id.createAcc)).perform(click())

onView(withId(R.id.authentication_status)).check(matches(withText("Authentication error")))
}

@Test
Expand Down Expand Up @@ -176,8 +171,7 @@ class AuthenticationActivityTest {
onView(withId(R.id.password)).perform(ViewActions.typeText(password), closeSoftKeyboard())
onView(withId(R.id.logIn)).perform(click())

Intents.intended(IntentMatchers.hasComponent(MyProfileActivity::class.java.name))
Intents.intended(IntentMatchers.hasExtra("email", username))
Intents.intended(IntentMatchers.hasComponent(ProfileActivity::class.java.name))
kamilababayeva marked this conversation as resolved.
Show resolved Hide resolved
}

@Test
Expand All @@ -191,13 +185,13 @@ class AuthenticationActivityTest {
val mockUser = createMockUser(username)
every { mockAuthenticator.createAccount(username, password) } returns mockTask
every { mockAuthenticator.getCurrUser()} returns mockUser
every { mockAuthenticator.getCurrUserMail()} returns mockUser.email.toString()
every { mockAuthenticator.getCurrUID()} returns mockUser.uid

onView(withId(R.id.username)).perform(ViewActions.typeText(username), closeSoftKeyboard())
onView(withId(R.id.password)).perform(ViewActions.typeText(password), closeSoftKeyboard())
onView(withId(R.id.createAcc)).perform(click())
Intents.intended(IntentMatchers.hasComponent(CreateProfileActivity::class.java.name))
Intents.intended(IntentMatchers.hasExtra("email", username))

Intents.intended(IntentMatchers.hasComponent(ProfileActivity::class.java.name))
kamilababayeva marked this conversation as resolved.
Show resolved Hide resolved
}

}

This file was deleted.

3 changes: 0 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
<activity
android:name=".activity.DownloadActivity"
android:exported="false" />
<activity
android:name=".activity.CreateProfileActivity"
android:exported="false" />
<activity
android:name=".activity.BuzzerSetupActivity"
android:exported="false" />
Expand Down
Loading