Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom event args: support receiving IJSObjectReference #31591

Merged
merged 5 commits into from
Apr 8, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add E2E test
  • Loading branch information
SteveSandersonMS committed Apr 7, 2021
commit 6a78b55e1f6579daac9857fca409fa65e4bf724a
8 changes: 8 additions & 0 deletions src/Components/test/E2ETest/Tests/EventCustomArgsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ public void CanAliasBrowserEvent_WithoutAnyNativeListenerForBrowserEvent()
Browser.True(() => GetLogLines().Contains("Received custom mouseover event"));
}

[Fact]
public void CanRegisterCustomEventAndSupplyIJSObjectReference()
{
Browser.Exists(By.Id("register-sendjsobject")).Click();
Browser.FindElement(By.Id("trigger-sendjsobject-event-directly")).Click();
Browser.Equal("Event with IJSObjectReference received: Hello!", () => GetLogLines().Single());
}

void SendKeysSequentially(IWebElement target, string text)
{
foreach (var c in text)
Expand Down