diff --git a/.gitignore b/.gitignore
index 68cd9d28..54d37fda 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,11 +12,9 @@
# Plugins
-/[Aa]ssets/TextMesh Pro
+/[Aa]ssets/TextMesh Pro/
/[Aa]ssets/Plugins.meta
/[Aa]ssets/TextMesh Pro.meta
-/[Aa]ssets/Plugins/Android
-/[Aa]ssets/Plugins/Android.meta
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
diff --git a/Assets/Plugins/AWS.meta b/Assets/Plugins/AWS.meta
new file mode 100644
index 00000000..9c8a2a1a
--- /dev/null
+++ b/Assets/Plugins/AWS.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 29089b104a36f48afa3c119806655390
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/AWS/AWSSDK.CognitoIdentity.dll b/Assets/Plugins/AWS/AWSSDK.CognitoIdentity.dll
new file mode 100644
index 00000000..a60382ab
Binary files /dev/null and b/Assets/Plugins/AWS/AWSSDK.CognitoIdentity.dll differ
diff --git a/Assets/Plugins/AWS/AWSSDK.CognitoIdentity.dll.meta b/Assets/Plugins/AWS/AWSSDK.CognitoIdentity.dll.meta
new file mode 100644
index 00000000..26f0b133
--- /dev/null
+++ b/Assets/Plugins/AWS/AWSSDK.CognitoIdentity.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: d45a800af499245f5a15426d272914a2
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/AWS/AWSSDK.Core.dll b/Assets/Plugins/AWS/AWSSDK.Core.dll
new file mode 100644
index 00000000..3d87a301
Binary files /dev/null and b/Assets/Plugins/AWS/AWSSDK.Core.dll differ
diff --git a/Assets/Plugins/AWS/AWSSDK.Core.dll.meta b/Assets/Plugins/AWS/AWSSDK.Core.dll.meta
new file mode 100644
index 00000000..3bb41fc8
--- /dev/null
+++ b/Assets/Plugins/AWS/AWSSDK.Core.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 06ea0d86e6dd440df91b3dff42b3f401
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/AWS/AWSSDK.KeyManagementService.dll b/Assets/Plugins/AWS/AWSSDK.KeyManagementService.dll
new file mode 100644
index 00000000..6b5ac3c8
Binary files /dev/null and b/Assets/Plugins/AWS/AWSSDK.KeyManagementService.dll differ
diff --git a/Assets/Plugins/AWS/AWSSDK.KeyManagementService.dll.meta b/Assets/Plugins/AWS/AWSSDK.KeyManagementService.dll.meta
new file mode 100644
index 00000000..155866da
--- /dev/null
+++ b/Assets/Plugins/AWS/AWSSDK.KeyManagementService.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: fd4daa513384e458f913ecc9070a842f
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/AWS/AWSSDK.SecurityToken.dll b/Assets/Plugins/AWS/AWSSDK.SecurityToken.dll
new file mode 100644
index 00000000..12f56d4e
Binary files /dev/null and b/Assets/Plugins/AWS/AWSSDK.SecurityToken.dll differ
diff --git a/Assets/Plugins/AWS/AWSSDK.SecurityToken.dll.meta b/Assets/Plugins/AWS/AWSSDK.SecurityToken.dll.meta
new file mode 100644
index 00000000..9280d57c
--- /dev/null
+++ b/Assets/Plugins/AWS/AWSSDK.SecurityToken.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 263899d3ba11946cc9e7130eb592a349
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/AWS/Microsoft.Bcl.AsyncInterfaces.dll b/Assets/Plugins/AWS/Microsoft.Bcl.AsyncInterfaces.dll
new file mode 100644
index 00000000..f5f1ceec
Binary files /dev/null and b/Assets/Plugins/AWS/Microsoft.Bcl.AsyncInterfaces.dll differ
diff --git a/Assets/Plugins/AWS/Microsoft.Bcl.AsyncInterfaces.dll.meta b/Assets/Plugins/AWS/Microsoft.Bcl.AsyncInterfaces.dll.meta
new file mode 100644
index 00000000..fcb5d1e4
--- /dev/null
+++ b/Assets/Plugins/AWS/Microsoft.Bcl.AsyncInterfaces.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: c12e607954d78421fbe8ce5084fc8044
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/Android.meta b/Assets/Plugins/Android.meta
new file mode 100644
index 00000000..bc49312b
--- /dev/null
+++ b/Assets/Plugins/Android.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cbe23eb4ea478432f9badae04d548e28
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/Android/AndroidManifest.xml b/Assets/Plugins/Android/AndroidManifest.xml
new file mode 100644
index 00000000..be55bd8f
--- /dev/null
+++ b/Assets/Plugins/Android/AndroidManifest.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Assets/Plugins/Android/AndroidManifest.xml.meta b/Assets/Plugins/Android/AndroidManifest.xml.meta
new file mode 100644
index 00000000..28935047
--- /dev/null
+++ b/Assets/Plugins/Android/AndroidManifest.xml.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: b85bbd7cedeab4fa1a8125025053fc29
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/SequenceExamples/Scripts/Tests/LoginFlowUITests.cs b/Assets/SequenceExamples/Scripts/Tests/LoginFlowUITests.cs
index f143093b..1558ff8d 100644
--- a/Assets/SequenceExamples/Scripts/Tests/LoginFlowUITests.cs
+++ b/Assets/SequenceExamples/Scripts/Tests/LoginFlowUITests.cs
@@ -1,5 +1,7 @@
using System.Collections;
+using Sequence.Authentication;
using Sequence.Demo;
+using SequenceExamples.Scripts.Tests.Utils;
using TMPro;
using UnityEngine;
using UnityEngine.Assertions;
@@ -20,6 +22,8 @@ public class LoginFlowUITests : MonoBehaviour
private MultifactorAuthenticationPage _mfaPage;
private LoginSuccessPage _loginSuccessPage;
private WalletPanel _walletPanel;
+
+ private static readonly WaitForSeconds WaitForAnimationTime = new WaitForSeconds(UITestHarness.WaitForAnimationTime);
public void Setup(MonoBehaviour testMonobehaviour, SequenceSampleUI ui, LoginPanel loginPanel, ConnectPage connectPage, LoginPage loginPage,
MultifactorAuthenticationPage mfaPage, LoginSuccessPage loginSuccessPage, WalletPanel walletPanel)
@@ -32,18 +36,33 @@ public void Setup(MonoBehaviour testMonobehaviour, SequenceSampleUI ui, LoginPan
_mfaPage = mfaPage;
_loginSuccessPage = loginSuccessPage;
_walletPanel = walletPanel;
+
+ _loginPanel.SetupLoginHandler(new MockLogin());
}
- public IEnumerator EndToEndTest()
+ public IEnumerator EndToEndEmailFlowTest()
{
// Run all tests in one single suite to save time running test suite (otherwise, we need to reload and tear down the scene for each test
InitialExpectationsTest();
yield return _testMonobehaviour.StartCoroutine(TransitionToMfaPageTest());
yield return _testMonobehaviour.StartCoroutine(TransitionToLoginSuccessPageTest());
yield return _testMonobehaviour.StartCoroutine(GoBackToMfaPageAndVerifyPageStateTest());
- yield return _testMonobehaviour.StartCoroutine(GoBackToLoginPageAndVerifyPageStateTest());
+ yield return _testMonobehaviour.StartCoroutine(GoBackToLoginPageAndVerifyPageStateTest("validEmail@valid.com"));
yield return _testMonobehaviour.StartCoroutine(NavigateToLoginSuccessPageAndDismissTest());
}
+
+ public IEnumerator EndToEndSocialFlowTest()
+ {
+ // Run all tests in one single suite to save time running test suite (otherwise, we need to reload and tear down the scene for each test
+ InitialExpectationsTest();
+ foreach (string provider in new[] {"Google", "Discord", "Facebook", "Apple"})
+ {
+ yield return _testMonobehaviour.StartCoroutine(NavigateToLoginSuccessPageViaSocialLoginTest(provider));
+ yield return _testMonobehaviour.StartCoroutine(GoBackToLoginPageAndVerifyPageStateTest(""));
+ }
+
+ yield return _testMonobehaviour.StartCoroutine(NavigateToLoginSuccessPageViaSocialLoginAndDismissTest("Google"));
+ }
private void InitialExpectationsTest()
{
@@ -128,7 +147,21 @@ private IEnumerator TransitionToLoginSuccessPage(string code)
AssertWeAreOnLoginSuccessPage();
}
+
+ private IEnumerator NavigateToLoginSuccessPageViaSocialLoginAndDismissTest(string providerName)
+ {
+ yield return NavigateToLoginSuccessPageViaSocialLoginTest(providerName);
+ yield return DismissTest();
+ }
+ private IEnumerator NavigateToLoginSuccessPageViaSocialLoginTest(string providerName)
+ {
+ TestExtensions.ClickButtonWithName(_loginPage.transform, $"{providerName}SignInButton");
+ yield return WaitForAnimationTime;
+
+ AssertWeAreOnLoginSuccessPage();
+ }
+
private TMP_InputField FetchMfaCodeFieldAndAssertAssumptions()
{
GameObject MfaCodeGameObject = GameObject.Find("MFACodeField");
@@ -187,7 +220,7 @@ private IEnumerator GoBackToMfaPageAndVerifyPageStateTest()
Assert.AreEqual("Enter the code sent to\nvalidEmail@valid.com", text.text);
}
- private IEnumerator GoBackToLoginPageAndVerifyPageStateTest()
+ private IEnumerator GoBackToLoginPageAndVerifyPageStateTest(string expectedEmail)
{
GameObject backGameObject = GameObject.Find("BackButton");
Assert.IsNotNull(backGameObject);
@@ -203,7 +236,7 @@ private IEnumerator GoBackToLoginPageAndVerifyPageStateTest()
Assert.IsNotNull(emailGameObject);
TMP_InputField emailInputField = emailGameObject.GetComponent();
Assert.IsNotNull(emailInputField);
- Assert.AreEqual("validEmail@valid.com", emailInputField.text);
+ Assert.AreEqual(expectedEmail, emailInputField.text);
backGameObject = GameObject.Find("BackButton");
Assert.IsNull(backGameObject);
@@ -213,7 +246,11 @@ public IEnumerator NavigateToLoginSuccessPageAndDismissTest()
{
yield return _testMonobehaviour.StartCoroutine(TransitionToMfaPage("newValidEmail@valid.com"));
yield return _testMonobehaviour.StartCoroutine(TransitionToLoginSuccessPage("0987654321"));
-
+ yield return _testMonobehaviour.StartCoroutine(DismissTest());
+ }
+
+ private IEnumerator DismissTest()
+ {
GameObject dismissGameObject = GameObject.Find("DismissButton");
Assert.IsNotNull(dismissGameObject);
Button dismissButton = dismissGameObject.GetComponent