Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetitcolas committed Jun 11, 2015
1 parent d06fc65 commit 32990bc
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/javascripts/test/e2e/EditionViewSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,11 @@ describe('EditionViews', function () {
});

describe('ChoiceField', function() {

it('should render as a dropdown when choices is an array', function () {
$$('.ng-admin-field-category select option').then(function (options) {
expect(options[1].getText()).toBe('Tech');
expect(options[1].getAttribute('selected')).toBe('true');
expect(options[2].getText()).toBe('Lifestyle');
it('should render correctly choice fields', function () {
$$('.ng-admin-field-category .ui-select-container').then(function (uiSelect) {
expect(uiSelect.length).toBe(1);
});
});

it('should render as a dropdown when choices is a function', function () {
$$('.ng-admin-field-subcategory select option').then(function (options) {
expect(options[1].getText()).toBe('Computers');
expect(options[1].getAttribute('selected')).toBe('true');
expect(options[2].getText()).toBe('Gadgets');
});
});

});

});

0 comments on commit 32990bc

Please sign in to comment.