Skip to content

Commit

Permalink
fix(account): typo in edit modal
Browse files Browse the repository at this point in the history
This commit fixes a typo that resulted in a broken angular translate
key.  It also removes the id for the delete button and uses FormUtils to
click on the delete button.
  • Loading branch information
Jonathan Niles authored and jniles committed Feb 1, 2017
1 parent 2db368c commit e339966
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions client/src/partials/accounts/edit/accounts.edit.modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div ng-show="AccountEditCtrl.account || AccountEditCtrl.isCreateState">

<div ng-if="!AccountEditCtrl.isCreateState" class="form-group">
<label class="control-label" translate>{ACCOUNT.NUMBER</label>
<label class="control-label" translate>ACCOUNT.NUMBER</label>
<p class="form-control-static" id="number-static">{{AccountEditCtrl.account.number}}</p>
</div>

Expand Down Expand Up @@ -126,7 +126,6 @@
<button
type="button"
ng-if="!AccountEditCtrl.isCreateState"
id="delete_account"
class="btn btn-danger btn-sm"
data-method="delete"
ng-click="AccountEditCtrl.deleteAccount(AccountEditCtrl.account)">
Expand Down
14 changes: 7 additions & 7 deletions test/end-to-end/accounts/accounts.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* global element, by, browser */

'use strict';

const chai = require('chai');
Expand Down Expand Up @@ -35,7 +34,8 @@ describe('Account Management', function () {
number : 40000
}
};
const deletingAccount = "3647";

const deletingAccount = '3647';

const page = new AccountsPage();

Expand Down Expand Up @@ -143,18 +143,18 @@ describe('Account Management', function () {
}

// Delete a specific Account
it('Delete specific account', function () {
it('can delete a specific account', function () {
page.openEdit(deletingAccount);
element(by.id('delete_account')).click();

FU.buttons.delete();
components.modalAction.confirm();

components.notification.hasSuccess();
});

// Delete a specific Account
it('Impossible to remove an account parent who have children', function () {
it('cannot delete an account with children', function () {
page.openEdit(accountGroup.id);
element(by.id('delete_account')).click();
FU.buttons.delete();
components.modalAction.confirm();
expect(element.all(by.css('[alert alert-danger]')));
});
Expand Down

0 comments on commit e339966

Please sign in to comment.