Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/app/navigation/navigation-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
14 changes: 6 additions & 8 deletions tests/app/testRunner.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions tests/app/ui/layouts/flexbox-layout-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ export const testAlignContent_spaceBetween_withPadding = test(
isBottomAlignedWith(text3, flexbox);
isLeftAlignedWith(text3, flexbox);
}
);
);

export const testAlignContent_spaceAround = test(
activity_align_content_test,
Expand All @@ -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));
Expand Down Expand Up @@ -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);
}
);
Expand Down