mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
* Consider width2 chars that are not IsBmp
* Apply same fix in WindowsDriver
* Explicitly use type of local variable
* Revert changes to WindowsDriver
* Assume we are running in a terminal that supports true color by default unless user explicitly forces 16
* Switch to SetAttribute and WriteConsole instead of WriteConsoleOutput for 16 color mode
* Fix some cursor issues (WIP)
* Remove concept of 'dirty rows' from v2 as its never actually used
* Remove damageRegion as it does nothing
* Make string builder to console writing simpler
* Radically simplify Write method
* Simplify conditional logic
* Simplify restoring cursor position
* Reference local variable for console buffer
* Reduce calls to ConsoleWrite by accumulating till attribute changes
* When resizing v2 16 color mode on windows, recreate the back buffer to match its size
* Fixes for VTS enabled
* Fix _lastSize never being assigned
* Fixes VTS for Force16Colors
* Fixes force16Colors in VTS
* Fixes escape sequences always echoing in non-VTS
* Force Force16Colors in non-VTS. It have a bug in adding a newline in the last line
* WIP Add base class for NetOutput
* Abstract away how we change attribute
* WIP - Make WindowsOutput use base class
* WIP working to fix set cursor position
* Remove commented out code
* Fixes legacy output mode
* Fixes size with no alt buffer supported on VTS and size restore after maximized.
* Fix set cursor which also fixes the broken surrogate pairs
* Add force parameter
* Fixes an issue that only happens with Windows Terminal when paste surrogate pairs by press Ctrl+V
* In Windows escape sequences must be sent during the lifetime of the console which is created in input handle
* Ensure flush the input buffer before reset the console
* Flush input buffer before reset console in v2win
* Fixes issue in v2net not being refreshing the menu bar at start
* Only force layout and draw on size changed.
* Fix v2net issue not draw first line by forcing set cursor position
* Set _lastCursorPosition nullable and remove bool force from set cursor position
* Remove force parameter
* Add v2 version of fake driver attribute
* Make direct replacement and wire up window resizing events
* Update casts to use V2 fake driver instead
* Adjust interfaces to expose less internals
* Fix not raising iteration event in v2
* WIP investigate what it takes to do resize and redraw using TextAlignment_Centered as example
* Sketch adding component factory
* Create relevant fake component factories
* Add window size monitor into factory
* Fake size monitor injecting
* Add helper for faking console resize in AutoInitShutdown tests
* Fix size setting in FakeDriverV2
* Switch to new method
* Fix IsLegacy becoming false when using blank constructor
* Fix for Ready not being raised when showing same top twice also fixes garbage collection issue if running millions of top levels
* Fix tests
* Remove auto init
* Restore conditional compilation stuff
* Restore 'if running unit tests' logic
* Check only for the output being specific classes for the suppression
* Fix ShadowView blowing up with index out of bounds error
* Fix resize in fluent tests
* Fix for people using Iteration call directly
* Fix more calls to iteration to use
AutoInitShutdownAttribute.RunIteration ();
* Add comment
* Remove assumption that Run with prior view not disposed should throw
* Fix timings in Dialog_Opened_From_Another_Dialog
* Fix Zero_Buttons_Works
* Standardize and fix Button_IsDefault_True_Return_His_Index_On_Accepting
* Fix iteration counts on MessageBoxTests
* Fix WizartTests and DrawTests_Ruler
* Implement SendKeys into ConsoleDriverFacade
* Fix SendKeys in console driver facade such that FileDialogTests works
Fix when Clip is null in popover
* Add missing dispose call to test
* Fix support for Esc in facade SendKeys
* Fix AutocompleteTests
* Fix various tests
* Replace LayoutAndDraw with run iteration
* Fix draw issues
* fix draw order
* Fix run iteration calls
* Fix unit tests
* Fix SendKeys in facade.
* Manipulate upper and lower cases.
* Add IsValidInput method to the interface.
* Fix SendKeys scenario
* Fixes surrogate pairs in the label
* Make tests more sensible - they are testing draw functionality. Callbacks do not need to happen in Iteration method
* Fix tests and harden cleanup in AutoInitShutdownAttribute v2 lifecycle dispose
* Delete extra create input call
* Fix mocks and order of exceptions thrown in Run when things are not initialized
* Revert use of `MapConsoleKeyInfoToKeyCode`
* Ignore casing as it is not what test is really about
* Clear application top and top levels before each auto init shutdown test
* Fix for unstable tests
* Restore actually working SendKeys code
* option to pass logger in fluent ctor
* restore ToArray
* Fix SendKeys method and add extension to unit test
* Leverage the EscSeqUtils.MapConsoleKeyInfo method to avoid duplicate code
* Remove unnecessary hack
* Using only KeyCode for rKeys
* Recover modifier keys in surrogate pairs
* Reformat
* Remove iteration limit for benchmarking in v2
* remove iteration delay to identify bugs
* Remove nudge to unique key and make Then run on UI thread
* fix fluid assertions
* Ensure UI operations all happen on UI thread
* Add explicit error for WaitIteration during an invoke
* Remove timeout added for debug
* Catch failing asserts better
* Fix screenshot
* Fix null ref
* Fix race condition in processing input
* Test fixing
* Standardize asserts
* Remove calls to layout and draw, remove pointless lock and enable reading Cancelled from Dialog even if it is disposed
* fix bad merge
* Make logs access threadsafe
* add extra wait to remove race between iteration end and assert
* Code cleanup
* Remove test for crash on access Cancelled after dispose as this is no longer a restriction
* Change resize console to run on UI thread - fixing race condition with redrawing
* Restore original frame rate after test
* Restore nudge to unique key
* Code Cleanup
* Fix for cascading failures when an assert fails in a specific test
* fix for bad merge
* Address PR feedback
* Move classes to seperate files and add xmldoc
* xml doc warnings
* More xml comments docs
* Fix spelling
---------
Co-authored-by: BDisp <bd.bdisp@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
tv.Tiles.ElementAt (0).MinSize = int.MaxValue;
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -84,7 +84,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (0, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -104,7 +104,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
tv.Tiles.ElementAt (0).MinSize = int.MaxValue;
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -136,7 +136,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (0, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -158,7 +158,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tv.Tiles.ElementAt (1).MinSize = 2;
|
||||
tv.Tiles.ElementAt (2).MinSize = 3;
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -179,7 +179,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (1, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -221,7 +221,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
tv.Tiles.ElementAt (1).MinSize = 2;
|
||||
tv.Tiles.ElementAt (2).MinSize = 3;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -242,7 +242,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (1, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -265,7 +265,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (1, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -287,7 +287,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tv.Tiles.ElementAt (3).MinSize = 2;
|
||||
tv.Tiles.ElementAt (4).MinSize = 1;
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -308,7 +308,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -330,7 +330,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -351,7 +351,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tv.Tiles.ElementAt (3).MinSize = 2;
|
||||
tv.Tiles.ElementAt (4).MinSize = 1;
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -372,7 +372,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -393,7 +393,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -411,7 +411,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tv = Get5x1TilesView ();
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -429,7 +429,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
Assert.False (tv.SetSplitterPos (0, 0));
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -452,7 +452,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (0, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -470,7 +470,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tv = Get5x1TilesView (false);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -486,7 +486,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.True (tv.SetSplitterPos (0, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -509,7 +509,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (0, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -528,7 +528,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tv = Get5x1TilesView ();
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -549,7 +549,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (1, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -570,7 +570,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (1, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -588,7 +588,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tv = Get5x1TilesView (false);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -609,7 +609,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (1, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -631,7 +631,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (1, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -649,7 +649,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tv = Get5x1TilesView ();
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -670,7 +670,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -691,7 +691,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -709,7 +709,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tv = Get5x1TilesView (false);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -730,7 +730,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -752,7 +752,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.False (tv.SetSplitterPos (3, x), $"Assert failed for x={x}");
|
||||
}
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -973,7 +973,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tileView = GetNestedContainer3Right1Down (true);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -994,7 +994,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = true;
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1013,7 +1013,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1033,7 +1033,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1053,7 +1053,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1073,7 +1073,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1093,7 +1093,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = true;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1115,7 +1115,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1138,7 +1138,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
public void TestNestedContainer3RightAnd1Down_TileVisibility_WithoutBorder ()
|
||||
{
|
||||
TileView tileView = GetNestedContainer3Right1Down (false);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1158,7 +1158,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = true;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1178,7 +1178,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = true;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1198,7 +1198,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1218,7 +1218,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1238,7 +1238,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = true;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1258,7 +1258,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = true;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1280,7 +1280,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.Tiles.ElementAt (0).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (1).ContentView.Visible = false;
|
||||
tileView.Tiles.ElementAt (2).ContentView.Visible = false;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1294,7 +1294,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
public void TestNestedContainer3RightAnd1Down_TitleDoesNotOverspill ()
|
||||
{
|
||||
TileView tileView = GetNestedContainer3Right1Down (true, true, 1);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1324,7 +1324,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
.Tiles.ElementAt (1)
|
||||
.Title = new ('y', 100);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1348,7 +1348,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tileView = GetNestedContainer3Right1Down (true);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1368,7 +1368,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Tile removed = tileView.RemoveTile (1);
|
||||
Assert.Same (toRemove, removed);
|
||||
Assert.DoesNotContain (removed, tileView.Tiles);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1387,7 +1387,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
// cannot remove at this index because there is only one horizontal tile left
|
||||
Assert.Null (tileView.RemoveTile (2));
|
||||
tileView.RemoveTile (0);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1404,7 +1404,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
DriverAssert.AssertDriverContentsAre (looksLike, output);
|
||||
|
||||
Assert.NotNull (tileView.RemoveTile (0));
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1429,7 +1429,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
public void TestNestedContainer3RightAnd1Down_WithBorder_RendersNicely ()
|
||||
{
|
||||
TileView tileView = GetNestedContainer3Right1Down (true);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1660,7 +1660,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.NewKeyDownEvent (new (tileView.ToggleResizable));
|
||||
|
||||
Assert.True (line.HasFocus);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1672,7 +1672,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
// Now move splitter line down
|
||||
tileView.NewKeyDownEvent (Key.CursorDown);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1683,10 +1683,10 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// And 2 up
|
||||
line.NewKeyDownEvent (Key.CursorUp);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
line.NewKeyDownEvent (Key.CursorUp);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1711,7 +1711,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// position should remain where it was, at 50%
|
||||
Assert.Equal (Pos.Percent (50), tileView.SplitterDistances.ElementAt (0));
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1722,7 +1722,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// Now move splitter line down (allowed
|
||||
line.NewKeyDownEvent (Key.CursorDown);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1736,7 +1736,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
line.NewKeyDownEvent (Key.CursorUp);
|
||||
|
||||
tileView.SetNeedsDraw ();
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1875,7 +1875,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
TileView tileView = Get11By3TileView (out LineView line);
|
||||
tileView.NewKeyDownEvent (new (tileView.ToggleResizable));
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1886,7 +1886,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// Now while focused move the splitter 1 unit right
|
||||
line.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1899,7 +1899,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
tileView.Layout ();
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1917,7 +1917,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
tileView.SetSplitterPos (0, Pos.Percent (50));
|
||||
Assert.IsType<PosPercent> (tileView.SplitterDistances.ElementAt (0));
|
||||
tileView.NewKeyDownEvent (new (tileView.ToggleResizable));
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1928,7 +1928,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// Now while focused move the splitter 1 unit right
|
||||
line.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1944,7 +1944,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
tileView.Layout ();
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1963,7 +1963,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tileView = Get11By3TileView (out LineView line, true);
|
||||
tileView.NewKeyDownEvent (new (tileView.ToggleResizable));
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -1974,7 +1974,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// Now while focused move the splitter 1 unit right
|
||||
line.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -1987,7 +1987,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
tileView.Layout ();
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -2010,7 +2010,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// Should stay where it was originally at (50%)
|
||||
Assert.Equal (Pos.Percent (50), tileView.SplitterDistances.ElementAt (0));
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
// so should ignore the 2 distance and stick to 6
|
||||
var looksLike =
|
||||
@@ -2023,13 +2023,13 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
// Keyboard movement on splitter should have no effect because it
|
||||
// would take us below the minimum splitter size
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
DriverAssert.AssertDriverContentsAre (looksLike, output);
|
||||
|
||||
// but we can continue to move the splitter right if we want
|
||||
line.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -2053,7 +2053,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// Should stay where it was originally at (50%)
|
||||
Assert.Equal (Pos.Percent (50), tileView.SplitterDistances.ElementAt (0));
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
// so should ignore the 2 distance and stick to 5
|
||||
var looksLike =
|
||||
@@ -2066,13 +2066,13 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
// Keyboard movement on splitter should have no effect because it
|
||||
// would take us below the minimum splitter size
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
DriverAssert.AssertDriverContentsAre (looksLike, output);
|
||||
|
||||
// but we can continue to move the splitter right if we want
|
||||
line.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -2090,7 +2090,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
TileView tileView = Get11By3TileView (out LineView line);
|
||||
tileView.NewKeyDownEvent (new (tileView.ToggleResizable));
|
||||
tileView.Tiles.ElementAt (1).MinSize = 6;
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
// distance leaves too little space for view2 (less than 6 would remain)
|
||||
Assert.False (tileView.SetSplitterPos (0, 8));
|
||||
@@ -2098,7 +2098,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
// Should stay where it was originally at (50%)
|
||||
Assert.Equal (Pos.Percent (50), tileView.SplitterDistances.ElementAt (0));
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
// so should ignore the 2 distance and stick to 6
|
||||
var looksLike =
|
||||
@@ -2111,13 +2111,13 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
// Keyboard movement on splitter should have no effect because it
|
||||
// would take us below the minimum splitter size
|
||||
line.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
DriverAssert.AssertDriverContentsAre (looksLike, output);
|
||||
|
||||
// but we can continue to move the splitter left if we want
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -2138,12 +2138,12 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// distance leaves too little space for view2 (less than 5 would remain)
|
||||
Assert.False (tileView.SetSplitterPos (0, 8));
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
// Should stay where it was originally at (50%)
|
||||
Assert.Equal (Pos.Percent (50), tileView.SplitterDistances.ElementAt (0));
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
// so should ignore the 2 distance and stick to 6
|
||||
var looksLike =
|
||||
@@ -2156,13 +2156,13 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
// Keyboard movement on splitter should have no effect because it
|
||||
// would take us below the minimum splitter size
|
||||
line.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
DriverAssert.AssertDriverContentsAre (looksLike, output);
|
||||
|
||||
// but we can continue to move the splitter left if we want
|
||||
line.NewKeyDownEvent (Key.CursorLeft);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
looksLike =
|
||||
@"
|
||||
@@ -2179,7 +2179,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
{
|
||||
TileView tileView = Get11By3TileView (out LineView line, true);
|
||||
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
var looksLike =
|
||||
@"
|
||||
@@ -2190,7 +2190,7 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
// Keyboard movement on splitter should have no effect if it is not focused
|
||||
tileView.NewKeyDownEvent (Key.CursorRight);
|
||||
Application.LayoutAndDraw ();
|
||||
AutoInitShutdownAttribute.RunIteration ();
|
||||
|
||||
DriverAssert.AssertDriverContentsAre (looksLike, output);
|
||||
}
|
||||
@@ -2262,6 +2262,8 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
|
||||
Application.Begin (Application.Top);
|
||||
|
||||
Application.Top.SetNeedsDraw();
|
||||
|
||||
return tv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user