Skip to content

Commit

Permalink
Adding test to validate that index does not change on next within wiz…
Browse files Browse the repository at this point in the history
…ard component
  • Loading branch information
ErikJohnsonLRS committed Jul 11, 2024
1 parent 721edbb commit b433242
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Core/Wizard/FluentWizardTests.razor
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@
[Fact]
public void FluentWizard_EditForm_EditContextIsInValid_OnNext()
{
int stepIndex = 0;

var testRecord1 = new TestRecord
{
NumberBetween1and10 = 15,
Expand All @@ -331,9 +333,9 @@
var testRecord2 = new TestRecord
{
NumberBetween1and10 = 15,
};
};

var cut = Render(@<FluentWizard OnFinish="OnFinishHandler">
var cut = Render(@<FluentWizard OnFinish="OnFinishHandler" @bind-Value="@stepIndex">
<Steps>
<FluentWizardStep>
<FluentEditForm Model="testRecord1">
Expand Down Expand Up @@ -367,9 +369,11 @@
void OnFinishHandler()
{
finishHandled = true;

}

Assert.False(finishHandled);
Assert.Equal(0, stepIndex);
}

[Fact]
Expand Down

0 comments on commit b433242

Please sign in to comment.