Releases: zauberzeug/quicktest
5.0.0.5
GoBack()
now supports popping modal pages.- Improved support for pushing and popping modal pages
- Improved support for nested pages: Page lifecycle methods are now called on all pages of a set of nested pages (e.g. ContentPage in TabbedPage in NavigationPage in FlyoutPage, or ContentPage inside NavigationPage on the modal stack).
5.0.0.1
- Update to Xamarin.Forms 5.0.0
- QuickTest now uses FlyoutPage instead of MasterDetailPage
Support for action sheets, changes to popup handling, bugfixes
- Added support for ActionSheets. ShouldSee and Tap can now be used with texts on ActionSheets.
- OpenMenu, CloseMenu, and GoBack now fail when a popup (Alert or ActionSheet) is open.
- ShouldSee and Find do not find texts/elements on the page below a popup anymore.
- Removed User property of QuickTest. Use the methods of QuickTest instead.
- Fixed appearing/disappearing events for tabbed pages
- Fixed rendering of page titles: The title of the current page, instead of the root page, is no rendered for pages in a navigation hierarchy.
Support newer Xamarin.Forms, small improvements
- QuickTest now works with newer Xamarin.Forms versions (tested with Xamarin.Forms 4.4.0.991537).
- The
Input
method now considers theMaxLength
property ofEntry
andEditor
, and shortens entered strings accordingly. - The new
CloseMenu
method can be used to close the menu when if has been opened by a parameterless call toOpenMenu
.
Fix crash when using ShouldSee on ContentPage when no Content is set
Support for custom NavigationBar TitleView
QuickTest now supports testing of custom NavigationBar TitleView.
Support for ListView cell recycling
QuickTest now supports testing of ListView cell reuse.
Changed behaviour:
- Xamarin.Forms.Mocks is now initialised with
runtimePlatform: null
to be able to set all ListViewCachingStrategies in the test. - For ListViews with caching strategy
RecycleElement
andRecycleElementAndDataTemplate
, cells are reused for each ShouldSee/Tap/Find after the first.
Details:
- When a ListView is first traversed (by a ShouldSee, Tap, Find, ...), new cells are created. QuickTest has no concept of a limited screen, so it creates as many cells as there are items in the source. Created cells are cached.
- On each subsequent traversal, the cached cells are reused. Cells are reused in order, so the cells which was created first is reused for the first item to display.
- This also applies to text rendering of the view hierarchy, e.g. when tests fail.
- NOTE: Some calls traverse the view hierarchy more than once (e.g.
Tap
).
- When a cell is reused, the OnBindingContextChanged, OnAppearing and OnDisappearing methods are called, as Xamarin.Forms would do in a live app.
- NOTE: The OnAppearing and OnDisappearing methods are currently not called for caching strategy
RetainElement
.
- NOTE: The OnAppearing and OnDisappearing methods are currently not called for caching strategy
- DataTemplateSelectors are supported. In this case, cells are cached and reused by template type.
- Group header cells are not reused, as it is in Xamarin.Forms.
Support for Images
Now Quicktest recognizes AutomationIds on Image sources which are added like this:
var image = new Image {
Source = ImageSource.FromResource(ressourceName);
};
image.Source.AutomationId = ressourceName;
Added support for Picker
QuickTest now supports Xamarin.Forms.Picker
.
A picker can be found by the ShouldSee()
method based on its title or its currently displayed item.
To use a Picker in a test just call Pick(automationId, text)
in which the parameter text is the string representation of the item to be picked.
Breaking Change: You need to explicitly launch your app prior to testing it
From now on you'll need to call Launch(new App())
explicitly. This removes the requirement of an empty constructor for your App and simplifies configurations before starting the App (like setting a specific persistence state or injecting some TestDoubles into the App).
We also renamed the main class from wich your test should derive into QuickTest
to avoid haggling about Integration/Unit/Acceptance test definitions.