diff --git a/UITests/FirebaseUISample.xcodeproj/project.pbxproj b/UITests/FirebaseUISample.xcodeproj/project.pbxproj index 5c7826f4dcc..84869697ae2 100644 --- a/UITests/FirebaseUISample.xcodeproj/project.pbxproj +++ b/UITests/FirebaseUISample.xcodeproj/project.pbxproj @@ -7,8 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 299AC6F5D5E37D05D2D7040A /* Pods_FirebaseUISample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70945DA605F03FD5784E8035 /* Pods_FirebaseUISample.framework */; }; - 68A64A1B95792CC2A39C7FFC /* Pods_FirebaseUISampleUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F4E39B9DEB60EE1A2C0EE5 /* Pods_FirebaseUISampleUITests.framework */; }; 8D69E6B621DEC97E00CFA49B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D69E6B421DEC97E00CFA49B /* Main.storyboard */; }; 8D69E6B821DEC97F00CFA49B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D69E6B721DEC97F00CFA49B /* Assets.xcassets */; }; 8D69E6BB21DEC97F00CFA49B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D69E6B921DEC97F00CFA49B /* LaunchScreen.storyboard */; }; @@ -40,9 +38,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 34F4E39B9DEB60EE1A2C0EE5 /* Pods_FirebaseUISampleUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseUISampleUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 56C72EBB3DCA973EB4ADE941 /* Pods-FirebaseUISampleUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISampleUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISampleUITests/Pods-FirebaseUISampleUITests.release.xcconfig"; sourceTree = ""; }; - 70945DA605F03FD5784E8035 /* Pods_FirebaseUISample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseUISample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8D69E6AB21DEC97E00CFA49B /* FirebaseUISample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FirebaseUISample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8D69E6B521DEC97E00CFA49B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 8D69E6B721DEC97F00CFA49B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -145,9 +140,6 @@ 8D69E73B21DECA7000CFA49B /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = ""; }; 8D69E73C21DECA7000CFA49B /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Localizable.strings; sourceTree = ""; }; 8D69E73D21DECA7000CFA49B /* en-IN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-IN"; path = "en-IN.lproj/Localizable.strings"; sourceTree = ""; }; - B4F18AEE29E87F337C1385BB /* Pods-FirebaseUISampleUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISampleUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISampleUITests/Pods-FirebaseUISampleUITests.debug.xcconfig"; sourceTree = ""; }; - BB73DBADE04C5998FCFD7CF5 /* Pods-FirebaseUISample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISample.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample.release.xcconfig"; sourceTree = ""; }; - C7C0896071DA1A357BCE9D70 /* Pods-FirebaseUISample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -155,7 +147,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 299AC6F5D5E37D05D2D7040A /* Pods_FirebaseUISample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -170,33 +161,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 68A64A1B95792CC2A39C7FFC /* Pods_FirebaseUISampleUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0B66B725F3F91007A7818EB8 /* Pods */ = { - isa = PBXGroup; - children = ( - C7C0896071DA1A357BCE9D70 /* Pods-FirebaseUISample.debug.xcconfig */, - BB73DBADE04C5998FCFD7CF5 /* Pods-FirebaseUISample.release.xcconfig */, - B4F18AEE29E87F337C1385BB /* Pods-FirebaseUISampleUITests.debug.xcconfig */, - 56C72EBB3DCA973EB4ADE941 /* Pods-FirebaseUISampleUITests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 8D36545EB6479C45B0B9C535 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 70945DA605F03FD5784E8035 /* Pods_FirebaseUISample.framework */, - 34F4E39B9DEB60EE1A2C0EE5 /* Pods_FirebaseUISampleUITests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 8D69E6A221DEC97E00CFA49B = { isa = PBXGroup; children = ( @@ -204,8 +174,6 @@ 8D69E6C621DEC98000CFA49B /* FirebaseUISampleTests */, 8D69E6D121DEC98000CFA49B /* FirebaseUISampleUITests */, 8D69E6AC21DEC97E00CFA49B /* Products */, - 0B66B725F3F91007A7818EB8 /* Pods */, - 8D36545EB6479C45B0B9C535 /* Frameworks */, ); sourceTree = ""; }; @@ -271,12 +239,9 @@ isa = PBXNativeTarget; buildConfigurationList = 8D69E6D721DEC98000CFA49B /* Build configuration list for PBXNativeTarget "FirebaseUISample" */; buildPhases = ( - 092F06231E157F830A2D3C66 /* [CP] Check Pods Manifest.lock */, 8D69E6A721DEC97E00CFA49B /* Sources */, 8D69E6A821DEC97E00CFA49B /* Frameworks */, 8D69E6A921DEC97E00CFA49B /* Resources */, - AF0DE935EA9C73CD8A32BE38 /* [CP] Embed Pods Frameworks */, - B2F32F94A8B497C74C7F7C7E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -309,7 +274,6 @@ isa = PBXNativeTarget; buildConfigurationList = 8D69E6DD21DEC98000CFA49B /* Build configuration list for PBXNativeTarget "FirebaseUISampleUITests" */; buildPhases = ( - 07E1DC16FC3541EBA6886105 /* [CP] Check Pods Manifest.lock */, 8D69E6CA21DEC98000CFA49B /* Sources */, 8D69E6CB21DEC98000CFA49B /* Frameworks */, 8D69E6CC21DEC98000CFA49B /* Resources */, @@ -479,129 +443,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 07E1DC16FC3541EBA6886105 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-FirebaseUISampleUITests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 092F06231E157F830A2D3C66 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-FirebaseUISample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - AF0DE935EA9C73CD8A32BE38 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Bolts/Bolts.framework", - "${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework", - "${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework", - "${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework", - "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework", - "${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework", - "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", - "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", - "${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework", - "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", - "${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework", - "${PODS_ROOT}/TwitterKit/iOS/TwitterKit.framework", - "${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework", - "${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework", - "${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework", - "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bolts.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwitterCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwitterKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - B2F32F94A8B497C74C7F7C7E /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/gRPCCertificates-Firestore.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseAnonymousAuthUI.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseAuthUI.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseEmailAuthUI.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseFacebookAuthUI.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseGoogleAuthUI.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebasePhoneAuthUI.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseTwitterAuthUI.bundle", - "${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle", - "${PODS_ROOT}/TwitterKit/iOS/TwitterKit.framework/TwitterKitResources.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Firestore.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseAnonymousAuthUI.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseAuthUI.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseEmailAuthUI.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseFacebookAuthUI.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseGoogleAuthUI.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebasePhoneAuthUI.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseTwitterAuthUI.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TwitterKitResources.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 8D69E6A721DEC97E00CFA49B /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -869,7 +710,6 @@ }; 8D69E6D821DEC98000CFA49B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C7C0896071DA1A357BCE9D70 /* Pods-FirebaseUISample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -886,7 +726,6 @@ }; 8D69E6D921DEC98000CFA49B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BB73DBADE04C5998FCFD7CF5 /* Pods-FirebaseUISample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -939,7 +778,6 @@ }; 8D69E6DE21DEC98000CFA49B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B4F18AEE29E87F337C1385BB /* Pods-FirebaseUISampleUITests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = FirebaseUISampleUITests/Info.plist; @@ -1037,7 +875,6 @@ }; 8D69E6DF21DEC98000CFA49B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 56C72EBB3DCA973EB4ADE941 /* Pods-FirebaseUISampleUITests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = FirebaseUISampleUITests/Info.plist; diff --git a/UITests/FirebaseUISample/FUIViewController.m b/UITests/FirebaseUISample/FUIViewController.m index 1dbe1dde468..32f71eecf2b 100644 --- a/UITests/FirebaseUISample/FUIViewController.m +++ b/UITests/FirebaseUISample/FUIViewController.m @@ -81,14 +81,19 @@ - (IBAction)onAuthorization:(id)sender { [self prepareStubs]; + NSString *firstProviderID = _authProviders.firstObject.providerID; BOOL shouldSkipPhoneAuthPicker = _authProviders.count == 1 && - [_authProviders.firstObject.providerID isEqualToString:FIRPhoneAuthProviderID]; - if (shouldSkipPhoneAuthPicker) { - FUIPhoneAuth *provider = _authProviders.firstObject; - [provider signInWithPresentingViewController:self phoneNumber:nil]; - } else { + ([firstProviderID isEqualToString:FIRPhoneAuthProviderID] || + [firstProviderID isEqualToString:FIREmailAuthProviderID]); + if (!shouldSkipPhoneAuthPicker) { UIViewController *controller = [self.authUIMock authViewController]; [self presentViewController:controller animated:YES completion:nil]; + } else if ([firstProviderID isEqualToString:FIRPhoneAuthProviderID]) { + FUIPhoneAuth *provider = _authProviders.firstObject; + [provider signInWithPresentingViewController:self phoneNumber:nil]; + } else if ([firstProviderID isEqualToString:FIREmailAuthProviderID]) { + FUIEmailAuth *provider = _authProviders.firstObject; + [provider signInWithPresentingViewController:self email:nil]; } } @@ -248,9 +253,9 @@ - (void)prepareStubsForSimulationNewUser { }); - OCMStub([self.authMock createUserAndRetrieveDataWithEmail:OCMOCK_ANY - password:OCMOCK_ANY - completion:OCMOCK_ANY]). + OCMStub([self.authMock createUserWithEmail:OCMOCK_ANY + password:OCMOCK_ANY + completion:OCMOCK_ANY]). andDo(^(NSInvocation *invocation) { FIRAuthDataResultCallback mockedCallback; [invocation getArgument:&mockedCallback atIndex:4]; @@ -293,6 +298,9 @@ - (void)populateListOfIDPs { for (NSIndexPath *indexPath in selectedRows) { if (indexPath.section == kSectionsProviders) { switch (indexPath.row) { + case kIDPEmail: + [_authProviders addObject:[[FUIEmailAuth alloc] init]]; + break; case kIDPGoogle: [_authProviders addObject:[[FUIGoogleAuth alloc] init]]; break; @@ -493,7 +501,7 @@ - (void)mockSignInWithProvider:(NSString *)providerId user:(id)mockUser { OCMStub([mockProviderUI signOut]); OCMStub([mockProviderUI providerID]).andReturn(providerId); - OCMStub([mockUser reauthenticateWithCredential:OCMOCK_ANY completion:OCMOCK_ANY]). + OCMStub([mockUser reauthenticateAndRetrieveDataWithCredential:OCMOCK_ANY completion:OCMOCK_ANY]). andDo(^(NSInvocation *invocation) { FIRUserProfileChangeCallback mockedCallBack; [invocation getArgument:&mockedCallBack atIndex:3]; diff --git a/UITests/FirebaseUISampleUITests/FirebaseUISampleUITests.m b/UITests/FirebaseUISampleUITests/FirebaseUISampleUITests.m index e541dc70aab..997b18aae8f 100644 --- a/UITests/FirebaseUISampleUITests/FirebaseUISampleUITests.m +++ b/UITests/FirebaseUISampleUITests/FirebaseUISampleUITests.m @@ -59,7 +59,7 @@ - (void)testSuccessSignIn { [self.app.toolbars.buttons[@"Sign In"] tap]; [tablesQuery.cells[@"EmailCellAccessibilityID"].textFields[@"Enter your email"] tap]; [[tablesQuery.cells[@"EmailCellAccessibilityID"] childrenMatchingType:XCUIElementTypeTextField].element typeText:@"test@test.com"]; - [self.app.navigationBars[@"Sign in with email"].buttons[@"NextButtonAccessibilityID"] tap]; + [self.app.navigationBars[@"Enter your email"].buttons[@"NextButtonAccessibilityID"] tap]; [tablesQuery.secureTextFields[@"Enter your password"] tap]; [[[tablesQuery.cells containingType:XCUIElementTypeStaticText identifier:@"Password"] childrenMatchingType:XCUIElementTypeSecureTextField].element typeText:@"test"]; [self.app.navigationBars[@"Sign in"].buttons[@"Sign in"] tap]; @@ -73,7 +73,7 @@ - (void)testSuccessSignUp { [tablesQuery.cells[@"EmailCellAccessibilityID"].textFields[@"Enter your email"] tap]; [[tablesQuery.cells[@"EmailCellAccessibilityID"] childrenMatchingType:XCUIElementTypeTextField].element typeText:@"test2@test2.com"]; - [self.app.navigationBars[@"Sign in with email"].buttons[@"NextButtonAccessibilityID"] tap]; + [self.app.navigationBars[@"Enter your email"].buttons[@"NextButtonAccessibilityID"] tap]; [tablesQuery.cells[@"NameSignUpCellAccessibilityID"].textFields[@"First & last name"] tap]; [[tablesQuery.cells[@"NameSignUpCellAccessibilityID"] childrenMatchingType:XCUIElementTypeTextField].element typeText:@"test2"]; @@ -90,12 +90,12 @@ - (void)testSeveralIDPs { [tablesQuery.cells.staticTexts[@"Google"] tap]; [tablesQuery.cells.staticTexts[@"Simulate Existing User"] tap]; [self.app.toolbars.buttons[@"Sign In"] tap]; - [self.app.buttons[@"EmailButtonAccessibilityID"] tap]; + [self.app.buttons[@"Sign in with email"] tap]; [tablesQuery.cells[@"EmailCellAccessibilityID"].textFields[@"Enter your email"] tap]; [[tablesQuery.cells[@"EmailCellAccessibilityID"] childrenMatchingType:XCUIElementTypeTextField].element typeText:@"test@test.com"]; - XCUIElement *signInWithEmailNavigationBar = self.app.navigationBars[@"Sign in with email"]; - [signInWithEmailNavigationBar.buttons[@"NextButtonAccessibilityID"] tap]; + XCUIElement *signInWithEmailNavigationBar = self.app.navigationBars[@"Enter your email"]; + [signInWithEmailNavigationBar.buttons[@"Next"] tap]; [[[[self.app.navigationBars[@"Sign in"] childrenMatchingType:XCUIElementTypeButton] matchingIdentifier:@"Back"] elementBoundByIndex:0] tap]; [[[[signInWithEmailNavigationBar childrenMatchingType:XCUIElementTypeButton] matchingIdentifier:@"Back"] elementBoundByIndex:0] tap]; [self.app.navigationBars[@"Welcome"].buttons[@"Cancel"] tap]; @@ -114,7 +114,7 @@ - (void)testEmailRecovery { [enterYourEmailTextField tap]; [[tablesQuery.cells[@"EmailCellAccessibilityID"] childrenMatchingType:XCUIElementTypeTextField].element typeText:@"test@test.com"]; - XCUIElement *signInWithEmailNavigationBar = self.app.navigationBars[@"Sign in with email"]; + XCUIElement *signInWithEmailNavigationBar = self.app.navigationBars[@"Enter your email"]; [signInWithEmailNavigationBar.buttons[@"NextButtonAccessibilityID"] tap]; [tablesQuery.secureTextFields[@"Enter your password"] tap]; [tablesQuery.buttons[@"Trouble signing in?"] tap]; @@ -148,7 +148,7 @@ - (void)testPhoneAuthCountryPicker { [self.app.tables.cells.staticTexts[@"\U0001F1FA\U0001F1F8 United States"] forceTap]; - [self.app.navigationBars[@"Enter phone number"].buttons[@"Cancel"] tap]; + [self.app.navigationBars[@"Enter phone number"].buttons[@"Back"] tap]; [self.app.navigationBars[@"Welcome"].buttons[@"Cancel"] tap]; [self.app.alerts[@"Error"].buttons[@"Close"] tap]; @@ -165,7 +165,7 @@ - (void)testPhoneAuthFlow { [tablesQuery.cells[@"PhoneNumberCellAccessibilityID"].textFields[@"Phone number"] tap]; [[tablesQuery.cells[@"PhoneNumberCellAccessibilityID"] childrenMatchingType:XCUIElementTypeTextField].element typeText:@"123456789"]; - [self.app.navigationBars[@"Enter phone number"].buttons[@"NextButtonAccessibilityID"] tap]; + [self.app.navigationBars[@"Enter phone number"].buttons[@"Verify"] tap]; [self.app.keyboards.keys[@"1"] tap]; [self.app.keyboards.keys[@"2"] tap]; diff --git a/UITests/Podfile.lock b/UITests/Podfile.lock index e391ad841fd..2dc67975490 100644 --- a/UITests/Podfile.lock +++ b/UITests/Podfile.lock @@ -11,9 +11,9 @@ PODS: - BoringSSL/Implementation (10.0.6): - BoringSSL/Interface (= 10.0.6) - BoringSSL/Interface (10.0.6) - - FBSDKCoreKit (4.39.0): + - FBSDKCoreKit (4.39.1): - Bolts (~> 1.9) - - FBSDKLoginKit (4.39.0): + - FBSDKLoginKit (4.39.1): - FBSDKCoreKit - Firebase/Auth (5.15.0): - Firebase/CoreOnly @@ -107,8 +107,8 @@ PODS: - GoogleToolboxForMac/Defines (= 2.2.0) - "GoogleToolboxForMac/NSString+URLArguments (= 2.2.0)" - "GoogleToolboxForMac/NSString+URLArguments (2.2.0)" - - GoogleUtilities/Environment (5.3.6) - - GoogleUtilities/Logger (5.3.6): + - GoogleUtilities/Environment (5.3.7) + - GoogleUtilities/Logger (5.3.7): - GoogleUtilities/Environment - "gRPC-C++ (0.0.5)": - "gRPC-C++/Implementation (= 0.0.5)" @@ -180,8 +180,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Bolts: ac6567323eac61e203f6a9763667d0f711be34c8 BoringSSL: e10f92a27043805c01071fe815a5cd98ae8212e7 - FBSDKCoreKit: 1e3981faefab8c88edfaa9eecd94aab02d99a9bc - FBSDKLoginKit: 30ba5039a2c53d65a75103889bc2deebdacd5a1f + FBSDKCoreKit: f442aa96179cc9b382bb4abeb7e340a47cca8f91 + FBSDKLoginKit: c3079d9a4db27c492287b1eed7a4272b28cf8a59 Firebase: 8bb9268bff82374f2cbaaabb143e725743c316ae FirebaseAuth: 02e969ff430e156d99d4cb842d77b806b71ad7bb FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc @@ -192,7 +192,7 @@ SPEC CHECKSUMS: FirebaseUI: 810a4d85e15dfed08bfc6fc01358f2c64a8b341c GoogleSignIn: 7ff245e1a7b26d379099d3243a562f5747e23d39 GoogleToolboxForMac: ff31605b7d66400dcec09bed5861689aebadda4d - GoogleUtilities: 95996bea7c7d9b8fb811b7507669a4a8762f80c7 + GoogleUtilities: 111a012f4c3a29c9e7c954c082fafd6ee3c999c0 "gRPC-C++": 19eec1ffd34de29453f5fab5b4697ad0f240ad51 gRPC-Core: f4836515817c0eb479aeeb9cc27c91c4ba62a9f6 GTMSessionFetcher: 32aeca0aa144acea523e1c8e053089dec2cb98ca diff --git a/test.sh b/test.sh index 4fbacf2245c..393e07f53b7 100755 --- a/test.sh +++ b/test.sh @@ -5,19 +5,19 @@ set -eo pipefail EXIT_STATUS=0 folders=( "AnonymousAuth" "Auth" "Database" "EmailAuth" "FacebookAuth" \ - "Firestore" "GoogleAuth" "PhoneAuth" "Storage" "TwitterAuth") + "Firestore" "GoogleAuth" "PhoneAuth" "Storage" "TwitterAuth" "UITests" ) schemes=( "FirebaseAnonymousAuthUI" "FirebaseAuthUI" "FirebaseDatabaseUI" \ "FirebaseEmailAuthUI" "FirebaseFacebookAuthUI" "FirebaseFirestoreUI" \ "FirebaseGoogleAuthUI" "FirebasePhoneAuthUI" "FirebaseStorageUI" \ - "FirebaseTwitterAuthUI") + "FirebaseTwitterAuthUI" "FirebaseUISample") pod repo update; for ((i=0; i<${#folders[*]}; i++)); do cd ${folders[i]}; - pod install; + pod install >/dev/null; (xcodebuild \ -workspace ${schemes[i]}.xcworkspace \ -scheme ${schemes[i]} \ @@ -27,6 +27,6 @@ do test \ ONLY_ACTIVE_ARCH=YES \ | xcpretty) || EXIT_STATUS=$?; - pod deintegrate; + pod deintegrate >/dev/null; cd ..; done