@@ -13,48 +13,6 @@ using namespace BI;
1313namespace NodeEditorVisualTest
1414{
1515
16- const BasicSkinParams& GetSkinParamsWithMarkers ()
17- {
18- static const BasicSkinParams markersSkinParams (
19- /* backgroundColor*/ NUIE::Color (250 , 250 , 250 ),
20- /* connectionLinePen*/ NUIE::Pen (NUIE::Color (38 , 50 , 56 ), 1.0 ),
21- /* connectionMarker*/ NUIE::SkinParams::ConnectionMarker::Circle,
22- /* connectionMarkerSize*/ NUIE::Size (8.0 , 8.0 ),
23- /* nodePadding*/ 5.0 ,
24- /* nodeBorderPen*/ NUIE::Pen (NUIE::Color (38 , 50 , 56 ), 1.0 ),
25- /* nodeHeaderTextFont*/ NUIE::Font (L" Arial" , 16.0 ),
26- /* nodeHeaderTextColor*/ NUIE::Color (250 , 250 , 250 ),
27- /* nodeHeaderErrorTextColor*/ NUIE::Color (250 , 250 , 250 ),
28- /* nodeHeaderBackgroundColor*/ NUIE::Color (41 , 127 , 255 ),
29- /* nodeHeaderErrorBackgroundColor*/ NUIE::Color (199 , 80 , 80 ),
30- /* nodeContentTextFont*/ NUIE::Font (L" Arial" , 14.0 ),
31- /* nodeContentTextColor*/ NUIE::Color (0 , 0 , 0 ),
32- /* nodeContentBackgroundColor*/ NUIE::Color (236 , 236 , 236 ),
33- /* slotTextColor*/ NUIE::Color (0 , 0 , 0 ),
34- /* slotTextBackgroundColor*/ NUIE::Color (246 , 246 , 246 ),
35- /* slotMarker*/ NUIE::SkinParams::SlotMarker::Circle,
36- /* hiddenSlotMarker*/ NUIE::SkinParams::HiddenSlotMarker::Arrow,
37- /* slotMarkerSize*/ NUIE::Size (8.0 , 8.0 ),
38- /* selectionBlendColor*/ NUIE::BlendColor (NUIE::Color (41 , 127 , 255 ), 0.25 ),
39- /* disabledBlendColor*/ NUIE::BlendColor (NUIE::Color (0 , 138 , 184 ), 0.2 ),
40- /* selectionRectPen*/ NUIE::Pen (NUIE::Color (41 , 127 , 255 ), 1.0 ),
41- /* nodeSelectionRectPen*/ NUIE::Pen (NUIE::Color (41 , 127 , 255 ), 3.0 ),
42- /* buttonBorderPen*/ NUIE::Pen (NUIE::Color (146 , 152 , 155 ), 1.0 ),
43- /* buttonBackgroundColor*/ NUIE::Color (217 , 217 , 217 ),
44- /* textPanelTextColor*/ NUIE::Color (0 , 0 , 0 ),
45- /* textPanelBackgroundColor*/ NUIE::Color (236 , 236 , 236 ),
46- /* groupNameFont*/ NUIE::Font (L" Arial" , 16.0 ),
47- /* groupNameColor*/ NUIE::Color (0 , 0 , 0 ),
48- /* groupBackgroundColors*/ NUIE::NamedColorSet ({
49- { NE::LocalizeString (L" Blue" ), NUIE::Color (160 , 200 , 240 ) },
50- { NE::LocalizeString (L" Green" ), NUIE::Color (160 , 239 , 160 ) },
51- { NE::LocalizeString (L" Red" ), NUIE::Color (239 , 189 , 160 ) }
52- }),
53- /* groupPadding*/ 10.0
54- );
55- return markersSkinParams;
56- }
57-
5816TEST (SelectionTest)
5917{
6018 SimpleNodeEditorTestEnv env (GetDefaultSkinParams ());
@@ -529,35 +487,6 @@ TEST (CenterToWindowTestWithScale)
529487 ASSERT (env.CheckReference (L" CenterToWindowWithScale_Align.svg" ));
530488}
531489
532- TEST (SlotMarkersTest)
533- {
534- SimpleNodeEditorTestEnvWithConnections env (GetSkinParamsWithMarkers ());
535- ASSERT (env.CheckReference (L" Markers_Initial.svg" ));
536-
537- { // start connecting double output slot without target
538- Point doubleOutputSlotPosition = env.doubleUpDownNode ->GetOutputSlotRect (env.uiEnvironment , SlotId (" out" )).GetCenter ();
539- Point targetPosition = doubleOutputSlotPosition + Point (200.0 , -100.0 );
540- env.DragDrop (doubleOutputSlotPosition, targetPosition, [&] () {
541- ASSERT (env.CheckReference (L" Markers_DuringConnectionForward.svg" ));
542- });
543- }
544-
545- { // start connecting viewer input slot without target
546- Point viewerInputSlotPosition = env.viewerUINode1 ->GetInputSlotRect (env.uiEnvironment , SlotId (" in" )).GetCenter ();
547- Point targetPosition = viewerInputSlotPosition + Point (-200.0 , 100.0 );
548- env.DragDrop (viewerInputSlotPosition, targetPosition, [&] () {
549- ASSERT (env.CheckReference (L" Markers_DuringConnectionBackward.svg" ));
550- });
551- }
552- }
553-
554- TEST (SlotMarkersFitToWindowTest)
555- {
556- SimpleNodeEditorTestEnvWithConnections env (GetSkinParamsWithMarkers ());
557- env.nodeEditor .FitToWindow ();
558- ASSERT (env.CheckReference (L" Markers_FitToWindow.svg" ));
559- }
560-
561490TEST (GroupSelectedNodesTest)
562491{
563492 SimpleNodeEditorTestEnvWithConnections env (GetDefaultSkinParams ());
@@ -637,23 +566,4 @@ TEST (AlignNodesTest)
637566 }
638567}
639568
640- TEST (HideConnectionsTest)
641- {
642- FeatureEnableGuard featureGuard (Feature::ConnectionDisplay, true );
643- SimpleNodeEditorTestEnvWithConnections env (GetSkinParamsWithMarkers ());
644-
645- ASSERT (env.CheckReference (L" HideConnectionsTest_Initial.svg" ));
646-
647- { // hide input connections for viewer 2
648- env.SetNextCommandName (L" Hidden" );
649- env.RightClick (env.viewer2InputSlotRect .GetCenter ());
650- ASSERT (env.CheckReference (L" HideConnectionsTest_ConnectionHidden.svg" ));
651- }
652-
653- { // select viewer 2
654- env.Click (env.viewer2HeaderPoint );
655- ASSERT (env.CheckReference (L" HideConnectionsTest_Viewer2Selected.svg" ));
656- }
657- }
658-
659569}
0 commit comments