Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/common/test/pipes/date_pipe_spec.ts
Expand Up @@ -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;

Expand Down
11 changes: 7 additions & 4 deletions packages/common/test/pipes/deprecated/date_pipe_spec.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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',
Expand Down