2016-11-08 12:31:02 -05:00
|
|
|
import { browser } from 'protractor';
|
|
|
|
|
2016-10-06 18:25:52 -04:00
|
|
|
export var appLang = {
|
|
|
|
appIsTs: false,
|
|
|
|
appIsJs: false,
|
|
|
|
appIsDart: false,
|
|
|
|
appIsUnknown: false
|
|
|
|
};
|
|
|
|
|
|
|
|
export function describeIf(cond: boolean, name: string, func: () => void): void {
|
|
|
|
if (cond) {
|
|
|
|
describe(name, func);
|
|
|
|
} else {
|
|
|
|
xdescribe(name, func);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export function itIf(cond: boolean, name: string, func: (done: DoneFn) => void): void {
|
|
|
|
if (cond) {
|
|
|
|
it(name, func);
|
|
|
|
} else {
|
|
|
|
xit(name, func);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-08 12:31:02 -05:00
|
|
|
// TODO Jesus - figure out what's needed here for the new upgrade chapters
|
2016-10-06 18:25:52 -04:00
|
|
|
// Allow changing bootstrap mode to NG1 for upgrade tests
|
|
|
|
export function setProtractorToNg1Mode(): void {
|
2016-11-08 12:31:02 -05:00
|
|
|
browser.rootEl = 'body';
|
2016-10-06 18:25:52 -04:00
|
|
|
// let disableNgAnimate = function() {
|
|
|
|
// angular.module('disableNgAnimate', []).run(['$animate', function($animate: any) {
|
|
|
|
// $animate.enabled(false);
|
|
|
|
// }]);
|
|
|
|
// };
|
|
|
|
|
|
|
|
// browser.addMockModule('disableNgAnimate', disableNgAnimate);
|
|
|
|
}
|