Skip to content

Commit

Permalink
chore: Bump Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Dec 22, 2023
1 parent eb3511c commit 1767abc
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.15.0.81779">
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.16.0.82469">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions src/LinkDotNet.Blog.Web/LinkDotNet.Blog.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="7.1.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.0" />
<PackageReference Include="Blazored.Toast" Version="4.1.0" />
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" PrivateAssets="all" />
<PackageReference Include="Markdig" Version="0.33.0" />
<PackageReference Include="Markdig" Version="0.34.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
Expand Down
4 changes: 2 additions & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup Condition="$(MSBuildProjectName) != 'LinkDotNet.Blog.TestUtilities'">
<PackageReference Include="bunit" Version="1.25.3" />
<PackageReference Include="bunit" Version="1.26.64" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
Expand All @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.15.0.81779">
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.16.0.82469">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Linq;
using System.Threading.Tasks;
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Domain;
using LinkDotNet.Blog.Infrastructure.Persistence;
using LinkDotNet.Blog.Infrastructure.Persistence.Sql;
Expand Down Expand Up @@ -94,7 +93,7 @@ public async Task ShouldShowTotalClickCount()
var cut = ctx.RenderComponent<VisitCountPerPage>();

cut.WaitForState(() => cut.FindAll("td").Any());
cut.Find("#total-clicks").Unwrap().TextContent.Should().Be("4 clicks in total");
cut.Find("#total-clicks").TextContent.Should().Be("4 clicks in total");
}

private void RegisterRepositories(TestContextBase ctx)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Linq;
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Domain;
using LinkDotNet.Blog.Web;
using LinkDotNet.Blog.Web.Features.Home.Components;
Expand Down Expand Up @@ -79,7 +78,7 @@ public void ShouldShowBrandImageIfAvailable()
var cut = RenderComponent<NavMenu>();

var brandImage = cut.Find(".nav-brand img");
var image = brandImage.Unwrap() as IHtmlImageElement;
var image = brandImage as IHtmlImageElement;
image.Should().NotBeNull();
image.Source.Should().Be("http://localhost/img.png");
}
Expand All @@ -104,7 +103,7 @@ public void ShouldShowBlogNameWhenNotBrand(string brandUrl)
var cut = RenderComponent<NavMenu>();

var brandImage = cut.Find(".nav-brand");
var image = brandImage.Unwrap() as IHtmlAnchorElement;
var image = brandImage as IHtmlAnchorElement;
image.Should().NotBeNull();
image.TextContent.Should().Be("Steven");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Domain;
using LinkDotNet.Blog.TestUtilities;
using LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Components;
Expand Down Expand Up @@ -242,7 +241,7 @@ public void GivenBlogPost_WhenEnteringScheduledDate_ThenIsPublishedSetToFalse()

cut.Find("#scheduled").Change("01/01/2099 00:00");

var element = cut.Find("#published").Unwrap() as IHtmlInputElement;
var element = cut.Find("#published") as IHtmlInputElement;
element.IsChecked.Should().BeFalse();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Linq;
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Web.Features.Components;

namespace LinkDotNet.Blog.UnitTests.Web.Features.Components;
Expand Down Expand Up @@ -30,7 +29,7 @@ public void ShouldOfferOnlyImageWhenNoFallbackProvided()
var cut = RenderComponent<PreviewImage>(ps => ps
.Add(p => p.PreviewImageUrl, "http://image.png/"));

var image = cut.Find("img").Unwrap() as IHtmlImageElement;
var image = cut.Find("img") as IHtmlImageElement;

image.Should().NotBeNull();
image.Source.Should().Be("http://image.png/");
Expand Down Expand Up @@ -62,7 +61,7 @@ public void ShouldSetLazyLoadBehaviorNoFallback(bool lazyLoad, string expectedLa
.Add(p => p.PreviewImageUrl, "http://image.png/")
.Add(p => p.LazyLoadImage, lazyLoad));

var image = cut.Find("img").Unwrap() as IHtmlImageElement;
var image = cut.Find("img") as IHtmlImageElement;

image.Attributes.FirstOrDefault(a => a.Name == "loading").Value.Should().Be(expectedLazy);
}
Expand Down Expand Up @@ -109,7 +108,7 @@ public void ShouldSetDecodingBehaviorNoFallback(bool lazyLoad, string expectedBe
.Add(p => p.PreviewImageUrl, "http://image.png/")
.Add(p => p.LazyLoadImage, lazyLoad));

var image = cut.Find("img").Unwrap() as IHtmlImageElement;
var image = cut.Find("img") as IHtmlImageElement;

image.Attributes.FirstOrDefault(a => a.Name == "decoding").Value.Should().Be(expectedBehaviour);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Web.Features.Home.Components;

namespace LinkDotNet.Blog.UnitTests.Web.Features.Home.Components;
Expand Down Expand Up @@ -37,7 +36,7 @@ public void LoginShouldHaveCurrentUriAsRedirectUri()
var cut = RenderComponent<AccessControl>(
p => p.Add(s => s.CurrentUri, currentUri));

((IHtmlAnchorElement)cut.Find("a:contains('Log in')").Unwrap()).Href.Should().Contain(currentUri);
((IHtmlAnchorElement)cut.Find("a:contains('Log in')")).Href.Should().Contain(currentUri);
}

[Fact]
Expand All @@ -49,6 +48,6 @@ public void LogoutShouldHaveCurrentUriAsRedirectUri()
var cut = RenderComponent<AccessControl>(
p => p.Add(s => s.CurrentUri, currentUri));

((IHtmlAnchorElement)cut.Find("a:contains('Log out')").Unwrap()).Href.Should().Contain(currentUri);
((IHtmlAnchorElement)cut.Find("a:contains('Log out')")).Href.Should().Contain(currentUri);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Linq;
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Web.Features.Home.Components;

namespace LinkDotNet.Blog.UnitTests.Web.Features.Home.Components;
Expand All @@ -14,7 +13,7 @@ public void ShouldShowHrefWhenNotEmpty()
.Add(p => p.Href, "http://url/")
.Add(p => p.CssClass, "page"));

var anchor = cut.Find("a").Unwrap() as IHtmlAnchorElement;
var anchor = cut.Find("a") as IHtmlAnchorElement;
anchor.Should().NotBeNull();
anchor.Href.Should().Be("http://url/");
anchor.GetAttribute("class").Should().Be("page");
Expand All @@ -27,7 +26,7 @@ public void ShouldNotShowHrefWhenEmpty()
.Add(p => p.Href, string.Empty)
.Add(p => p.CssClass, "page"));

var anchor = cut.Find("a").Unwrap() as IHtmlAnchorElement;
var anchor = cut.Find("a") as IHtmlAnchorElement;
anchor.Should().NotBeNull();
anchor.Attributes.Any(a => a.Name == "href").Should().BeFalse();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Web.Features.ShowBlogPost.Components;

namespace LinkDotNet.Blog.UnitTests.Web.Features.ShowBlogPost.Components;
Expand All @@ -12,7 +11,7 @@ public void ShouldSetUrlCorrect()
var cut = RenderComponent<GithubSponsor>(
p => p.Add(g => g.Name, "linkdotnet"));

var anchor = cut.Find("a").Unwrap() as IHtmlAnchorElement;
var anchor = cut.Find("a") as IHtmlAnchorElement;
anchor.Should().NotBeNull();
anchor.Href.Should().Be("https://github.com/sponsors/linkdotnet");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Web.Features.ShowBlogPost.Components;

namespace LinkDotNet.Blog.UnitTests.Web.Features.ShowBlogPost.Components;
Expand All @@ -11,6 +10,6 @@ public void ShouldSetToken()
{
var cut = RenderComponent<Kofi>(p => p.Add(s => s.KofiToken, "Token"));

((IHtmlAnchorElement)cut.Find("a").Unwrap()).Href.Should().Contain("https://ko-fi.com/Token");
((IHtmlAnchorElement)cut.Find("a")).Href.Should().Contain("https://ko-fi.com/Token");
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using LinkDotNet.Blog.Web.Features.ShowBlogPost.Components;

namespace LinkDotNet.Blog.UnitTests.Web.Features.ShowBlogPost.Components;
Expand All @@ -12,7 +11,7 @@ public void ShouldSetUrlCorrect()
var cut = RenderComponent<Patreon>(
p => p.Add(s => s.PatreonName, "linkdotnet"));

var anchor = cut.Find("a").Unwrap() as IHtmlAnchorElement;
var anchor = cut.Find("a") as IHtmlAnchorElement;

anchor.Should().NotBeNull();
anchor.Href.Should().Be("https://www.patreon.com/linkdotnet");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using Blazored.Toast.Services;
using LinkDotNet.Blog.Web.Features.ShowBlogPost.Components;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -32,7 +31,7 @@ public void ShouldShareToLinkedIn()

var cut = RenderComponent<ShareBlogPost>();

var linkedInShare = (IHtmlAnchorElement)cut.Find("#share-linkedin").Unwrap();
var linkedInShare = (IHtmlAnchorElement)cut.Find("#share-linkedin");
linkedInShare.Href.Should().Be("https://www.linkedin.com/shareArticle?mini=true&url=http://localhost/blogPost/1");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Threading.Tasks;
using AngleSharp.Html.Dom;
using AngleSharpWrappers;
using Blazored.Toast.Services;
using LinkDotNet.Blog.Domain;
using LinkDotNet.Blog.Infrastructure.Persistence;
Expand Down Expand Up @@ -92,7 +91,7 @@ public void ShowTagWithLinksWhenAvailable()
var cut = RenderComponent<ShowBlogPostPage>(
p => p.Add(s => s.BlogPostId, "1"));

var aElement = cut.Find(".goto-tag").Unwrap() as IHtmlAnchorElement;
var aElement = cut.Find(".goto-tag") as IHtmlAnchorElement;
aElement.Should().NotBeNull();
aElement.Href.Should().Contain("/searchByTag/tag1");
}
Expand Down

0 comments on commit 1767abc

Please sign in to comment.