mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
chore: fix nav tests with cli next (#6374)
This commit is contained in:
@ -146,7 +146,7 @@ export function test_ClearHistory_WithTransition() {
|
||||
// Test case for https://github.com/NativeScript/NativeScript/issues/1948
|
||||
export function test_ClearHistoryWithTransitionDoesNotBreakNavigation() {
|
||||
let topmost = topmostFrame();
|
||||
let mainTestPage = topmost.currentPage;
|
||||
let mainTestPage = new Page();
|
||||
let mainPageFactory = function (): Page {
|
||||
return mainTestPage;
|
||||
};
|
||||
|
@ -1,17 +1,15 @@
|
||||
/* tslint:disable */
|
||||
import * as TKUnit from "./TKUnit";
|
||||
import { _resetRootView, getRootView } from "tns-core-modules/application";
|
||||
import { _resetRootView } from "tns-core-modules/application";
|
||||
import { messageType } from "tns-core-modules/trace";
|
||||
import { topmost, Frame, NavigationEntry } from "tns-core-modules/ui/frame";
|
||||
import { topmost, Frame } from "tns-core-modules/ui/frame";
|
||||
import { Page } from "tns-core-modules/ui/page";
|
||||
import { TextView } from "tns-core-modules/ui/text-view";
|
||||
import { Button } from "tns-core-modules/ui/button";
|
||||
import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout";
|
||||
import * as platform from "tns-core-modules/platform";
|
||||
import "./ui-test";
|
||||
import * as fs from "tns-core-modules/file-system";
|
||||
import { unsetValue } from "tns-core-modules/ui/core/properties";
|
||||
import { ad, ios } from "tns-core-modules/utils/utils";
|
||||
import { ios } from "tns-core-modules/utils/utils";
|
||||
|
||||
Frame.defaultAnimatedNavigation = false;
|
||||
|
||||
@ -148,12 +146,12 @@ if (platform.isIOS && ios.MajorVersion > 10) {
|
||||
import * as stylePropertiesTests from "./ui/styling/style-properties-tests";
|
||||
allTests["STYLE-PROPERTIES"] = stylePropertiesTests;
|
||||
|
||||
import * as tabViewRootTests from "./ui/tab-view/tab-view-root-tests";
|
||||
allTests["TAB-VIEW-ROOT"] = tabViewRootTests;
|
||||
|
||||
import * as frameTests from "./ui/frame/frame-tests";
|
||||
allTests["FRAME"] = frameTests;
|
||||
|
||||
import * as tabViewRootTests from "./ui/tab-view/tab-view-root-tests";
|
||||
allTests["TAB-VIEW-ROOT"] = tabViewRootTests;
|
||||
|
||||
import * as viewTests from "./ui/view/view-tests";
|
||||
allTests["VIEW"] = viewTests;
|
||||
|
||||
|
@ -862,9 +862,9 @@ export const testAlignContent_spaceAround = test(
|
||||
let spaceAround = height(flexbox) - height(text1) - height(text3);
|
||||
spaceAround /= 4; // Divide by the number of flex lines * 2
|
||||
|
||||
isBelowWith(flexbox, text1, spaceAround);
|
||||
isBelowWith(flexbox, text1, Math.ceil(spaceAround));
|
||||
isBelowWith(text1, text3, height(text1) + 2 * spaceAround);
|
||||
isAboveWith(text3, flexbox, spaceAround);
|
||||
isAboveWith(text3, flexbox, Math.ceil(spaceAround));
|
||||
isAboveWith(text1, text3, height(text3) + 2 * spaceAround);
|
||||
|
||||
// TODO: equal(flexbox.getFlexLines().size(), is(2));
|
||||
@ -992,9 +992,9 @@ export const testAlignContent_spaceAround_flexDirection_column = test(
|
||||
|
||||
let spaceAround = width(flexbox) - width(text1) - width(text3);
|
||||
spaceAround /= 4; // Divide by the number of flex lines * 2
|
||||
isLeftWith(flexbox, text1, spaceAround);
|
||||
isLeftWith(flexbox, text1, Math.ceil(spaceAround));
|
||||
isLeftWith(text1, text3, width(text1) + 2 * spaceAround);
|
||||
isRightWith(text3, flexbox, spaceAround);
|
||||
isRightWith(text3, flexbox, Math.ceil(spaceAround));
|
||||
isRightWith(text1, text3, width(text3) + 2 * spaceAround);
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user