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 @@ -63,20 +63,16 @@ public async Task SignalRPassMessages(string config, string transport)
}

if (msg.Text.Contains("Finished GetQueryParameters"))
{
// first click after render - make sure buttons are available
await page.WaitForSelectorAsync("button#connectButton");
await page.ClickAsync("button#connectButton");
}
await SaveClickButtonAsync(page, "button#connectButton");

if (msg.Text.Contains("SignalR connected"))
await page.ClickAsync("button#subscribeButton");
await SaveClickButtonAsync(page, "button#subscribeButton");

if (msg.Text.Contains("Subscribed to ReceiveMessage"))
await page.ClickAsync("button#sendMessageButton");
await SaveClickButtonAsync(page, "button#sendMessageButton");

if (msg.Text.Contains("ReceiveMessage from server"))
await page.ClickAsync("button#exitProgramButton");
await SaveClickButtonAsync(page, "button#exitProgramButton");
}
));

Expand All @@ -95,4 +91,10 @@ private string GetThreadOfAction(string testOutput, string pattern, string actio
Assert.True(match.Success, $"Expected to find a log that {actionDescription}. TestOutput: {testOutput}.");
return match.Groups[1].Value ?? "";
}

private async Task SaveClickButtonAsync(IPage page, string selector)
{
await page.WaitForSelectorAsync(selector);
await page.ClickAsync(selector);
}
}