2016-11-12 15:35:10 -05:00
|
|
|
import { browser } from 'protractor';
|
2016-11-08 12:31:02 -05:00
|
|
|
|
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-10 09:58:14 -05:00
|
|
|
// protractor.config.js is set to ng2 mode by default, so we must manually
|
|
|
|
// change it for upgradeAdapter tests
|
2016-10-06 18:25:52 -04:00
|
|
|
export function setProtractorToNg1Mode(): void {
|
2016-11-08 12:31:02 -05:00
|
|
|
browser.rootEl = 'body';
|
2016-10-06 18:25:52 -04:00
|
|
|
}
|
2016-11-08 12:47:39 -05:00
|
|
|
|
2016-11-10 09:58:14 -05:00
|
|
|
export function setProtractorToHybridMode() {
|
|
|
|
setProtractorToNg1Mode();
|
|
|
|
browser.ng12Hybrid = true;
|
2016-11-09 13:12:15 -05:00
|
|
|
}
|