Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Clean up listeners on body from EventHandler #925

Closed
mhevery opened this issue Apr 17, 2014 · 2 comments
Closed

Clean up listeners on body from EventHandler #925

mhevery opened this issue Apr 17, 2014 · 2 comments

Comments

@mhevery
Copy link
Contributor

mhevery commented Apr 17, 2014

Application rootNode defaults to HTML tag and any listeners attached to it will hang around accross all tests;
https://github.com/angular/angular.dart/blob/master/lib/application.dart#L147

In tests this needs to be overwritten to point to a new div each time:

Needs to be owerwritten here: https://github.com/angular/angular.dart/blob/master/lib/mock/module.dart#L53

@mhevery mhevery added this to the 0.10.0 milestone Apr 17, 2014
@mhevery mhevery modified the milestones: 0.12.0, 0.10.0 Apr 17, 2014
@mvuksano
Copy link
Contributor

@mhevery Isn't this already done?

Looking at event handler test,, it seems like a new element is created and it's used to override ``Node` in the module - https://github.com/angular/angular.dart/blob/master/test/core_dom/event_handler_spec.dart#L33

it's also destroyed after each test - https://github.com/angular/angular.dart/blob/master/test/core_dom/event_handler_spec.dart#L39

Did you have something else in mind?

@mhevery
Copy link
Contributor Author

mhevery commented Apr 30, 2014

This is EventHandler specific. I wanted something which is global to all tests.

mvuksano added a commit to mvuksano/angular.dart that referenced this issue May 6, 2014
Befor each test, a div element with attribute ng-app, is created. This is a container into which test can put some content. This container is destroyed after each test

Closes dart-archive#925
@vicb vicb modified the milestones: 0.12.0, 0.11.0 May 8, 2014
@chirayuk chirayuk modified the milestones: 0.13.0, 0.12.0 Jun 3, 2014
mvuksano added a commit that referenced this issue Jul 14, 2014
Befor each test, a div element with attribute ng-app, is created. This is a container into which test can put some content. This container is destroyed after each test

Closes #925
@vsavkin vsavkin modified the milestones: 0.14.0, 0.13.0 Jul 24, 2014
mvuksano added a commit that referenced this issue Aug 13, 2014
Befor each test, a div element with attribute ng-app, is created. This is a container into which test can put some content. This container is destroyed after each test

Closes #925
mvuksano added a commit that referenced this issue Aug 14, 2014
Befor each test, a div element with attribute ng-app, is created. This is a container into which test can put some content. This container is destroyed after each test

Closes #925
@rkirov rkirov modified the milestones: 0.14.0, 0.15.0 Aug 22, 2014
rkirov pushed a commit to rkirov/angular.dart that referenced this issue Oct 10, 2014
Befor each test, a div element with attribute ng-app, is created. This is a container into which test can put some content. This container is destroyed after each test

Closes dart-archive#925
@rkirov rkirov modified the milestones: post v1.0, 0.15.0 Oct 10, 2014
@rkirov rkirov assigned rkirov and unassigned mvuksano Oct 10, 2014
@rkirov rkirov closed this as completed Dec 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

6 participants