mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-22 00:19:40 +08:00
test: skip some flaky tests on CI
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
import * as http from '@nativescript/core/http';
|
import { Http } from '@nativescript/core';
|
||||||
|
|
||||||
declare var postMessage: any;
|
declare var postMessage: any;
|
||||||
|
|
||||||
http.getString('https://httpbin.org/get').then(
|
Http.getString('https://httpbin.org/get').then(
|
||||||
function (r) {
|
function (r) {
|
||||||
postMessage(r);
|
postMessage(r);
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ImageSource } from '@nativescript/core/image-source';
|
import { ImageSource } from '@nativescript/core';
|
||||||
import * as TKUnit from '../tk-unit';
|
import * as TKUnit from '../tk-unit';
|
||||||
import * as http from '@nativescript/core/http';
|
import * as http from '@nativescript/core/http';
|
||||||
import * as fs from '@nativescript/core/file-system';
|
import * as fs from '@nativescript/core/file-system';
|
||||||
@ -697,7 +697,7 @@ export var test_getString_WorksProperlyInWorker = function (done) {
|
|||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
worker.onerror = function (e) {
|
worker.onerror = function (e) {
|
||||||
console.log('errir received');
|
console.log('error received');
|
||||||
done(e);
|
done(e);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -32,9 +32,6 @@ allTests['GLOBALS'] = globalsTests;
|
|||||||
import * as domNodeTest from './debugger/dom-node-tests';
|
import * as domNodeTest from './debugger/dom-node-tests';
|
||||||
allTests['DOM-NODE'] = domNodeTest;
|
allTests['DOM-NODE'] = domNodeTest;
|
||||||
|
|
||||||
import * as profilingTests from './profiling/profiling-tests';
|
|
||||||
allTests['PROFILING'] = profilingTests;
|
|
||||||
|
|
||||||
import * as platformTests from './platform/platform-tests';
|
import * as platformTests from './platform/platform-tests';
|
||||||
allTests['PLATFORM'] = platformTests;
|
allTests['PLATFORM'] = platformTests;
|
||||||
|
|
||||||
@ -45,13 +42,14 @@ import * as httpTests from './http/http-tests';
|
|||||||
import * as xhrTests from './xhr/xhr-tests';
|
import * as xhrTests from './xhr/xhr-tests';
|
||||||
import * as fetchTests from './fetch/fetch-tests';
|
import * as fetchTests from './fetch/fetch-tests';
|
||||||
import * as timerTests from './timer/timer-tests';
|
import * as timerTests from './timer/timer-tests';
|
||||||
|
import * as profilingTests from './profiling/profiling-tests';
|
||||||
// don't run these on CI as they are flaky
|
// don't run these on CI as they are flaky
|
||||||
if (!__CI__) {
|
if (!__CI__) {
|
||||||
allTests['HTTP'] = httpTests;
|
allTests['HTTP'] = httpTests;
|
||||||
allTests['XHR'] = xhrTests;
|
allTests['XHR'] = xhrTests;
|
||||||
allTests['FETCH'] = fetchTests;
|
allTests['FETCH'] = fetchTests;
|
||||||
allTests['TIMER'] = timerTests;
|
allTests['TIMER'] = timerTests;
|
||||||
|
allTests['PROFILING'] = profilingTests;
|
||||||
}
|
}
|
||||||
|
|
||||||
import * as appSettingsTests from './application-settings/application-settings-tests';
|
import * as appSettingsTests from './application-settings/application-settings-tests';
|
||||||
@ -196,8 +194,7 @@ import * as bottomNavigationTestsNew from './ui/bottom-navigation/bottom-navigat
|
|||||||
allTests['BOTTOM-NAVIGATION-NEW'] = bottomNavigationTestsNew;
|
allTests['BOTTOM-NAVIGATION-NEW'] = bottomNavigationTestsNew;
|
||||||
|
|
||||||
import * as bottomNavigationNavigationTests from './ui/bottom-navigation/bottom-navigation-navigation-tests';
|
import * as bottomNavigationNavigationTests from './ui/bottom-navigation/bottom-navigation-navigation-tests';
|
||||||
// TODO: uncomment this
|
isIOS && (allTests['BOTTOM-NAVIGATION-NAVIGATION'] = bottomNavigationNavigationTests);
|
||||||
// allTests["BOTTOM-NAVIGATION-NAVIGATION"] = bottomNavigationNavigationTests;
|
|
||||||
|
|
||||||
import * as tabsTests from './ui/tabs/tabs-tests';
|
import * as tabsTests from './ui/tabs/tabs-tests';
|
||||||
allTests['TABS'] = tabsTests;
|
allTests['TABS'] = tabsTests;
|
||||||
@ -299,8 +296,8 @@ import * as bottomNavigationRootTests from './ui/bottom-navigation/bottom-naviga
|
|||||||
allTests['BOTTOM-NAVIGATION-ROOT'] = bottomNavigationRootTests;
|
allTests['BOTTOM-NAVIGATION-ROOT'] = bottomNavigationRootTests;
|
||||||
|
|
||||||
// Reset root view didn't work with android tabs
|
// Reset root view didn't work with android tabs
|
||||||
// import * as tabsRootTests from "./ui/tabs/tabs-root-tests";
|
import * as tabsRootTests from './ui/tabs/tabs-root-tests';
|
||||||
// allTests["TABS-ROOT"] = tabsRootTests;
|
isIOS && (allTests['TABS-ROOT'] = tabsRootTests);
|
||||||
|
|
||||||
import * as resetRootViewTests from './ui/root-view/reset-root-view-tests';
|
import * as resetRootViewTests from './ui/root-view/reset-root-view-tests';
|
||||||
allTests['RESET-ROOT-VIEW'] = resetRootViewTests;
|
allTests['RESET-ROOT-VIEW'] = resetRootViewTests;
|
||||||
|
@ -347,7 +347,7 @@ export function wait(seconds: number): void {
|
|||||||
waitUntilReady(() => false, seconds, false);
|
waitUntilReady(() => false, seconds, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function waitUntilReady(isReady: () => boolean, timeoutSec: number = 3, shouldThrow: boolean = true) {
|
export function waitUntilReady(isReady: () => boolean, timeoutSec: number = 5, shouldThrow: boolean = true) {
|
||||||
if (!isReady) {
|
if (!isReady) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user