Skip to content

PAS-448 | update module style in reports (#581) #2274

PAS-448 | update module style in reports (#581)

PAS-448 | update module style in reports (#581) #2274

GitHub Actions / Test Results succeeded May 10, 2024 in 0s

297 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
tests/AdminConsole.Tests/TestResults/pw-test-results.trx 85✅ 11s
tests/Api.IntegrationTests/TestResults/pw-test-results.trx 103✅ 96s
tests/Api.Tests/TestResults/pw-test-results.trx 27✅ 10s
tests/Common.Tests/TestResults/pw-test-results.trx 44✅ 10s
tests/Service.Tests/TestResults/pw-test-results.trx 38✅ 10s

✅ tests/AdminConsole.Tests/TestResults/pw-test-results.trx

85 tests were completed in 11s with 85 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.AdminConsole.Tests.Components.BadgeTests 11✅ 58ms
Passwordless.AdminConsole.Tests.Components.Pages.App.BaseApplicationTests 3✅ 31ms
Passwordless.AdminConsole.Tests.Components.Pages.App.LogTests 1✅ 836ms
Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalCredentialsCountChartTests 1✅ 273ms
Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalUsersCountChartTests 1✅ 51ms
Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.AuthenticatorsTests 3✅ 194ms
Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.SettingsComponents.ApiKeysSectionTests 4✅ 102ms
Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ApexChartJsonSerializerTests 4✅ 31ms
Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ColorConverterTests 2✅ 5ms
Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Validators.ColorValidatorTests 9✅ 4ms
Passwordless.AdminConsole.Tests.Components.Shared.BreadCrumbTests 6✅ 114ms
Passwordless.AdminConsole.Tests.Components.Shared.Layouts.NavMenuTests 4✅ 167ms
Passwordless.AdminConsole.Tests.Components.Shared.LocalDateTimeTests 2✅ 62ms
Passwordless.AdminConsole.Tests.Components.Shared.Modals.SimpleAlertTests 7✅ 127ms
Passwordless.AdminConsole.Tests.Components.Shared.SecureScriptTests 4✅ 25ms
Passwordless.AdminConsole.Tests.Components.Shared.SecureStylesheetTests 4✅ 900ms
Passwordless.AdminConsole.Tests.Components.Shared.Stats.SimpleCardsStatsTests 4✅ 902ms
Passwordless.AdminConsole.Tests.Components.Shared.Stats.TrendingCardsStatsTests 4✅ 46ms
Passwordless.AdminConsole.Tests.Components.Shared.Table.PagedTableTests 4✅ 14ms
Passwordless.AdminConsole.Tests.Components.Shared.Table.TableTests 2✅ 24ms
Passwordless.AdminConsole.Tests.Components.Shared.Validation.CustomValidationErrorsTests 2✅ 878ms
Passwordless.AdminConsole.Tests.Endpoints.ApplicationEndpointsTests 3✅ 21ms

✅ Passwordless.AdminConsole.Tests.Components.BadgeTests

✅ Badge_Renders_ExpectedBackground_Variant(variant: Danger, expectedClass: "bg-red-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Info, expectedClass: "bg-blue-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Primary, expectedClass: "bg-blue-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Success, expectedClass: "bg-green-600")
✅ Badge_Renders_ExpectedBackground_Variant(variant: Warning, expectedClass: "bg-yellow-600")
✅ Badge_Renders_ExpectedText
✅ Badge_Renders_WhiteText(variant: Danger)
✅ Badge_Renders_WhiteText(variant: Info)
✅ Badge_Renders_WhiteText(variant: Primary)
✅ Badge_Renders_WhiteText(variant: Success)
✅ Badge_Renders_WhiteText(variant: Warning)

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.BaseApplicationTests

✅ AllApplicationPages_Inherit_BaseApplicationPage
✅ AllApplicationPages_Inherit_BaseApplicationPage_WhenPathMatches
✅ BaseApplicationPage_Has_HasAppHandler_AuthorizationPolicy

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.LogTests

✅ LogPage_DoesRendersEmptyTable_WhenEventsIsEmpty

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalCredentialsCountChartTests

✅ RenderComponent_Renders_ExpectedId

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.ReportingComponents.TotalUsersCountChartTests

✅ RenderComponent_Renders_ExpectedId

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.AuthenticatorsTests

✅ AllowList_Renders_Nothing_WhenAllowListEmpty
✅ AllowList_Renders_SortedAlphabetically
✅ Authenticators_RedirectsTo_Settings_WhenAttestationIsNotAllowed

✅ Passwordless.AdminConsole.Tests.Components.Pages.App.Settings.SettingsComponents.ApiKeysSectionTests

✅ ApiKeysSection_DoesNotRender_WhenApplicationIsPendingDeletion
✅ ApiKeysSection_Renders_ExpectedIcons_WhenApiKeyIsLocked
✅ ApiKeysSection_Renders_LockIcon_WhenApiKeyIsUnlocked
✅ ApiKeysSection_Renders_WhenApplicationIsNotPendingDeletion

✅ Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ApexChartJsonSerializerTests

✅ Color_Is_Serialized_As_Hex
✅ Enums_Are_Serialized_As_Strings
✅ Properties_Are_Serialized_With_CamelCase
✅ Properties_With_Null_Values_Are_Not_Serialized

✅ Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Serialization.ColorConverterTests

✅ Write_ConvertsColorToHexFormat
✅ Write_ConvertsColorWithoutAlphaToHexFormat

✅ Passwordless.AdminConsole.Tests.Components.Shared.ApexCharts.Validators.ColorValidatorTests

✅ IsValid_ReturnsFalse_WhenLengthIsTooLong
✅ IsValid_ReturnsFalse_WhenLengthIsTooShort1
✅ IsValid_ReturnsFalse_WhenLengthIsTooShort2
✅ IsValid_ReturnsTrue_WhenLengthIs3
✅ IsValid_ReturnsTrue_WhenLengthIs4
✅ IsValid_ReturnsTrue_WhenLowercaseHexIsValid
✅ IsValid_ReturnsTrue_WhenRgbaHexIsValid
✅ IsValid_ReturnsTrue_WhenRgbHexIsValid
✅ IsValid_ReturnsTrue_WhenUppercaseHexIsValid

✅ Passwordless.AdminConsole.Tests.Components.Shared.BreadCrumbTests

✅ BreadCrumb_Renders_AllMiddleItemsButAsLinks
✅ BreadCrumb_Renders_FirstElementAsLink
✅ BreadCrumb_Renders_LastItemAsText
✅ BreadCrumb_Renders_Nothing_WhenItemsIsNull
✅ BreadCrumb_Renders_Nothing_WhenNoItems
✅ BreadCrumb_Renders_Nothing_WhenOnlyOneItem

✅ Passwordless.AdminConsole.Tests.Components.Shared.Layouts.NavMenuTests

✅ NavMenu_Renders_EmptySidebar_WhenNotAuthenticated
✅ NavMenu_Renders_ExpectedApplicationLinks_ApplicationIsNotPendingDeletion
✅ NavMenu_Renders_ExpectedApplicationLinks_ApplicationIsPendingDeletion
✅ NavMenu_Renders_Sidebar_WhenAuthenticated

✅ Passwordless.AdminConsole.Tests.Components.Shared.LocalDateTimeTests

✅ LocalDateTime_Applies_Nonce_OnScriptTag
✅ LocalDateTime_Renders_ExpectedMarkup

✅ Passwordless.AdminConsole.Tests.Components.Shared.Modals.SimpleAlertTests

✅ SimpleAlert_Applies_HiddenClass_WhenIsHiddenIsTrue
✅ SimpleAlert_DoesNotApply_HiddenClass_WhenIsHiddenIsFalse
✅ SimpleAlert_Renders_Actions_WithDefaultText
✅ SimpleAlert_Renders_Actions_WithExpectedIdAttributes
✅ SimpleAlert_Renders_Description
✅ SimpleAlert_Renders_IdAttribute
✅ SimpleAlert_Renders_Title

✅ Passwordless.AdminConsole.Tests.Components.Shared.SecureScriptTests

✅ SecureScript_Renders_InlineScript
✅ SecureScript_Renders_NonceAttribute
✅ SecureScript_Renders_ScriptFile
✅ SecureScript_Renders_WithoutNonceAttribute

✅ Passwordless.AdminConsole.Tests.Components.Shared.SecureStylesheetTests

✅ SecureStylesheet_DoesNot_NonceAttributeForCssFile
✅ SecureStylesheet_Renders_LinkTag_ForFile
✅ SecureStylesheet_Renders_LinkTag_ForInlineCss
✅ SecureStylesheet_Renders_NonceAttributeForInlineCss

✅ Passwordless.AdminConsole.Tests.Components.Shared.Stats.SimpleCardsStatsTests

✅ SimpleCardsStats_Renders_3Cards
✅ SimpleCardsStats_Renders_ExpectedCardsWithExpectedClasses
✅ SimpleCardsStats_Renders_ExpectedCardsWithExpectedContent
✅ SimpleCardsStats_Renders_Nothing_WhenItemsAreEmpty

✅ Passwordless.AdminConsole.Tests.Components.Shared.Stats.TrendingCardsStatsTests

✅ TrendingCardsStats_Renders_3Cards
✅ TrendingCardsStats_Renders_ExpectedCardsWithExpectedClasses
✅ TrendingCardsStats_Renders_ExpectedCardsWithExpectedContent
✅ TrendingCardsStats_Renders_Nothing_WhenItemsAreEmpty

✅ Passwordless.AdminConsole.Tests.Components.Shared.Table.PagedTableTests

✅ Ctor_SetsExpectedAmountOfPages_WhenLastPageContainsLessItemsThanPageSize
✅ Ctor_ShouldSetCurrentIndex
✅ Ctor_ShouldSetPages
✅ Ctor_ShouldSetTotalPages

✅ Passwordless.AdminConsole.Tests.Components.Shared.Table.TableTests

✅ Table_Renders_EmptyColumnHeaders
✅ Table_Renders_ExpectedColumnHeaders

✅ Passwordless.AdminConsole.Tests.Components.Shared.Validation.CustomValidationErrorsTests

✅ CustomValidationErrors_RendersNothing_WhenNoValidationMessages
✅ CustomValidationErrors_RendersValidationMessages_WhenValidationMessagesExist

✅ Passwordless.AdminConsole.Tests.Endpoints.ApplicationEndpointsTests

✅ IsAppIdAvailableAsync_Returns_ExpectedResult_FromPasswordlessApiException
✅ IsAppIdAvailableAsync_Returns_Ok(isAvailable: False)
✅ IsAppIdAvailableAsync_Returns_Ok(isAvailable: True)

✅ tests/Api.IntegrationTests/TestResults/pw-test-results.trx

103 tests were completed in 96s with 103 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Api.IntegrationTests.AuthorizationTests 17✅ 17s
Passwordless.Api.IntegrationTests.Endpoints.App.AppTests 21✅ 19s
Passwordless.Api.IntegrationTests.Endpoints.Authenticators.AuthenticatorsTests 7✅ 21s
Passwordless.Api.IntegrationTests.Endpoints.Credentials.CredentialsTests 3✅ 17s
Passwordless.Api.IntegrationTests.Endpoints.Events.EventsTests 13✅ 18s
Passwordless.Api.IntegrationTests.Endpoints.Magic.MagicTests 10✅ 53s
Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterAttestationTests 6✅ 12s
Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTests 3✅ 19s
Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTokenTests 10✅ 14s
Passwordless.Api.IntegrationTests.Endpoints.SignIn.SignInTests 7✅ 26s
Passwordless.Api.IntegrationTests.Middleware.AuthorizationIntegrationTests 4✅ 7s
Passwordless.Api.IntegrationTests.Middleware.RoutingIntegrationTests 2✅ 9s

✅ Passwordless.Api.IntegrationTests.AuthorizationTests

✅ ApiPublicGivesHelpfulAdviceAsync(input: "", details: "A valid 'ApiKey' header is required.")
✅ ApiPublicGivesHelpfulAdviceAsync(input: "missing", details: "A valid 'ApiKey' header is required.")
✅ ApiPublicGivesHelpfulAdviceAsync(input: "register_123", details: "A register token was supplied instead of your 'Api"···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "secret-header-instead", details: "A 'ApiSecret' header was supplied when a 'ApiKey' "···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "somethingrandom", details: "We don't recognize the value you supplied for your"···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "test:secret:123", details: "Your ApiKey header contained a ApiSecret instead o"···)
✅ ApiPublicGivesHelpfulAdviceAsync(input: "verify_123", details: "A verify token was supplied instead of your 'ApiKe"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "", details: "A valid 'ApiSecret' header is required.")
✅ ApiSecretGivesHelpfulAdviceAsync(input: "missing", details: "A valid 'ApiSecret' header is required.")
✅ ApiSecretGivesHelpfulAdviceAsync(input: "public-header-instead", details: "A 'ApiKey' header was supplied when a 'ApiSecret' "···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "register_13", details: "A register token was supplied instead of your 'Api"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "somethingrandom", details: "We don't recognize the value you supplied for your"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "test:public:123", details: "Your ApiSecret header contained a public ApiKey in"···)
✅ ApiSecretGivesHelpfulAdviceAsync(input: "verify_123", details: "A verify token was supplied instead of your 'ApiSe"···)
✅ ValidateThatEndpointsHaveProtectionAsync
✅ ValidateThatInvalidApiSecretThrowsAsync
✅ ValidateThatMissingApiSecretThrowsAsync

✅ Passwordless.Api.IntegrationTests.Endpoints.App.AppTests

✅ I can check whether an app id is available
✅ I can check whether an app id is unavailable
✅ I can create a new public key
✅ I can create a new secret key
✅ I can create an account with a valid name
✅ I can create an app and its features will be set correctly
✅ I can delete an api key
✅ I can disable magic links
✅ I can disable the generate sign in token endpoint
✅ I can enable magic links
✅ I can enable the generate sign in token endpoint
✅ I can get all api keys for my application
✅ I can get an apps features
✅ I can lock an api key
✅ I can manage an apps features
✅ I can not set the event logging retention period to an invalid value(invalidRetentionPeriod: -1)
✅ I can not set the event logging retention period to an invalid value(invalidRetentionPeriod: 91)
✅ I can set event logging retention period
✅ I can unlock a locked api key
✅ I cannot create an account with an invalid name(name: "1")
✅ I cannot create an account with an invalid name(name: "a")

✅ Passwordless.Api.IntegrationTests.Endpoints.Authenticators.AuthenticatorsTests

✅ I can delist authenticators when attestation is allowed
✅ I can retrieve configured authenticators when attestation is allowed
✅ I can retrieve configured authenticators with expected result
✅ I can whitelist authenticators when attestation is allowed
✅ I receive forbidden when delisting authenticators when attestation is not allowed
✅ I receive forbidden when retrieving configured authenticators when attestation is not allowed
✅ I receive forbidden when whitelisting authenticators when attestation is not allowed

✅ Passwordless.Api.IntegrationTests.Endpoints.Credentials.CredentialsTests

✅ I am told to pass the user id when getting credential list using get with secret key
✅ I am told to pass the user id when getting credential list using post with secret key
✅ I can view a list of registered users credentials

✅ Passwordless.Api.IntegrationTests.Endpoints.Events.EventsTests

✅ I can view the event for a user creating an api key
✅ I can view the event for a user retrieving the api keys
✅ I can view the event for deleting an api key
✅ I can view the event for disabling magic links
✅ I can view the event for disabling the generate sign in token endpoint
✅ I can view the event for enabling magic links
✅ I can view the event for enabling the generate sign in token endpoint
✅ I can view the event for locking an api key
✅ I can view the event for unlocking an api key
✅ I can view the event for using a disabled api secret
✅ I can view the event for using a disabled public key
✅ I can view the event for using a non existent api key
✅ I can view the event for using a non existent api secret

✅ Passwordless.Api.IntegrationTests.Endpoints.Magic.MagicTests

✅ I can send a magic link email
✅ I can send a magic link email after enough time passed since the monthly quota was exceeded
✅ I can send a magic link email to a non admin address if the application is old enough
✅ I can send a magic link email to an admin address even if the application is too new
✅ I cannot send a magic link email if the feature is disabled
✅ I cannot send a magic link email to a non admin address if the application is too new
✅ I cannot send too many magic link emails in a month
✅ I cannot send too many magic link emails in a short time
✅ I receive a validation error when an invalid url is sent
✅ I receive a validation error when the url does not contain the token template

✅ Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterAttestationTests

✅ I can use supported attestation methods to register a new user when attestation is allowed(attestation: "direct", expectedAttestation: Direct)
✅ I can use supported attestation methods to register a new user when attestation is allowed(attestation: "indirect", expectedAttestation: Indirect)
✅ I can use supported attestation methods to register a new user when attestation is allowed(attestation: "none", expectedAttestation: None)
✅ I can use supported none attestation method to register a new user when attestation is disallowed(attestation: "none", expectedAttestation: None)
✅ I cannot use other than none attestation method to register a new user when attestation is disallowed(attestation: "direct")
✅ I cannot use other than none attestation method to register a new user when attestation is disallowed(attestation: "indirect")

✅ Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTests

✅ I can retrieve the credential create options and session token for creating a new user
✅ I can retrieve token to start registration
✅ I can use a passkey to register a new user

✅ Passwordless.Api.IntegrationTests.Endpoints.Register.RegisterTokenTests

✅ InvalidUserIdReturnsError(userid: "")
✅ InvalidUserIdReturnsError(userid: null)
✅ InvalidUsernameReturnsError(input: "")
✅ InvalidUsernameReturnsError(input: null)
✅ NoneAssertionIsAccepted(attestation: "")
✅ NoneAssertionIsAccepted(attestation: "none")
✅ NoneAssertionIsAccepted(attestation: "None")
✅ OtherAssertionIsNotAccepted(attestation: "enterprise")
✅ OtherAssertionIsNotAccepted(attestation: "other")
✅ UserIdAndDisplayNameIsTheOnlyRequiredProperties

✅ Passwordless.Api.IntegrationTests.Endpoints.SignIn.SignInTests

✅ An expired apps token keys should be removed when a request is made
✅ I can retrieve assertion options to begin sign in
✅ I can retrieve my passkey after registering and receive a sign in token
✅ I can retrieve my passkey after registering and receive a valid sign in token
✅ I receive a sign in token for a valid user id
✅ I receive an api exception when using an expired token
✅ I receive an error message when sending an unrecognized passkey

✅ Passwordless.Api.IntegrationTests.Middleware.AuthorizationIntegrationTests

✅ I receive a 403 when i use a badly formatted api key with an existing endpoint
✅ I receive a 403 when i use a badly formatted api secret with an existing endpoint
✅ I receive a 403 when i use a invalid api key with an existing endpoint
✅ I receive a 403 when i use a invalid api secret with an existing endpoint

✅ Passwordless.Api.IntegrationTests.Middleware.RoutingIntegrationTests

✅ I receive a 404 when i use a badly formatted api key with a non existing endpoint
✅ I receive a 404 when i use a badly formatted api secret with a non existing endpoint

✅ tests/Api.Tests/TestResults/pw-test-results.trx

27 tests were completed in 10s with 27 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Api.Tests.Authorization.HeaderHandlerTests 4✅ 439ms
Passwordless.Api.Tests.Endpoints.AppsEndpointsTests 7✅ 404ms
Passwordless.Api.Tests.Endpoints.AuthenticatorsEndpointsTests 8✅ 416ms
Passwordless.Api.Tests.Endpoints.ReportingEndpointsTests 2✅ 344ms
Passwordless.Api.Tests.Extensions.HeaderDictionaryExtensionsTests 6✅ 43ms

✅ Passwordless.Api.Tests.Authorization.HeaderHandlerTests

✅ HandleAuthenticateAsync_HeaderDoesNotExist_ReturnsNoResult
✅ HandleAuthenticateAsync_HeaderIsEmpty_ReturnsNoResult
✅ HandleAuthenticateAsync_HeaderIsValid_Succeeds
✅ HandleChallengeAsync_WritesDetailError

✅ Passwordless.Api.Tests.Endpoints.AppsEndpointsTests

✅ DeleteApplicationAsync_Returns_ExpectedResult
✅ GetApplicationsPendingDeletionAsync_Returns_ExpectedResult
✅ IsAppIdAvailableAsync_Returns_Ok_WhenAppIdIsAvailable
✅ IsAppIdAvailableAsync_Returns_Ok_WhenAppIdIsUnavailable
✅ ManageFeaturesAsync_Returns_ExpectedResult
✅ MarkDeleteApplicationAsync_Returns_ExpectedResult
✅ SetFeaturesAsync_Returns_ExpectedResult

✅ Passwordless.Api.Tests.Endpoints.AuthenticatorsEndpointsTests

✅ DelistAuthenticatorsAsync_LogsAuthenticatorsDelistedEvent
✅ DelistAuthenticatorsAsync_Returns_NoContent
✅ DelistAuthenticatorsAsync_Throws_Forbidden_WhenAttestationIsNotAllowed
✅ ListConfiguredAuthenticatorsAsync_Returns_Ok_WhenAttestationIsNotAllowed
✅ ListConfiguredAuthenticatorsAsync_Throws_Forbidden_WhenAttestationIsNotAllowed
✅ WhitelistAuthenticatorsAsync_LogsAuthenticatorsWhitelistedEvent
✅ WhitelistAuthenticatorsAsync_Returns_NoContent
✅ WhitelistAuthenticatorsAsync_Throws_Forbidden_WhenAttestationIsNotAllowed

✅ Passwordless.Api.Tests.Endpoints.ReportingEndpointsTests

✅ GetPeriodicActiveUserReportsAsync_Returns_ExpectedResult
✅ GetPeriodicCredentialReportsAsync_Returns_ExpectedResult

✅ Passwordless.Api.Tests.Extensions.HeaderDictionaryExtensionsTests

✅ GetApiSecret_GivenEmptyHeaderDictionary_WhenApiSecretIsNotPresent_ThenNullShouldReturn
✅ GetApiSecret_GivenHeaderDictionary_WhenApiSecretHeaderExists_ThenTenantSecretValueShouldReturn
✅ GetApiSecret_GivenHeaderDictionary_WhenApiSecretIsNotPresent_ThenNullShouldReturn
✅ GetPublicApiKey_GivenEmptyHeaderDictionary_WhenPublicKeyIsNotPresent_ThenNullShouldReturn
✅ GetPublicApiKey_GivenHeaderDictionary_WhenPublicKeyHeaderExists_ThenTenantSecretValueShouldReturn
✅ GetPublicApiKey_GivenHeaderDictionary_WhenPublicKeyIsNotPresent_ThenNullShouldReturn

✅ tests/Common.Tests/TestResults/pw-test-results.trx

44 tests were completed in 10s with 44 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Common.Tests.Background.ExecutionPlanUtilityTests 4✅ 312ms
Passwordless.Common.Tests.Extensions.PublicKeyExtensionsTests 3✅ 10ms
Passwordless.Common.Tests.Extensions.SecretKeyExtensionsTests 3✅ 11ms
Passwordless.Common.Tests.Extensions.StringExtensionsTests 4✅ 1ms
Passwordless.Common.Tests.Middleware.SelfHosting.HttpOverridesMiddlewareTests 2✅ 34ms
Passwordless.Common.Tests.Serialization.HtmlSanitizerTests 7✅ 543ms
Passwordless.Common.Tests.Services.Mail.PostmarkMailProviderTests 1✅ 992ms
Passwordless.Common.Tests.Utils.ApiKeyUtilsTests 9✅ 302ms
Passwordless.Common.Tests.Validation.NoForbiddenContentAttributeTests 8✅ 844ms
Passwordless.Common.Tests.Validation.RegularExpressionCollectionAttributeTests 3✅ 1ms

✅ Passwordless.Common.Tests.Background.ExecutionPlanUtilityTests

✅ GetExecutionPlan_WhenExecutionTimeIsAfterCurrentTime_ReturnsCorrectInitialDelay
✅ GetExecutionPlan_WhenExecutionTimeIsAfterCurrentTime_ReturnsCorrectInitialDelay2
✅ GetExecutionPlan_WhenExecutionTimeIsBeforeCurrentTime_ReturnsCorrectInitialDelay
✅ GetExecutionPlan_WhenExecutionTimeIsSameAsCurrentTime_ReturnsCorrectInitialDelay

✅ Passwordless.Common.Tests.Extensions.PublicKeyExtensionsTests

✅ AsPublicKeyScope_GivenDescription_ReturnsPublicKeyScope
✅ AsPublicKeyScope_GivenInvalidDescription_ThrowsArgumentException
✅ GetValue_GivenPublicKeyScope_ReturnsDescription

✅ Passwordless.Common.Tests.Extensions.SecretKeyExtensionsTests

✅ AsSecretKeyScope_GivenDescription_ReturnsSecretKeyScope
✅ AsSecretKeyScope_GivenInvalidDescription_ThrowsArgumentException
✅ GetValue_GivenSecretKeyScope_ReturnsDescription

✅ Passwordless.Common.Tests.Extensions.StringExtensionsTests

✅ GetLast_GivenStringAndAnyNumberOfCharactersToReturn_WhenStringIsEmpty_ThenShouldBeAnEmptyString
✅ GetLast_GivenStringAndAnyNumberOfCharactersToReturn_WhenStringIsNull_ThenResultShouldBeNull
✅ GetLast_GivenStringOfTwoCharacters_WhenLastThreeCharactersAreRequested_ThenShouldReturnFullString
✅ GetLast_GivenStringOfTwoCharacters_WhenLastTwoCharactersAreRequested_ThenShouldReturnFullString

✅ Passwordless.Common.Tests.Middleware.SelfHosting.HttpOverridesMiddlewareTests

✅ InvokeAsync_DoesNotModify_Scheme_WhenXForwardedProtoHeaderNotPresent
✅ InvokeAsync_Modifies_Scheme_WhenXForwardedProtoHeaderNotPresent

✅ Passwordless.Common.Tests.Serialization.HtmlSanitizerTests

✅ Sanitize_WhenGivenHtml_ShouldReturnSanitizedHtml
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<a href='https://example.com'>hello</a>")
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<a><a>hello</a></a>")
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<p>hello</p>")
✅ Sanitize_WhenGivenHtmlWithAllowedTags_ShouldReturnSanitizedHtml(input: "<strong>hello</strong>")
✅ Sanitize_WhenGivenStringContainingScheme_ShouldReturnSanitizedHtml(input: "http://hello")
✅ Sanitize_WhenGivenStringContainingScheme_ShouldReturnSanitizedHtml(input: "https://hello")

✅ Passwordless.Common.Tests.Services.Mail.PostmarkMailProviderTests

✅ SendAsync_GivenMessageWithMessageType_WhenCorrespondingClientDoesNotExist_ThenWarningShouldBeLogged

✅ Passwordless.Common.Tests.Utils.ApiKeyUtilsTests

✅ GetAppId_Returns_AppId_ForAValidApiKey
✅ GetAppId_Returns_AppId_ForAValidApiSecret
✅ GetAppId_Throws_ArgumentException_ForAnInvalidApiKey
✅ GetAppId_Throws_ArgumentException_ForAnInvalidApiSecret
✅ HashPrivateApiKey_Returns_ExpectedResult
✅ Validate_Returns_False_ForBadHash
✅ Validate_Returns_False_ForBadHash2
✅ Validate_Returns_False_ForInvalidApiKey
✅ Validate_Returns_True_ForValidApiKey

✅ Passwordless.Common.Tests.Validation.NoForbiddenContentAttributeTests

✅ IsValid_WhenValueContainsHtmlTags_ReturnsFalse(value: "<a>alert</a>")
✅ IsValid_WhenValueContainsHtmlTags_ReturnsFalse(value: "<div>alert</div>")
✅ IsValid_WhenValueContainsHtmlTags_ReturnsFalse(value: "<script>alert('XSS')</script>")
✅ IsValid_WhenValueContainsSchemes_ReturnsFalse(value: "http://")
✅ IsValid_WhenValueContainsSchemes_ReturnsFalse(value: "https://")
✅ IsValid_WhenValueDoesNotContainHtmlTags_ReturnsTrue
✅ IsValid_WhenValueIsNotString_ThrowsArgumentException
✅ IsValid_WhenValueIsNull_ReturnsTrue

✅ Passwordless.Common.Tests.Validation.RegularExpressionCollectionAttributeTests

✅ IsValid_Returns_False_WhenRegularExpressionDoesNotMatch
✅ IsValid_Returns_True_WhenInputIsNull
✅ IsValid_Returns_True_WhenRegularExpressionMatches

✅ tests/Service.Tests/TestResults/pw-test-results.trx

38 tests were completed in 10s with 38 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Passwordless.Service.Tests.Implementations.ApplicationServiceTests 5✅ 78ms
Passwordless.Service.Tests.Implementations.Fido2ServiceTests 3✅ 325ms
Passwordless.Service.Tests.Implementations.SharedManagementServiceTests 14✅ 421ms
Passwordless.Service.Tests.Implementations.TokenServiceTests 1✅ 201ms
Passwordless.Service.Tests.MDS.CacheHandlerTests 3✅ 400ms
Passwordless.Service.Tests.Models.ApiDescTests 2✅ 24ms
Passwordless.Service.Tests.Storage.Ef.ValueComparers.ArrayValueComparerTests 2✅ 50ms
Passwordless.Service.Tests.Storage.Ef.ValueComparers.NullableArrayValueComparerTests 3✅ 1ms
Passwordless.Service.Tests.Validation.RegisterTokenValidatorTests 5✅ 238ms

✅ Passwordless.Service.Tests.Implementations.ApplicationServiceTests

✅ AddAuthenticatorsAsync_Returns_ExpectedResult
✅ AddAuthenticatorsAsync_Throws_ApiException_WhenAuthenticatorDoesNotExist(isAllowed: False)
✅ AddAuthenticatorsAsync_Throws_ApiException_WhenAuthenticatorDoesNotExist(isAllowed: True)
✅ SetFeaturesAsync_Returns_ExpectedResult
✅ SetFeaturesAsync_Throws_ApiException_WhenPayloadIsNull

✅ Passwordless.Service.Tests.Implementations.Fido2ServiceTests

✅ CreateRegisterToken_Throws_ApiException_WhenMaxUsersExceededForNewUser
✅ CreateRegisterToken_Works_WhenMaxUsersExceededForExistingUser
✅ CreateRegisterToken_Works_WhenMaxUsersNotExceeded

✅ Passwordless.Service.Tests.Implementations.SharedManagementServiceTests

✅ DeleteApplicationAsync_Deletes_Immediately_WhenDeletedAtIsSetInThePast
✅ DeleteApplicationAsync_Throws_ApiException_WhenAppNotFound
✅ DeleteApplicationAsync_Throws_ApiException_WhenDeletedAtIsSetInTheFuture
✅ ListApiKeysAsync_Returns_ExpectedResult
✅ ListApplicationsPendingDeletionAsync_Returns_ExpectedResult
✅ MarkDeleteApplicationAsync_Deletes_Immediately_WhenLessThan3DaysOld
✅ MarkDeleteApplicationAsync_Deletes_Immediately_WhenNoUsers
✅ MarkDeleteApplicationAsync_Deletes_Scheduled_WhenMoreThan3DaysOld
✅ MarkDeleteApplicationAsync_Deletes_Scheduled_WhenUsers
✅ MarkDeleteApplicationAsync_Throws_ApiException_WhenAppNotFound
✅ SetFeaturesAsync_Returns_ExpectedResult
✅ SetFeaturesAsync_Throws_ApiException_WhenAppIdIsNull
✅ SetFeaturesAsync_Throws_ApiException_WhenPayloadIsNull
✅ SetFeaturesAsync_Throws_ApiException_WhenTenantsIsEmpty

✅ Passwordless.Service.Tests.Implementations.TokenServiceTests

✅ Test

✅ Passwordless.Service.Tests.MDS.CacheHandlerTests

✅ CacheHandler_Returns_ContentFromFile_WhenHttpRequestExceptionWasThrown
✅ CacheHandler_Returns_ContentFromFile_WhenReceivingUnsuccessfulStatusCode
✅ CacheHandler_Returns_ContentFromMDS_WhenReceivingSuccessfulStatusCode

✅ Passwordless.Service.Tests.Models.ApiDescTests

✅ MaskedApiKey_Returns_ExpectedResultForPublicKey
✅ MaskedApiKey_Returns_ExpectedResultForSecretKey

✅ Passwordless.Service.Tests.Storage.Ef.ValueComparers.ArrayValueComparerTests

✅ NullableArrayValueComparer_ComparingDifferentArrays_ReturnsExpectedResult
✅ NullableArrayValueComparer_ComparingSameArrays_ReturnsExpectedResult

✅ Passwordless.Service.Tests.Storage.Ef.ValueComparers.NullableArrayValueComparerTests

✅ NullableArrayValueComparer_ComparingDifferentArrays_ReturnsExpectedResult
✅ NullableArrayValueComparer_ComparingSameArrays_ReturnsExpectedResult
✅ NullableArrayValueComparer_Should_Compare_Nullable_Arrays

✅ Passwordless.Service.Tests.Validation.RegisterTokenValidatorTests

✅ Validate_GivenUtcNow_WhenTokenExpiredNow_ThenShouldNotThrow
✅ Validate_GivenUtcNow_WhenTokenExpiredThirtySecondsAgo_ThenApiExceptionThrowsWithMessage
✅ Validate_GivenUtcNow_WhenTokenIsNotExpired_ThenShouldNotThrow
✅ ValidateAttestation_Throws_ApiException_WhenAttestationNotAllowedForPlan
✅ ValidateAttestation_Throws_ApiException_WhenAttestationTypeIsEnterprise