test(common): disable deprecated date pipe tests on chrome mobile (#21933)

Closes #21907
PR Close #21933
This commit is contained in:
Olivier Combe 2018-01-31 12:12:33 +01:00 committed by Miško Hevery
parent 54a14312d1
commit 64ae6d206e
2 changed files with 8 additions and 5 deletions

View File

@ -19,7 +19,7 @@ import localeAr from '@angular/common/locales/ar';
{
let date: Date;
xdescribe('DatePipe', () => {
describe('DatePipe', () => {
const isoStringWithoutTime = '2015-01-01';
let pipe: DatePipe;

View File

@ -12,14 +12,19 @@ import {JitReflector} from '@angular/platform-browser-dynamic/src/compiler_refle
import {browserDetection} from '@angular/platform-browser/testing/src/browser_util';
{
xdescribe('DeprecatedDatePipe', () => {
describe('DeprecatedDatePipe', () => {
let date: Date;
const isoStringWithoutTime = '2015-01-01';
let pipe: DeprecatedDatePipe;
// Check the transformation of a date into a pattern
function expectDateFormatAs(date: Date | string, pattern: any, output: string): void {
expect(pipe.transform(date, pattern)).toEqual(output);
// disabled on chrome mobile because of the following bug affecting the intl API
// https://bugs.chromium.org/p/chromium/issues/detail?id=796583
// the android 7 emulator of saucelabs uses chrome mobile 63
if (!browserDetection.isAndroid && !browserDetection.isWebkit) {
expect(pipe.transform(date, pattern)).toEqual(output);
}
}
// TODO: reactivate the disabled expectations once emulators are fixed in SauceLabs
@ -160,7 +165,6 @@ import {browserDetection} from '@angular/platform-browser/testing/src/browser_ut
Object.keys(dateFixtures).forEach((pattern: string) => {
expectDateFormatAs(date, pattern, dateFixtures[pattern]);
});
});
it('should format with pattern aliases', () => {
@ -192,7 +196,6 @@ import {browserDetection} from '@angular/platform-browser/testing/src/browser_ut
Object.keys(dateFixtures).forEach((pattern: string) => {
expectDateFormatAs(date, pattern, dateFixtures[pattern]);
});
});
it('should format invalid in IE ISO date',