Skip to content

Commit

Permalink
try out on more UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzart90 committed May 3, 2024
1 parent f87835e commit 210ee2b
Show file tree
Hide file tree
Showing 32 changed files with 320 additions and 320 deletions.
6 changes: 3 additions & 3 deletions test/DynamoCoreWpfTests/AnnotationViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected override void GetLibrariesToPreload(List<string> libraries)
base.GetLibrariesToPreload(libraries);
}

[Test]
[TestOnSeparateThread]
public void TestAnnotationMouseClickEvent()
{
Open(@"UI\GroupTest.dyn");
Expand All @@ -73,7 +73,7 @@ public void TestAnnotationMouseClickEvent()
Assert.AreEqual(2, DynamoSelection.Instance.Selection.Count());
}

[Test]
[TestOnSeparateThread]
public void TestAnnotationOnDummyNodes()
{
Open(@"UI\GroupDummyNodes.dyn");
Expand All @@ -90,7 +90,7 @@ public void TestAnnotationOnDummyNodes()
Assert.AreEqual(1,modelCount);
}

[Test]
[TestOnSeparateThread]
public void UngroupingCollapsedGroupWillUnCollapseAllGroupContent()
{
// Arrange
Expand Down
18 changes: 9 additions & 9 deletions test/DynamoCoreWpfTests/ConnectorContextMenuTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace DynamoCoreWpfTests
{
public class ConnectorContextMenuTests: DynamoTestUIBase
{
[Test]
[TestOnSeparateThread]
public void ConstructingContextMenuTest()
{
Open(@"UI/ConnectorContextMenuTestFile.dyn");
Expand All @@ -32,7 +32,7 @@ public void ConstructingContextMenuTest()
Assert.AreEqual(connectorViewModel.MousePosition, contextMenuViewModel.CurrentPosition);
}

[Test]
[TestOnSeparateThread]
public void SetContextMenuToNullAfterUseTest()
{
Open(@"UI/ConnectorContextMenuTestFile.dyn");
Expand All @@ -46,7 +46,7 @@ public void SetContextMenuToNullAfterUseTest()
//Assert property on ConnectorViewModel is set to null.
Assert.IsNull(connectorViewModel.ConnectorContextMenuViewModel);
}
[Test]
[TestOnSeparateThread]
public void BreakConnectionFromContextMenuTest()
{
Open(@"UI/ConnectorContextMenuTestFile.dyn");
Expand All @@ -63,7 +63,7 @@ public void BreakConnectionFromContextMenuTest()
//Assert that the only connector in the model has been destroyed.
Assert.AreEqual(connectorCount-1, updatedConnectorCount);
}
[Test]
[TestOnSeparateThread]
public void SelectedConnectedFromContextMenuTest()
{
Open(@"UI/ConnectorContextMenuTestFile.dyn");
Expand All @@ -78,7 +78,7 @@ public void SelectedConnectedFromContextMenuTest()
//Assert that the selection of the two adjacent nodes is accurate.
Assert.AreEqual(DynamoSelection.Instance.Selection.Count, initialSelectedCount + 2);
}
[Test]
[TestOnSeparateThread]
public void HideConnectorFromContextMenuTest()
{
Open(@"UI/ConnectorContextMenuTestFile.dyn");
Expand All @@ -94,7 +94,7 @@ public void HideConnectorFromContextMenuTest()
}


[Test]
[TestOnSeparateThread]
public void AreNodeConnectionsInMenu()
{
// Mock a WorkspaceView
Expand All @@ -107,7 +107,7 @@ public void AreNodeConnectionsInMenu()
Assert.AreEqual(contextMenu.Items.Count, 2);
}

[Test]
[TestOnSeparateThread]
public void ShowAllConnectorFromWorkspaceContextMenuTest()
{
Open(@"UI/ConnectorShowHideAllWires.dyn");
Expand All @@ -134,7 +134,7 @@ public void ShowAllConnectorFromWorkspaceContextMenuTest()
Assert.AreEqual(4, hiddenConnectors.Count());
}

[Test]
[TestOnSeparateThread]
public void GoToStartNodeTest()
{
Open(@"UI/ConnectorContextMenuTestFile.dyn");
Expand All @@ -149,7 +149,7 @@ public void GoToStartNodeTest()
Assert.AreEqual(connectorViewModel.ConnectorModel.Start.Owner.IsSelected, true);
}

[Test]
[TestOnSeparateThread]
public void GoToEndNodeTest()
{
Open(@"UI/ConnectorContextMenuTestFile.dyn");
Expand Down
36 changes: 18 additions & 18 deletions test/DynamoCoreWpfTests/ConnectorViewModelTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Dynamo.Selection;
using NUnit.Framework;
using static Dynamo.Models.DynamoModel;
Expand All @@ -17,7 +17,7 @@ public class ConnectorViewModelTests : DynamoTestUIBase
/// <summary>
/// Check to see if a connector is visible after pre 2.13 graph open
/// </summary>
[Test]
[TestOnSeparateThread]
public void ConnectorVisibilityForLegacyGraphTest()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -31,7 +31,7 @@ public void ConnectorVisibilityForLegacyGraphTest()
/// <summary>
/// Check to see a connector is visible after xml graph open
/// </summary>
[Test]
[TestOnSeparateThread]
public void ConnectorVisibilityForLegacyXMLGraphTest()
{
var filePath = @"UI/UI_visual_test.dyn";
Expand All @@ -50,7 +50,7 @@ public void ConnectorVisibilityForLegacyXMLGraphTest()
/// <summary>
/// Check to see a pin can be added to a connector
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanPinConnector()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand Down Expand Up @@ -80,7 +80,7 @@ public void CanPinConnector()
/// <summary>
/// Check to see a pin can be removed from a connector
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanUnPinFromConnector()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -107,7 +107,7 @@ public void CanUnPinFromConnector()
/// <summary>
/// Check to see if can select connected nodes.
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanSelectConnectedNodes()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -122,7 +122,7 @@ public void CanSelectConnectedNodes()
/// <summary>
/// Check to see if can break connection.
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanBreakConnection()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -138,7 +138,7 @@ public void CanBreakConnection()
/// a command that toggles between 'IsVisible' and '!IsVisible'. So this test
/// verifies that this works as expected.
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanHideConnector()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -153,7 +153,7 @@ public void CanHideConnector()
/// Check to see if can unhide connector. 'HideConnection' toggles the visibility
/// of the wire, so calling it twice should unhide the connector.
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanUnhideConnector()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -170,7 +170,7 @@ public void CanUnhideConnector()
/// <summary>
/// Can place WatchNode where specified along a connector
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanPlaceWatchNode()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -192,7 +192,7 @@ public void CanPlaceWatchNode()
/// Assert that a watch node is placed on the correct connector,
/// and that it rewires new wires to the correct startind/ending ports.
/// </summary>
[Test]
[TestOnSeparateThread]
public void PlaceWatchNodeAndRewireCorrectly()
{
Open(@"UI/WatchNodePlacement.dyn");
Expand Down Expand Up @@ -244,7 +244,7 @@ public void PlaceWatchNodeAndRewireCorrectly()
/// This occurs when a watch node is placed. New connectors are created and the old pin
/// locations are used to place new pins where the old ones were.
/// </summary>
[Test]
[TestOnSeparateThread]
public void PinPlacedOnCorrectWireToWatchNode()
{
Open(@"UI/WatchNodePlacement.dyn");
Expand Down Expand Up @@ -293,7 +293,7 @@ public void PinPlacedOnCorrectWireToWatchNode()
/// <summary>
/// Can undo 'placepin' command.
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanUndoPin()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand All @@ -318,7 +318,7 @@ public void CanUndoPin()
/// <summary>
/// Can undo 'Unpin' command
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanUndoUnpin()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand Down Expand Up @@ -347,7 +347,7 @@ public void CanUndoUnpin()
/// <summary>
/// Can undo 'delete pin' command.
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanUndoDeletePin()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand Down Expand Up @@ -376,7 +376,7 @@ public void CanUndoDeletePin()
/// <summary>
/// Can undo 'drag pin'.
/// </summary>
[Test]
[TestOnSeparateThread]
public void CanUndoDragPin()
{
Open(@"UI/ConnectorPinTests.dyn");
Expand Down Expand Up @@ -431,7 +431,7 @@ public void CanUndoDragPin()
Assert.AreEqual(initialY, connectorPin.CenterY);
}

[Test]
[TestOnSeparateThread]
public void CanUndoPlaceWatchNode()
{
Open(@"UI/WatchNodePlacement.dyn");
Expand All @@ -457,4 +457,4 @@ public void CanUndoPlaceWatchNode()
}
#endregion
}
}
}
8 changes: 4 additions & 4 deletions test/DynamoCoreWpfTests/ConverterViewModelTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;
using CoreNodeModels;
Expand Down Expand Up @@ -46,7 +46,7 @@ protected override void GetLibrariesToPreload(List<string> libraries)
/// public ConversionUnit SelectedToConversion
/// private void model_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
/// </summary>
[Test]
[TestOnSeparateThread]
public void ConverterViewModel_LengthInchesToCentimetersTest()
{
float inchesToCmFactor = (float)2.54;
Expand Down Expand Up @@ -85,7 +85,7 @@ public void ConverterViewModel_LengthInchesToCentimetersTest()
/// public bool IsSelectionFromBoxEnabled
/// public string SelectionFromBoxToolTip
/// </summary>
[Test]
[TestOnSeparateThread]
public void ConverterViewModel_TooltipTest()
{
float inchesToCmFactor = (float)2.54;
Expand Down Expand Up @@ -128,7 +128,7 @@ public void ConverterViewModel_TooltipTest()
/// public List<ConversionUnit> SelectedFromConversionSource
/// public List<ConversionUnit> SelectedToConversionSource
/// </summary>
[Test]
[TestOnSeparateThread]
public void ConverterViewModel_ItemsSourceCentimetersToMetersTest()
{
Open(@"core\library\converterNodeTest.dyn");
Expand Down
8 changes: 4 additions & 4 deletions test/DynamoCoreWpfTests/DynamoViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected override void GetLibrariesToPreload(List<string> libraries)
libraries.Add("FFITarget.dll");
}

[Test]
[TestOnSeparateThread]
public void FooterNotificationControlTest()
{
// Arrange
Expand Down Expand Up @@ -95,7 +95,7 @@ public void FooterNotificationControlTest()
Assert.AreEqual((items[1] as FooterNotificationItem).NotificationCount, 0);
}

[Test]
[TestOnSeparateThread]
public void OpeningWorkspaceWithTclsrustWarning()
{
// Open workspace with test mode as false, to verify trust warning.
Expand All @@ -112,7 +112,7 @@ public void OpeningWorkspaceWithTclsrustWarning()
DynamoModel.IsTestMode = true;
}

[Test]
[TestOnSeparateThread]
public void ElementBinding_SaveAs()
{
var prebindingPathInTestDir = @"core\callsite\trace_test-prebinding.dyn";
Expand Down Expand Up @@ -155,7 +155,7 @@ public void ElementBinding_SaveAs()
File.Delete(saveAsPath);
}

[Test]
[TestOnSeparateThread]
public void TestToastNotificationClosingBehavior()
{
var preferencesWindow = new PreferencesView(View);
Expand Down
4 changes: 2 additions & 2 deletions test/DynamoCoreWpfTests/GeometryRegressionTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dynamo.Scheduler;
using Dynamo.Scheduler;
using Dynamo.Wpf.ViewModels.Core;
using NUnit.Framework;
using System;
Expand Down Expand Up @@ -34,7 +34,7 @@ protected override void GetLibrariesToPreload(List<string> libraries)
/// 2. An error with the transpose built-in method when it received a combination of empty
/// arrays and scalars, resulting in a crash.
/// </summary>
[Test]
[TestOnSeparateThread]
public void DeletingNodesShouldNotMakeTransposeFailCausingCrash()
{
TaskStateChangedEventHandler evaluationDidNotFailHandler =
Expand Down
6 changes: 3 additions & 3 deletions test/DynamoCoreWpfTests/GroupStylesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected override void GetLibrariesToPreload(List<string> libraries)
/// <summary>
/// Validates that the GroupStyles in the PreferencesView match the ones in the AnnotationView
/// </summary>
[Test]
[TestOnSeparateThread]
public void TestDefaultGroupStyles_PreferencesView()
{
int defaultGroupStylesCounter = 4;
Expand Down Expand Up @@ -79,7 +79,7 @@ public void TestDefaultGroupStyles_PreferencesView()
/// <summary>
/// Add a new GroupStyle and validates that the GroupStyles in the PreferencesView match the ones in the AnnotationView
/// </summary>
[Test]
[TestOnSeparateThread]
public void TestAddGroupStyle_ContextMenu()
{
int currentGroupStylesCounter = 5;
Expand Down Expand Up @@ -121,7 +121,7 @@ public void TestAddGroupStyle_ContextMenu()

}

[Test]
[TestOnSeparateThread]
public void CustomColorPicker_PrePopulateDefaultColors()
{
Open(@"UI\GroupTest.dyn");
Expand Down
Loading

0 comments on commit 210ee2b

Please sign in to comment.