Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public override Task InitializeAsync()

[Theory]
[MemberData(nameof(InitializerTestData))]
public void InitializersRunsModernCallbacksByDefaultWhenPresent(bool streaming, bool webassembly, bool server, List<string> expectedInvokedCallbacks)
public void InitializersRunsModernCallbacksByDefaultWhenPresent(bool streaming, bool webassembly, bool server, string[] expectedInvokedCallbacks)
{
var url = $"{ServerPathBase}/initializers?streaming={streaming}&wasm={webassembly}&server={server}";
Navigate(url);
Expand All @@ -38,7 +38,7 @@ public void InitializersRunsModernCallbacksByDefaultWhenPresent(bool streaming,
Browser.Exists(By.Id(callback));
}

Browser.Equal(expectedInvokedCallbacks.Count, () => Browser.FindElements(By.CssSelector("#initializers-content > p")).Count);
Browser.Equal(expectedInvokedCallbacks.Length, () => Browser.FindElements(By.CssSelector("#initializers-content > p")).Count);

if (server)
{
Expand All @@ -49,7 +49,7 @@ public void InitializersRunsModernCallbacksByDefaultWhenPresent(bool streaming,

[Theory]
[MemberData(nameof(InitializerTestData))]
public void InitializersRunsClassicInitializersWhenEnabled(bool streaming, bool webassembly, bool server, List<string> expectedInvokedCallbacks)
public void InitializersRunsClassicInitializersWhenEnabled(bool streaming, bool webassembly, bool server, string[] expectedInvokedCallbacks)
{
EnableClassicInitializers(Browser);
List<string> expectedCallbacks = ["classic-before-start", "classic-after-started", ..expectedInvokedCallbacks];
Expand All @@ -76,9 +76,9 @@ private void EnableClassicInitializers(IWebDriver browser)
((IJavaScriptExecutor)browser).ExecuteScript("sessionStorage.setItem('enable-classic-initializers', 'true')");
}

public static TheoryData<bool, bool, bool, List<string>> InitializerTestData()
public static TheoryData<bool, bool, bool, string[]> InitializerTestData()
{
var result = new TheoryData<bool, bool, bool, List<string>>
var result = new TheoryData<bool, bool, bool, string[]>
{
{ false, false, false, ["classic-and-modern-before-web-start", "classic-and-modern-after-web-started","modern-before-web-start", "modern-after-web-started"] },
{ false, false, true, ["classic-and-modern-before-web-start", "classic-and-modern-after-web-started", "classic-and-modern-before-server-start", "classic-and-modern-after-server-started", "classic-and-modern-circuit-opened", "modern-before-web-start", "modern-after-web-started", "modern-before-server-start", "modern-after-server-started", "modern-circuit-opened" ] },
Expand Down