use test callback from test form save hooks

Enter key and other form submits are handled generically from the built-in
save hooks on the form controller. This adds implementations for those hooks
on the plugin test forms to make sure the expected handlers are always called.
This commit is contained in:
Jake McDermott
2019-04-30 12:25:43 -04:00
parent 52276ebbab
commit d1dc6007fd
2 changed files with 8 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ function ExternalTestModalController (strings) {
vm.strings = strings;
vm.title = strings.get('externalTest.TITLE');
vm.$onInit = () => {
vm.form.save = () => vm.onSubmit();
};
}
ExternalTestModalController.$inject = [

View File

@@ -6,7 +6,10 @@ function InputSourceLookupController (strings, wait) {
vm.strings = strings;
vm.title = strings.get('inputSources.TITLE');
vm.$onInit = () => wait('start');
vm.$onInit = () => {
wait('start');
vm.form.save = () => vm.onTest();
};
vm.onReady = () => {
vm.isReady = true;