Skip to content

Commit ef8d538

Browse files
Fix MouseOverAndMouseOut_CanTrigger (#54389)
1 parent f25bf7e commit ef8d538

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Components/test/E2ETest/Tests/EventTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void MouseOverAndMouseOut_CanTrigger()
7373
var output = Browser.Exists(By.Id("output"));
7474
Assert.Equal(string.Empty, output.Text);
7575

76-
var other = Browser.Exists(By.Id("other"));
76+
var other = Browser.Exists(By.Id("mouseover_label"));
7777

7878
// Mouse over the button and then back off
7979
var actions = new Actions(Browser)
@@ -155,8 +155,6 @@ public void MouseDownAndMouseUp_CanTrigger()
155155
var output = Browser.Exists(By.Id("output"));
156156
Assert.Equal(string.Empty, output.Text);
157157

158-
var other = Browser.Exists(By.Id("other"));
159-
160158
// Mousedown
161159
var actions = new Actions(Browser).ClickAndHold(input);
162160

src/Components/test/testassets/BasicTestApp/MouseEventComponent.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
Output: <span id="output">@message</span>
88
</p>
99
<p>
10-
Mouseover: <input id="mouseover_input" type="text" @onmouseover="OnMouseEvent" @onmouseout="OnMouseEvent" />
10+
@* We use the label here as a target for the "mouseout" event *@
11+
<span id="mouseover_label">Mouseover:</span> <input id="mouseover_input" type="text" @onmouseover="OnMouseEvent" @onmouseout="OnMouseEvent" />
1112
</p>
1213
<p>
1314
Mouseenter: <input id="mouseenter_input" type="text" @onmouseenter="OnMouseEvent" @onmouseleave="OnMouseEvent" />

0 commit comments

Comments
 (0)