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