angular-ui/ui-grid

Tests Fail with Angular 1.4.*

JLLeitschuh opened this issue · 5 comments

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.

c0bra commented

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?

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 commented

@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.

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

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