Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/Sentry.Maui/BindableSentryMauiOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal class BindableSentryMauiOptions : BindableSentryLoggingOptions
public bool? IncludeTextInBreadcrumbs { get; set; }
public bool? IncludeTitleInBreadcrumbs { get; set; }
public bool? IncludeBackgroundingStateInBreadcrumbs { get; set; }
public bool? CreateElementEventsBreadcrumbs { get; set; } = false;
public bool? CreateElementEventsBreadcrumbs { get; set; }
public bool? AttachScreenshot { get; set; }

public void ApplyTo(SentryMauiOptions options)
Expand Down
18 changes: 18 additions & 0 deletions test/Sentry.Maui.Tests/SentryMauiAppBuilderExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,24 @@ public void UseSentry_WithCaching_CanChangeCacheDirectoryPath()
Assert.Equal(cachePath, options.CacheDirectoryPath);
}

[Fact]
public void UseSentry_CreateElementEventsBreadcrumbsSetInCode_IsNotOverwritten()
{
// Arrange
var builder = _fixture.Builder;
builder.Services.Configure<SentryMauiOptions>(options =>
{
options.CreateElementEventsBreadcrumbs = true;
});

// Act
using var app = builder.UseSentry().Build();
var options = app.Services.GetRequiredService<IOptions<SentryMauiOptions>>().Value;
Comment thread
jamescrosswell marked this conversation as resolved.
Resolved

// Assert
Assert.True(options.CreateElementEventsBreadcrumbs);
}

[Fact]
public void UseSentry_DebugFalse_LoggerLeftDefault()
{
Expand Down
Loading