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

Tests Fail with Angular 1.4.* #3658

Closed
JLLeitschuh opened this issue Jun 1, 2015 · 5 comments
Closed

Tests Fail with Angular 1.4.* #3658

JLLeitschuh opened this issue Jun 1, 2015 · 5 comments

Comments

@JLLeitschuh
Copy link
Contributor

I just added angular 1.3.15 and 1.4.0 to the automated test suite file.

  • Angular 1.3.15 tests run without error
  • Angular 1.4.0 tests fail with the following output:
Running "karma:angular-1.4.0" (karma) task
INFO [karma]: Karma v0.12.33 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket H7xOcwm3jSRpUiZBJC0n with id 88871240
................................................................................
................................................................................
................................................................................
................................................................................
.
PhantomJS 1.9.8 (Mac OS X) ui.grid.edit GridCellDirective - with dropdown ui.grid.edit uiGridCell and uiGridEditor full workflow should stop editing on enter FAILED
    Expected 'number:1' to be '0'.
PhantomJS 1.9.8 (Mac OS X) ui.grid.edit GridCellDirective - with dropdown ui.grid.edit uiGridCell and uiGridEditor full workflow should stop editing on esc FAILED
    Expected 'number:1' to be '0'.
PhantomJS 1.9.8 (Mac OS X) ui.grid.edit GridCellDirective - with dropdown ui.grid.edit uiGridCell and uiGridEditor full workflow should stop editing on arrow left FAILED
    Expected 'number:1' to be '0'.
PhantomJS 1.9.8 (Mac OS X) ui.grid.edit GridCellDirective - with dropdown ui.grid.edit uiGridCell and uiGridEditor full workflow should stop editing on arrow right FAILED
    Expected 'number:1' to be '0'.
PhantomJS 1.9.8 (Mac OS X) ui.grid.edit GridCellDirective - with dropdown ui.grid.edit uiGridCell and uiGridEditor full workflow should stop editing on tab FAILED
    Expected 'number:1' to be '0'.
PhantomJS 1.9.8 (Mac OS X) ui.grid.edit GridCellDirective - with dropdown ui.grid.edit uiGridCell and uiGridEditor full workflow should stop when grid scrolls FAILED
    Expected 'number:1' to be '0'.
PhantomJS 1.9.8 (Mac OS X) ui.grid.edit GridCellDirective - with dropdown ui.grid.edit uiGridCell and uiGridEditor full workflow should fire public event FAILED
    Expected 'number:1' to be '0'.
................................................................................
................................................................................
................................................................................
..........................................................
PhantomJS 1.9.8 (Mac OS X): Executed 626 of 626 (7 FAILED) (46.149 secs / 45.344 secs)
Warning: Task "karma:angular-1.4.0" failed. Use --force to continue.

Aborted due to warnings.

I can make a PR with 1.3.15 tests added however I don't want to add 1.4.0 because I don't know how to fix the tests.

JLLeitschuh added a commit to JLLeitschuh/ui-grid that referenced this issue Jun 1, 2015
Adds unit tests for angular versions 1.3.15 and 1.4.0.
1.3.15 runs fine however 1.4.0 tests do not pass. See: angular-ui#3658
@c0bra
Copy link
Contributor

c0bra commented Jun 2, 2015

It looks like this is due to breaking changes to ngOptions here: https://github.com/angular/angular.js/blob/master/CHANGELOG.md#breaking-changes-7

We could update the tests here https://github.com/angular-ui/ng-grid/blob/58a27fc5bb798af3cae57be202bfed5017a6f191/src/features/edit/test/uiGridCellWithDropdown.spec.js#L76 to maybe use ngModel rather than directly calling .val() on the select? Or we could just add the "number:" prefix to the expected value.

@PaulL1 thoughts?

@PaulL1
Copy link
Contributor

PaulL1 commented Jun 2, 2015

I'm fine either way. I note that the value the test is expecting is 0, and the value that it's getting is number: 1, which perhaps isn't even the same item?

@c0bra
Copy link
Contributor

c0bra commented Jun 2, 2015

@PaulL1 it is, the changes I linked above show that they altered the way the select's value was being stored. I think it becomes "string:" and "number:" and maybe other things now.

That's just for the internal select value and not for the ngModel value.

@JLLeitschuh
Copy link
Contributor Author

Thanks to @c0bra for putting this helpful blog post together:
http://brianhann.com/angular-1-4-breaking-changes-to-be-aware-of/

@JLLeitschuh JLLeitschuh changed the title Tests Fail with Angular 1.4.0 Tests Fail with Angular 1.4.* Jul 27, 2015
@JLLeitschuh
Copy link
Contributor Author

E2E Test Failures:

  1. Not Related: ui-grid tutorial/103_filtering first grid on the page, filtered by male by default grid should have seven visible columns
    Message: Expected 8 to equal 7.
    • Fixed
  2. ui-grid tutorial/208_save_state 208 save state Set a sort and a filter, save state, hide a column and remove sort and filter, set another sort and filter, restore the state
    Message: Expected 11 to equal 3.
    • Fixed
  3. ui-grid tutorial/208_save_state 208 save state Set a sort and a filter, save state, hide a column and remove sort and filter, set another sort and filter, restore the state
    Message: Expected 'Col0
    ' to match 'Name'.
    • Fixed
  4. ui-grid tutorial/208_save_state 208 save state Set a sort and a filter, save state, hide a column and remove sort and filter, set another sort and filter, restore the state
    Message: Expected 'Col1
    ' to match 'Gender'.
    • Fixed
  5. ui-grid tutorial/208_save_state 208 save state Set a sort and a filter, save state, hide a column and remove sort and filter, set another sort and filter, restore the state
    Message: Expected 'Col2
    ' to match 'Company'.
    • Fixed
  6. ui-grid tutorial/208_save_state 208 save state Set a sort and a filter, save state, hide a column and remove sort and filter, set another sort and filter, restore the state
    Message: Expected 'r0c0' to match 'Ethel Price'.
    • Fixed
  7. ui-grid tutorial/208_save_state 208 save state Set a sort and a filter, save state, hide a column and remove sort and filter, set another sort and filter, restore the state
    Message: NoSuchElementError: No element found using locator: by.repeater(item in menuItems").row("0")"
    • Fixed

Finished in 201.446 seconds
78 tests, 253 assertions, 7 failures

JLLeitschuh added a commit to JLLeitschuh/ui-grid that referenced this issue Jul 27, 2015
Adds support for angular 1.4

Closes angular-ui#3658
@JLLeitschuh JLLeitschuh modified the milestones: 3.0.1, 3.1 Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants