Rows = Enumerable.Range(1, 60).Select(index => new Row($"Row {index}")).ToArray().AsQueryable();
+
+ internal sealed record Row(string Name);
+}
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/ComponentChecks.cs b/tests/e2e/Forma.Blazor.Browser.Tests/ComponentChecks.cs
index 99f006015..55bd9e271 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/ComponentChecks.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/ComponentChecks.cs
@@ -290,24 +290,30 @@ public static async Task WaitForObservationAsync(IPage page, string selector, st
/// The page read.
/// The data view's selector.
/// A task that completes once the region is no longer busy.
- /// It waits as long as a wait for a script's first answer does.
- public static Task WaitForDataViewAsync(IPage page, string selector)
+ ///
+ /// It waits as long as a wait for a script's first answer does, reading the region in the page, since an assertion that finds
+ /// it still busy describes the whole view, hundreds of items on some pages, and holds the page from drawing the answer it waits for.
+ ///
+ public static async Task WaitForDataViewAsync(IPage page, string selector)
{
ArgumentNullException.ThrowIfNull(page);
- return Assertions.Expect(page.Locator(selector).Locator(".forma-data-view-region").First).Not.ToHaveAttributeAsync("aria-busy", "true", new() { Timeout = 30000 });
+ await page.WaitForFunctionAsync("selector => { const region = document.querySelector(selector)?.querySelector('.forma-data-view-region'); return region != null && region.getAttribute('aria-busy') !== 'true'; }", selector, new() { Timeout = 30000 }).ConfigureAwait(false);
}
/// Waits until the first node of the tree names is enabled, which its nodes are once the tree's keys and its data view's script have attached.
/// The page read.
/// The tree's selector.
/// A task that completes once the tree's first node is enabled.
- /// It waits as long as a wait for a script's first answer does.
- public static Task WaitForTreeAsync(IPage page, string selector)
+ ///
+ /// It waits as long as a wait for a script's first answer does, reading the node in the page, as
+ /// reads its region, a node disabled by itself or by any element holding it.
+ ///
+ public static async Task WaitForTreeAsync(IPage page, string selector)
{
ArgumentNullException.ThrowIfNull(page);
- return Assertions.Expect(page.Locator(selector).GetByRole(AriaRole.Treeitem).First).ToBeEnabledAsync(new() { Timeout = 30000 });
+ await page.WaitForFunctionAsync("selector => { const node = document.querySelector(selector)?.querySelector('[role=treeitem]'); return node != null && node.closest('[aria-disabled=true]') === null; }", selector, new() { Timeout = 30000 }).ConfigureAwait(false);
}
/// Waits until the rich text canvas inside the element names is enabled, which it is once its edits have attached.
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/Components/DataViewTests.cs b/tests/e2e/Forma.Blazor.Browser.Tests/Components/DataViewTests.cs
index eaca041b3..d145ab915 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/Components/DataViewTests.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/Components/DataViewTests.cs
@@ -704,6 +704,26 @@ public async Task Should_keep_the_current_folder_the_open_folders_the_selection_
}
}
+ public sealed class DataViewPage(BrowserHost host)
+ {
+ [Theory]
+ [MemberData(nameof(Runtimes), MemberType = typeof(ComponentChecks))]
+ public async Task Should_let_the_wheel_over_its_rows_scroll_the_page_it_grows_with(string runtime)
+ {
+ // Arrange — the pointer over a row of a view as tall as its rows
+ var (context, page) = await OpenAsync(host, runtime, "data-view-page");
+ await using var _ = context;
+ await WaitForDataViewAsync(page, "#check");
+ await page.Locator("#check tbody tr").Nth(2).HoverAsync();
+
+ // Act
+ await page.Mouse.WheelAsync(0, 300);
+
+ // Assert
+ await page.WaitForFunctionAsync("() => window.scrollY > 0");
+ }
+ }
+
public sealed class DataViewTabOrder(BrowserHost host)
{
[Theory]
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/Components/ExplorerTests.cs b/tests/e2e/Forma.Blazor.Browser.Tests/Components/ExplorerTests.cs
index ce676388f..de83fbf0e 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/Components/ExplorerTests.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/Components/ExplorerTests.cs
@@ -573,5 +573,23 @@ await page.WaitForFunctionAsync(
() => Assert.True(overHeader.Length == 0, $"Standing over the header's bottom edge: {string.Join(", ", overHeader)}"));
await Assertions.Expect(page.Locator("#check .forma-data-card-name")).ToHaveCountAsync(200);
}
+
+ [Theory]
+ [MemberData(nameof(ComponentChecks.Runtimes), MemberType = typeof(ComponentChecks))]
+ public async Task Should_let_the_wheel_over_its_items_scroll_the_page_on_a_phone(string runtime)
+ {
+ // Arrange — the pointer over an item of the explorer flowing in a phone's page
+ var (context, page) = await ComponentChecks.OpenAsync(host, runtime, "explorer-page");
+ await using var _ = context;
+ await page.SetViewportSizeAsync(360, 640);
+ await ComponentChecks.WaitForDataViewAsync(page, "#check");
+ await page.Locator("#check .forma-data-card-name").First.HoverAsync();
+
+ // Act
+ await page.Mouse.WheelAsync(0, 300);
+
+ // Assert
+ await page.WaitForFunctionAsync("() => window.scrollY > 0");
+ }
}
}
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs b/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs
index ee8cb03fd..c1127f060 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs
@@ -24,10 +24,52 @@ public sealed class TransferTests
private static string Describe(string value)
=> $"{value.Length}:{Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(value)))[..16]}";
+ // Each field of the page's two forms, how many characters the browser holds in it and whether its edits listen, and how many saves ran.
+ private const string DescribeFields = """
+ async () => {
+ window.formaDomEngine ??= await import(new URL('_content/forma/browser/scripts/DomEngine.js', document.baseURI).href);
+ const fields = ['#forma-notes', '#forma-code', '#forma-body .forma-composer-rich-text-canvas', '#host-name', '#host-notes'].map(selector => {
+ const field = document.querySelector(selector);
+ if (!field) {
+ return `${selector} isn't drawn`;
+ }
+
+ const length = 'value' in field ? field.value.length : field.innerHTML.length;
+ const listens = window.formaDomEngine.describe(field).capabilities.includes('edits');
+ return `${selector} holds ${length} characters, its edits ${listens ? 'listening' : 'not listening'}`;
+ });
+ return [...fields, `${document.getElementById('saves')?.textContent} saves ran`].join('; ');
+ }
+ """;
+
// The document of two megabytes, every word of it the one given.
private static string CreateDocument(string word)
=> string.Concat(Enumerable.Repeat($"{string.Join(' ', Enumerable.Repeat(word, ParagraphWords))}
", Paragraphs));
+ // Waits for what a save leaves on the page, failing with what each field holds in the browser and whether its edits listen.
+ private static async Task ExpectSavedAsync(IPage page, Func expectation)
+ {
+ try
+ {
+ await expectation();
+ }
+ catch (PlaywrightException exception)
+ {
+ string fields;
+
+ try
+ {
+ fields = await page.EvaluateAsync(DescribeFields).WaitAsync(TimeSpan.FromSeconds(5));
+ }
+ catch (TimeoutException)
+ {
+ fields = "the page didn't answer a script within five seconds, its main thread held";
+ }
+
+ Assert.Fail($"{exception.Message}{Environment.NewLine}The forms' fields: {fields}");
+ }
+ }
+
public sealed class Forms(BrowserHost host)
{
[Theory]
@@ -46,7 +88,7 @@ public async Task Should_save_a_text_of_megabytes_through_a_form_of_forma_own(st
await page.Locator("#forma-save").ClickAsync();
// Assert
- await Assertions.Expect(page.Locator("#forma-notes-saved")).ToHaveTextAsync(Describe(notes), Reached);
+ await ExpectSavedAsync(page, () => Assertions.Expect(page.Locator("#forma-notes-saved")).ToHaveTextAsync(Describe(notes), Reached));
await Assertions.Expect(page.Locator("#saves")).ToHaveTextAsync("1");
}
@@ -65,7 +107,7 @@ public async Task Should_save_the_last_word_typed_into_the_rich_text_editor_insi
await page.Locator("#forma-save").ClickAsync();
// Assert
- await Assertions.Expect(page.Locator("#forma-body-end")).ToContainTextAsync("Hello world");
+ await ExpectSavedAsync(page, () => Assertions.Expect(page.Locator("#forma-body-end")).ToContainTextAsync("Hello world"));
}
[Theory]
@@ -84,7 +126,7 @@ public async Task Should_save_a_document_of_megabytes_pasted_into_the_rich_text_
await page.Locator("#forma-save").ClickAsync();
// Assert
- await Assertions.Expect(page.Locator("#forma-body-saved")).ToHaveTextAsync(Describe(document), Reached);
+ await ExpectSavedAsync(page, () => Assertions.Expect(page.Locator("#forma-body-saved")).ToHaveTextAsync(Describe(document), Reached));
}
[Theory]
@@ -105,7 +147,7 @@ public async Task Should_submit_a_text_of_megabytes_with_enter_through_a_form_of
await page.Locator("#host-name").PressAsync("Enter");
// Assert
- await Assertions.Expect(page.Locator("#host-saved")).ToHaveTextAsync($"Ada {Describe(notes)}", Reached);
+ await ExpectSavedAsync(page, () => Assertions.Expect(page.Locator("#host-saved")).ToHaveTextAsync($"Ada {Describe(notes)}", Reached));
await Assertions.Expect(page.Locator("#saves")).ToHaveTextAsync("1");
}
@@ -133,7 +175,7 @@ public async Task Should_run_no_save_while_a_text_did_not_arrive_and_save_once_i
await page.Locator("#forma-save").ClickAsync();
// Assert
- await Assertions.Expect(page.Locator("#saves")).ToHaveTextAsync("1");
+ await ExpectSavedAsync(page, () => Assertions.Expect(page.Locator("#saves")).ToHaveTextAsync("1"));
}
}
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/ScriptHold.cs b/tests/e2e/Forma.Blazor.Browser.Tests/ScriptHold.cs
index b5908636d..7d7ccef68 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/ScriptHold.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/ScriptHold.cs
@@ -1,11 +1,12 @@
namespace Forma.Blazor.Browser.Tests;
using System.Collections.Concurrent;
+using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
/// The hold an early run keeps on a page's Forma scripts: each one the page requests once its runtime starts connecting waits until half a second after the page takes its first press, key or input, or two seconds after the page becomes interactive where it takes none.
-/// Blazor starts only once Forma's JavaScript initializers and what they import have loaded, the Server's before its circuit connects and WebAssembly's as its runtime loads, so an initializer passes, and so does each script it imports, directly or through the scripts it imports, read from each one's text as it passes. What's held is what a component imports as it attaches, the input router's, the DOM watcher's and engine's and its own. The page reports its first input from the capture phase of the window's listeners, ahead of any of its own. Once released, the page's scripts go unrouted, so the modules they import load as in a plain run.
+/// Blazor starts only once Forma's JavaScript initializers and what they import have loaded, the Server's before its circuit connects and WebAssembly's as its runtime loads, so an initializer passes, and so does each script it imports, directly or through the scripts it imports, read from each one's text as it passes. What's held is what a component imports as it attaches, the input router's, the DOM watcher's and engine's and its own. The page reports its first input from the capture phase of the window's listeners, ahead of any of its own. Once released, each script held goes on and then the page's scripts go unrouted, so the modules they import load as in a plain run. As the page closes, the hold writes to the check's output when it took the page's first input, when it released the scripts and which were still loading.
public sealed partial class ScriptHold
{
// Reports the page's first press, key or input to the hold, ahead of every listener of the page's own.
@@ -26,8 +27,13 @@ public sealed partial class ScriptHold
private readonly IPage _page;
private readonly TaskCompletionSource _released = new(TaskCreationOptions.RunContinuationsAsynchronously);
private readonly ConcurrentDictionary _startScripts = new(StringComparer.Ordinal);
+ private readonly ConcurrentDictionary _routings = new();
+ private readonly ConcurrentDictionary _loadingScripts = new();
+ private readonly Stopwatch _clock = Stopwatch.StartNew();
private int _isConnecting;
private int _hasTakenInput;
+ private long _firstInputAt = -1;
+ private long _releasedAt = -1;
private ScriptHold(IPage page)
{
@@ -62,6 +68,7 @@ public static async Task InstallAsync(IPage page)
ArgumentNullException.ThrowIfNull(page);
var hold = new ScriptHold(page);
+ var output = TestContext.Current.TestOutputHelper;
Holds.Add(page, hold);
page.Request += (_, request) =>
{
@@ -69,10 +76,18 @@ public static async Task InstallAsync(IPage page)
{
Interlocked.Exchange(ref hold._isConnecting, 1);
}
+
+ if (FormaScript().IsMatch(request.Url))
+ {
+ hold._loadingScripts[request] = hold._clock.ElapsedMilliseconds;
+ }
};
+ page.RequestFinished += (_, request) => hold._loadingScripts.TryRemove(request, out long _);
+ page.RequestFailed += (_, request) => hold._loadingScripts.TryRemove(request, out long _);
+ page.Close += (_, _) => hold.Report(output);
await page.ExposeFunctionAsync("formaTookInput", hold.TakeInput).ConfigureAwait(false);
await page.AddInitScriptAsync(ReportFirstInput).ConfigureAwait(false);
- await page.RouteAsync(FormaScript(), hold.RouteAsync).ConfigureAwait(false);
+ await page.RouteAsync(FormaScript(), hold.RouteTrackedAsync).ConfigureAwait(false);
return hold;
}
@@ -89,6 +104,22 @@ private static bool IsRuntimeConnecting(string address)
private static string GetScriptAddress(string address)
=> Fingerprint().Replace(new Uri(address).GetLeftPart(UriPartial.Path), string.Empty);
+ // A script's routing is kept until it ends, so the release lets every script held go on before the route goes.
+ private async Task RouteTrackedAsync(IRoute route)
+ {
+ var routing = RouteAsync(route);
+ _routings.TryAdd(routing, true);
+
+ try
+ {
+ await routing.ConfigureAwait(false);
+ }
+ finally
+ {
+ _routings.TryRemove(routing, out _);
+ }
+ }
+
// A script an initializer imports, directly or through another, passes, read for the scripts it imports in turn; any other waits
// while the hold holds it.
private async Task RouteAsync(IRoute route)
@@ -122,6 +153,7 @@ private void TakeInput()
{
if (Interlocked.Exchange(ref _hasTakenInput, 1) == 0)
{
+ Interlocked.Exchange(ref _firstInputAt, _clock.ElapsedMilliseconds);
_ = ReleaseAfterAsync(InputGrace);
}
}
@@ -142,7 +174,8 @@ private async Task ReleaseAfterAsync(TimeSpan delay)
await ReleaseAsync().ConfigureAwait(false);
}
- // The scripts held go on, and every script requested after them goes unrouted, the page closing meanwhile ending nothing.
+ // The scripts held go on, and once each has, every script requested after them goes unrouted, the page closing meanwhile ending
+ // nothing; a route taken away while a script held still waits on it would leave that script unanswered.
private async Task ReleaseAsync()
{
if (!_released.TrySetResult())
@@ -150,6 +183,9 @@ private async Task ReleaseAsync()
return;
}
+ Interlocked.Exchange(ref _releasedAt, _clock.ElapsedMilliseconds);
+ await Task.WhenAll(_routings.Keys).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
+
try
{
await _page.UnrouteAsync(FormaScript()).ConfigureAwait(false);
@@ -159,6 +195,24 @@ private async Task ReleaseAsync()
}
}
+ // When the hold took the page's first input and released its scripts, and which of them were still loading, since the page opened.
+ private void Report(ITestOutputHelper? output)
+ {
+ var firstInputAt = Interlocked.Read(ref _firstInputAt);
+ var releasedAt = Interlocked.Read(ref _releasedAt);
+ var loading = _loadingScripts.OrderBy(script => script.Value).Select(script => $"{new Uri(script.Key.Url).Segments[^1]} from {script.Value} ms").ToList();
+ var report = $"The hold took the page's first input {(firstInputAt < 0 ? "at no time" : $"at {firstInputAt} ms")} and released its scripts {(releasedAt < 0 ? "at no time" : $"at {releasedAt} ms")}; as the page closed {(loading.Count == 0 ? "no Forma script was still loading" : $"these were still loading: {string.Join(", ", loading)}")}.";
+
+ try
+ {
+ output?.WriteLine(report);
+ }
+ catch (InvalidOperationException)
+ {
+ // The check has ended, and its output with it.
+ }
+ }
+
// A script of Forma's, served under _content/forma/ or under its assembly's name, which the browser matches without asking the
// check, so every other request the page makes goes on unrouted.
[GeneratedRegex(@"/_content/(?:forma/|Forma\.)[^?#]*\.m?js(?:[?#]|$)")]
diff --git a/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/Forma.Framework.Themes.Blazor.Server.Integration.Tests.csproj b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/Forma.Framework.Themes.Blazor.Server.Integration.Tests.csproj
new file mode 100644
index 000000000..e8aef37ac
--- /dev/null
+++ b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/Forma.Framework.Themes.Blazor.Server.Integration.Tests.csproj
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/Support/ThemeSwitchHost.cs b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/Support/ThemeSwitchHost.cs
new file mode 100644
index 000000000..bdda0263e
--- /dev/null
+++ b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/Support/ThemeSwitchHost.cs
@@ -0,0 +1,67 @@
+namespace Forma.Framework.Themes.Blazor.Server.Integration.Tests.Support;
+
+using Forma.Framework.Localization;
+
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+
+/// An application built as a host builds one, taking theme switches on a loopback port, which validates antiforgery tokens where it is set to.
+internal sealed class ThemeSwitchHost(WebApplication application) : IAsyncDisposable
+{
+ /// Starts an application registering Forma's theme and Harbor, which calls UseAntiforgery() where .
+ public static async Task StartAsync(bool validatesTokens)
+ {
+ var builder = WebApplication.CreateBuilder();
+ builder.Logging.ClearProviders();
+ builder.WebHost.UseUrls("http://127.0.0.1:0");
+ builder.Services.AddFormaThemeServerIntegration();
+ builder.Services.AddFormaThemes(themes =>
+ {
+ themes.Add(Define("forma"));
+ themes.Add(Define("harbor"));
+ });
+
+ if (validatesTokens)
+ {
+ builder.Services.AddAntiforgery();
+ }
+
+ var application = builder.Build();
+ application.UseFormaThemes();
+
+ if (validatesTokens)
+ {
+ application.UseAntiforgery();
+ }
+
+ application.MapFormaThemes();
+ await application.StartAsync().ConfigureAwait(false);
+
+ return new ThemeSwitchHost(application);
+ }
+
+ /// Posts a switch to Harbor in its dark scheme, carrying no antiforgery token, from where says a browser sent it.
+ public async Task PostSwitchAsync(string site)
+ {
+ using var handler = new HttpClientHandler { AllowAutoRedirect = false, CheckCertificateRevocationList = true };
+ using var client = new HttpClient(handler) { BaseAddress = new Uri(application.Urls.Single()) };
+ using var request = new HttpRequestMessage(HttpMethod.Post, ThemeApplicationBuilderExtensions.SwitchPath)
+ {
+ Content = new FormUrlEncodedContent([new("theme", "harbor"), new("scheme", "dark"), new("returnUrl", "/settings")]),
+ };
+ request.Headers.Add("Sec-Fetch-Site", site);
+
+ return await client.SendAsync(request).ConfigureAwait(false);
+ }
+
+ public async ValueTask DisposeAsync()
+ {
+ await application.StopAsync().ConfigureAwait(false);
+ await application.DisposeAsync().ConfigureAwait(false);
+ }
+
+ private static ThemeDefinition Define(string name)
+ => new(name, LocalizableText.For(name), ColorSchemes.Light | ColorSchemes.Dark, $"css/{name}.css");
+}
diff --git a/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/ThemeSwitchEndpointTests.cs b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/ThemeSwitchEndpointTests.cs
new file mode 100644
index 000000000..3442f381c
--- /dev/null
+++ b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/ThemeSwitchEndpointTests.cs
@@ -0,0 +1,62 @@
+namespace Forma.Framework.Themes.Blazor.Server.Integration.Tests;
+
+using System.Net;
+
+using Forma.Framework.Themes.Blazor.Server.Integration.Tests.Support;
+
+public sealed class ThemeSwitchEndpointTests
+{
+ public sealed class FetchMetadata
+ {
+ [Fact]
+ public async Task Should_take_a_switch_without_a_token_from_the_application_s_own_page()
+ {
+ // Arrange
+ await using var host = await ThemeSwitchHost.StartAsync(validatesTokens: false);
+
+ // Act
+ using var response = await host.PostSwitchAsync("same-origin");
+
+ // Assert
+ Assert.Multiple(
+ () => Assert.Equal(HttpStatusCode.Found, response.StatusCode),
+ () => Assert.Equal("/settings", response.Headers.Location?.OriginalString),
+ () => Assert.StartsWith("forma-theme=theme%3Dharbor%26scheme%3Ddark", Assert.Single(response.Headers.GetValues("Set-Cookie")), StringComparison.Ordinal));
+ }
+
+ [Theory]
+ [InlineData("same-site")]
+ [InlineData("cross-site")]
+ public async Task Should_refuse_a_switch_another_site_posts(string site)
+ {
+ // Arrange
+ await using var host = await ThemeSwitchHost.StartAsync(validatesTokens: false);
+
+ // Act
+ using var response = await host.PostSwitchAsync(site);
+
+ // Assert
+ Assert.Multiple(
+ () => Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode),
+ () => Assert.False(response.Headers.Contains("Set-Cookie")));
+ }
+ }
+
+ public sealed class AntiforgeryTokens
+ {
+ [Fact]
+ public async Task Should_refuse_a_switch_without_a_token_from_the_application_s_own_page()
+ {
+ // Arrange
+ await using var host = await ThemeSwitchHost.StartAsync(validatesTokens: true);
+
+ // Act
+ using var response = await host.PostSwitchAsync("same-origin");
+
+ // Assert
+ Assert.Multiple(
+ () => Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode),
+ () => Assert.False(response.Headers.Contains("Set-Cookie")));
+ }
+ }
+}
diff --git a/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/_Imports.cs b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/_Imports.cs
new file mode 100644
index 000000000..c802f4480
--- /dev/null
+++ b/tests/integration/Framework/Forma.Framework.Themes.Blazor.Server.Integration.Tests/_Imports.cs
@@ -0,0 +1 @@
+global using Xunit;
diff --git a/tests/scripts/package-lock.json b/tests/scripts/package-lock.json
index 033c4cb51..94208c8e5 100644
--- a/tests/scripts/package-lock.json
+++ b/tests/scripts/package-lock.json
@@ -1205,9 +1205,9 @@
}
},
"node_modules/ws": {
- "version": "8.21.3",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz",
- "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==",
+ "version": "8.23.1",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.1.tgz",
+ "integrity": "sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==",
"dev": true,
"license": "MIT",
"engines": {