Skip to content

Commit

Permalink
DYN-8461: Publishing a new version of a package should reflect correc…
Browse files Browse the repository at this point in the history
…t version number (#15914)
  • Loading branch information
zeusongit authored Mar 10, 2025
1 parent b19e0b0 commit a9a909a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,8 @@ private void inputField_PreviewTextInput(object sender, TextCompositionEventArgs
// Handles the direct input of text (via keyboard)
private void inputField_TextChanged(object sender, TextChangedEventArgs e)
{
if (Int32.TryParse(inputField.Text, out int value))
{
Value = value.ToString();
};
Int32.TryParse(inputField.Text, out int value);
Value = value.ToString();
}

// When user clicks on the watermark label at first, hide the watermark and pass the focus to the input textbox
Expand Down
12 changes: 12 additions & 0 deletions test/DynamoCoreWpf2Tests/PackageManager/PackageManagerUITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,18 @@ public void PackagePublishNumericUpDownAllowsOnlyPositiveIntegerValues()

isValidOutput = updownControl.IsValidInput("1");
Assert.IsTrue(isValidOutput, "Should allow positive integers in numeric input.");

// Arrange
var inputField = updownControl.inputField;

// Act & Assert
Assert.AreEqual("0", updownControl.Value);

inputField.Text = "1";
Assert.AreEqual("1", updownControl.Value);

inputField.Text = "";
Assert.AreEqual("0", updownControl.Value);
}

[Test]
Expand Down

0 comments on commit a9a909a

Please sign in to comment.