diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index f6c8c84..0824501 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -138,7 +138,7 @@ jobs: id: install-simulator uses: futureware-tech/simulator-action@v3 with: - model: 'iPhone 14' + model: 'iPhone 15' - name: Run iOS tests run: flutter test integration_test/*.dart -d ${{ steps.install-simulator.outputs.udid }} --dart-define=MAILOSAUR_API_KEY=${{ secrets.MAILOSAUR_API_KEY }} diff --git a/integrationtestapp/integration_test/change_user_info_test.dart b/integrationtestapp/integration_test/change_user_info_test.dart index 5ff7e38..7f6911d 100644 --- a/integrationtestapp/integration_test/change_user_info_test.dart +++ b/integrationtestapp/integration_test/change_user_info_test.dart @@ -28,14 +28,14 @@ void main() { Future loginWithMagicLink() async { try { await passage - .magliclink.login(IntegrationTestConfig.existingUserEmailMagicLink); + .magiclink.login(IntegrationTestConfig.existingUserEmailMagicLink); await Future.delayed(const Duration( milliseconds: IntegrationTestConfig.waitTimeMilliseconds)); final magicLinkStr = await MailosaurAPIClient.getMostRecentMagicLink(); if (magicLinkStr.isEmpty) { fail('Test failed: Magic link is empty'); } - await passage.magliclink.activate(magicLinkStr); + await passage.magiclink.activate(magicLinkStr); } catch (e) { fail('Expected to activate login magic link, but got an exception: $e'); } diff --git a/integrationtestapp/integration_test/current_user_test.dart b/integrationtestapp/integration_test/current_user_test.dart index edb57b0..4901a72 100644 --- a/integrationtestapp/integration_test/current_user_test.dart +++ b/integrationtestapp/integration_test/current_user_test.dart @@ -31,7 +31,7 @@ void main() { Future loginWithMagicLink() async { try { await passage - .magliclink + .magiclink .login(IntegrationTestConfig.existingUserEmailMagicLink); await Future.delayed( const Duration(milliseconds: IntegrationTestConfig.waitTimeMilliseconds)); @@ -39,7 +39,7 @@ void main() { if (magicLinkStr.isEmpty) { fail('Test failed: Magic link is empty'); } - await passage.magliclink.activate(magicLinkStr); + await passage.magiclink.activate(magicLinkStr); } catch (e) { fail('Expected to activate login magic link, but got an exception: $e'); } diff --git a/integrationtestapp/integration_test/magic_link_test.dart b/integrationtestapp/integration_test/magic_link_test.dart index b2219fa..555ea25 100644 --- a/integrationtestapp/integration_test/magic_link_test.dart +++ b/integrationtestapp/integration_test/magic_link_test.dart @@ -31,7 +31,7 @@ void main() { final date = DateTime.now().millisecondsSinceEpoch; final identifier = 'authentigator+$date@${MailosaurAPIClient.serverId}.mailosaur.net'; - await passage.magliclink.register(identifier); + await passage.magiclink.register(identifier); } catch (e) { fail( 'Expected to send a register magic link, but got an exception: $e'); @@ -40,7 +40,7 @@ void main() { test('testRegisterExistingUserMagicLink', () async { try { - await passage.magliclink.register( + await passage.magiclink.register( IntegrationTestConfig.existingUserEmailMagicLink); fail('Expected PassageError but got success'); } catch (e) { @@ -54,7 +54,7 @@ void main() { test('testRegisterInvalidEmailAddressFormatMagicLink', () async { try { - await passage.magliclink.register('invalid'); + await passage.magiclink.register('invalid'); fail('Expected PassageError but got success'); } catch (e) { if (e is PassageError) { @@ -68,7 +68,7 @@ void main() { test('testSendLoginMagicLink', () async { try { const identifier = IntegrationTestConfig.existingUserEmailMagicLink; - await passage.magliclink.login(identifier); + await passage.magiclink.login(identifier); } catch (e) { fail('Expected to send a login magic link, but got an exception: $e'); } @@ -76,7 +76,7 @@ void main() { test('testInvalidLoginMagicLink', () async { try { - await passage.magliclink.login('Invalid@invalid.com'); + await passage.magiclink.login('Invalid@invalid.com'); fail('Expected PassageError but got success'); } catch (e) { if (e is PassageError) { @@ -92,14 +92,14 @@ void main() { final date = DateTime.now().millisecondsSinceEpoch; final identifier = 'authentigator+$date@${MailosaurAPIClient.serverId}.mailosaur.net'; - await passage.magliclink.register(identifier); + await passage.magiclink.register(identifier); await Future.delayed(const Duration( milliseconds: IntegrationTestConfig.waitTimeMilliseconds)); final magicLinkStr = await MailosaurAPIClient.getMostRecentMagicLink(); if (magicLinkStr.isEmpty) { fail('Test failed: Magic link is empty'); } - await passage.magliclink.activate(magicLinkStr); + await passage.magiclink.activate(magicLinkStr); } catch (e) { fail( 'Expected to activate register magic link, but got an exception: $e'); @@ -108,7 +108,7 @@ void main() { test('testActivateLoginMagicLink', () async { try { - await passage.magliclink.login( + await passage.magiclink.login( IntegrationTestConfig.existingUserEmailMagicLink); await Future.delayed(const Duration( milliseconds: IntegrationTestConfig.waitTimeMilliseconds)); @@ -116,7 +116,7 @@ void main() { if (magicLinkStr.isEmpty) { fail('Test failed: Magic link is empty'); } - await passage.magliclink.activate(magicLinkStr); + await passage.magiclink.activate(magicLinkStr); } catch (e) { fail('Expected to activate login magic link, but got an exception: $e'); } @@ -124,9 +124,9 @@ void main() { test('testActivateInvalidMagicLink', () async { try { - await passage.magliclink.register( + await passage.magiclink.register( 'authentigator+invalid@${MailosaurAPIClient.serverId}.mailosaur.net'); - await passage.magliclink.activate('Invalid'); + await passage.magiclink.activate('Invalid'); fail('Expected PassageError but got success'); } catch (e) { if (e is PassageError) { @@ -139,7 +139,7 @@ void main() { test('testActivateDeactivatedUserMagicLink', () async { try { - await passage.magliclink.login( + await passage.magiclink.login( IntegrationTestConfig.deactivatedUserEmailMagicLink); await Future.delayed(const Duration( milliseconds: IntegrationTestConfig.waitTimeMilliseconds)); @@ -147,7 +147,7 @@ void main() { if (magicLinkStr.isEmpty) { fail('Test failed: Magic link is empty'); } - await passage.magliclink.activate(magicLinkStr); + await passage.magiclink.activate(magicLinkStr); fail('Expected PassageError but got success'); } catch (e) { if (e is PassageError) { diff --git a/integrationtestapp/integration_test/token_store_test.dart b/integrationtestapp/integration_test/token_store_test.dart index bb396ae..857414d 100644 --- a/integrationtestapp/integration_test/token_store_test.dart +++ b/integrationtestapp/integration_test/token_store_test.dart @@ -27,14 +27,14 @@ void main() { Future loginWithMagicLink() async { try { await passage - .magliclink.login(IntegrationTestConfig.existingUserEmailMagicLink); + .magiclink.login(IntegrationTestConfig.existingUserEmailMagicLink); await Future.delayed(const Duration( milliseconds: IntegrationTestConfig.waitTimeMilliseconds)); final magicLinkStr = await MailosaurAPIClient.getMostRecentMagicLink(); if (magicLinkStr.isEmpty) { fail('Test failed: Magic link is empty'); } - await passage.magliclink.activate(magicLinkStr); + await passage.magiclink.activate(magicLinkStr); } catch (e) { fail('Expected to activate login magic link, but got an exception: $e'); } diff --git a/lib/passage_flutter.dart b/lib/passage_flutter.dart index 97ec13a..3c91e96 100644 --- a/lib/passage_flutter.dart +++ b/lib/passage_flutter.dart @@ -12,7 +12,7 @@ class PassageFlutter { late final PassagePasskey passkey; late final PassageSocial social; late final PassageOneTimePasscode oneTimePasscode; - late final PassageMagliclink magliclink; + late final PassageMagiclink magiclink; late final PassageHosted hosted; late final PassageApp app; late final PassageTokenStore tokenStore; @@ -22,7 +22,7 @@ class PassageFlutter { passkey = PassagePasskey(); social = PassageSocial(); oneTimePasscode = PassageOneTimePasscode(); - magliclink = PassageMagliclink(); + magiclink = PassageMagiclink(); hosted = PassageHosted(); app =PassageApp(); tokenStore = PassageTokenStore(); diff --git a/lib/passage_magliclink.dart b/lib/passage_magliclink.dart index 3d6649d..2628d67 100644 --- a/lib/passage_magliclink.dart +++ b/lib/passage_magliclink.dart @@ -2,7 +2,7 @@ import 'package:passage_flutter/models/magic_link.dart'; import 'passage_flutter_models/auth_result.dart'; import 'passage_flutter_platform/passage_flutter_platform_interface.dart'; -class PassageMagliclink { +class PassageMagiclink { /// Creates and sends a new magic link for registration. ///