Skip to content

Commit

Permalink
Added UI test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasherceg committed Oct 30, 2024
1 parent cdb3cd4 commit b587cdd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<p>
<dot:CheckBox Text="Suppress postbacks" Checked="{value: Enabled}" />
</p>
<p>Counter: {{value: Counter}}</p>
<p>Counter: <span class="result">{{value: Counter}}</span></p>

<p>Click on grid rows to increment the counter.</p>

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions src/Samples/Tests/Tests/Feature/PostBackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,24 @@ public void Feature_PostBack_PostBackHandlers_Localization()
});
}

[Fact]
public void Feature_PostBack_PostBackHandlerBinding()
{
RunInAllBrowsers(browser => {
browser.NavigateToUrl(SamplesRouteUrls.FeatureSamples_PostBack_PostBackHandlerBinding);

var counter = browser.Single(".result");
AssertUI.TextEquals(counter, "0");

browser.ElementAt("td", 0).Click();
AssertUI.TextEquals(counter, "1");

browser.Single("input[type=checkbox]").Click();
browser.ElementAt("td", 0).Click();
AssertUI.TextEquals(counter, "1");
});
}

private void ValidatePostbackHandlersComplexSection(string sectionSelector, IBrowserWrapper browser)
{
IElementWrapper section = null;
Expand Down

0 comments on commit b587cdd

Please sign in to comment.