mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Include assert to test_NavigateToNewPage_WithAndroidCache for reuse native views on forward navigation (#4764)
This commit is contained in:
@ -32,8 +32,10 @@ export function test_NavigateToNewPage_WithAndroidCache() {
|
|||||||
const androidFrame = topmost().android;
|
const androidFrame = topmost().android;
|
||||||
const cachingBefore = androidFrame.cachePagesOnNavigate;
|
const cachingBefore = androidFrame.cachePagesOnNavigate;
|
||||||
try {
|
try {
|
||||||
|
const currentPage = topmost().currentPage;
|
||||||
androidFrame.cachePagesOnNavigate = true;
|
androidFrame.cachePagesOnNavigate = true;
|
||||||
helper.navigateWithHistory(pageFactory);
|
helper.navigateWithHistory(pageFactory);
|
||||||
|
TKUnit.assertNotNull(currentPage.nativeView);
|
||||||
helper.goBack();
|
helper.goBack();
|
||||||
} finally {
|
} finally {
|
||||||
androidFrame.cachePagesOnNavigate = cachingBefore;
|
androidFrame.cachePagesOnNavigate = cachingBefore;
|
||||||
|
Reference in New Issue
Block a user