Skip to content

Running unit tests in a new HTML Document creates failures in non-Chrome browsers #3475

@marclaval

Description

@marclaval

2 weeks ago, we started running unit tests in a new HTML Document, see: https://github.com/angular/angular/blob/master/modules/angular2/src/test_lib/test_injector.ts#L96
If it works fine in Chrome, it creates problems in other browsers.

The biggest one is for Safari where events are not dispatched in such a document. This causes the 26 events-based unit tests to fail there.
It also generates one failure in Firefox and IE11. In Firefox, the default behaviour of an event is not applied (e.g. checkbox not checked after a click). In IE11, text selection feature doesn"t work.

Moving back to the real DOM doesn't seem to degrade performances, but it means loosing the isolation that is brought by a new Document. But it seems needed to be able to integrate these browsers to CI.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions