-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component): update the e2e test
Implement the transcation type component, update the e2e test and insert the component on the ver registryouh
- Loading branch information
1 parent
a05d1f3
commit 041af3d
Showing
8 changed files
with
56 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 11 additions & 3 deletions
14
client/src/modules/templates/bhTransactionTypeSelect.tmpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
<div ng-form="TransactionTypeForm" bh-transaction-type-select ng-model-options="{ updateOn: 'default' }"> | ||
<div class="form-group"> | ||
<div ng-form="$ctrl.formName" bh-transaction-type-select ng-model-options="{ updateOn: 'default' }"> | ||
<div | ||
class="form-group" | ||
ng-class="{ 'has-error' : $ctrl.validationTrigger && $ctrl.formName.transactionType.$invalid }"> | ||
<label class="control-label" translate> | ||
{{ $ctrl.label }} | ||
</label> | ||
|
||
<ui-select | ||
multiple | ||
name="transactionType" | ||
ng-model="$ctrl.selectedTransactionTypes" | ||
on-select="$ctrl.onSelect($ctrl.selectedTransactionTypes)" | ||
on-remove="$ctrl.onRemove($ctrl.selectedTransactionTypes)" | ||
close-on-select="false"> | ||
close-on-select="false" | ||
ng-required="$ctrl.required"> | ||
<ui-select-match placeholder="{{ 'FORM.SELECT.TRANSACTION_TYPE' | translate }}"> | ||
<span>{{$item.plainText}}</span> | ||
</ui-select-match> | ||
<ui-select-choices ui-select-focus-patch repeat="type.id as type in ($ctrl.transactionTypes | filter:{plainText : $select.search} | orderBy:'plainText')"> | ||
<span ng-bind-html="type.plainText | highlight:$select.search"></span> | ||
</ui-select-choices> | ||
</ui-select> | ||
|
||
<div class="help-block" ng-messages="$ctrl.formName.$error" ng-show="$ctrl.validationTrigger"> | ||
<div ng-messages-include="modules/templates/messages.tmpl.html"></div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
test/end-to-end/shared/components/bhTransactionTypeSelect.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* global browser, element, by */ | ||
|
||
const FU = require('../FormUtils'); | ||
|
||
module.exports = { | ||
selector : '[bh-transaction-type-select]', | ||
set : function set(transactionTypes, id) { | ||
const locator = (id) ? by.id(id) : by.css(this.selector); | ||
const target = element(locator); | ||
|
||
target.click(); | ||
|
||
transactionTypes.forEach(function (tt){ | ||
FU.uiSelect('$ctrl.selectedTransactionTypes', tt); | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters