Add registered_by to marketplace / Complete test
Change-Id: Ibbb857e9480805c6fa47eb224cac6cbbeeed233c
diff --git a/lib/Kalamar/Plugin/Auth.pm b/lib/Kalamar/Plugin/Auth.pm
index 2bcfeda..7844157 100644
--- a/lib/Kalamar/Plugin/Auth.pm
+++ b/lib/Kalamar/Plugin/Auth.pm
@@ -189,8 +189,8 @@
plugins => 'Plugins',
instplugins => 'Installed Plugins',
regby =>'Registered by',
- regdate =>'Date of Registration',
- instdate =>'Date of Installation',
+ regdate =>'Date of registration',
+ instdate =>'Installation date',
install => 'Install',
uninstall => 'Uninstall',
installFail => 'Plugin could not be installed',
diff --git a/lib/Kalamar/Plugin/Auth/templates/auth/marketplace.html.ep b/lib/Kalamar/Plugin/Auth/templates/auth/marketplace.html.ep
index 60f2294..f092587 100644
--- a/lib/Kalamar/Plugin/Auth/templates/auth/marketplace.html.ep
+++ b/lib/Kalamar/Plugin/Auth/templates/auth/marketplace.html.ep
@@ -43,8 +43,12 @@
<p class="plugin-url"><a href="<%= $_->{client_url} %>"><%= $_->{client_url} %></a></p>
% }
%if ($_->{registration_date}) {
- <p class="registration_date"> <%=loc('Auth_regdate')%>: <%= $_->{registration_date} %></p>
+ <p class="registration_date"><%=loc('Auth_regdate')%>: <%= $_->{registration_date} %></p>
% };
+ %if ($_->{registered_by}) {
+ <p class="registered_by"><%=loc('Auth_regby')%>: <%=$_->{registered_by} %></p>
+ % };
+
%= form_for 'install-plugin', class => 'mkplace', method => "POST", begin
%= hidden_field 'client-id' => $_->{client_id}
<input type="submit" class="form-submit" value="<%= loc('Auth_install')%>"/>
diff --git a/t/plugin/auth-oauth.t b/t/plugin/auth-oauth.t
index 667b8e1..ad8d6ae 100644
--- a/t/plugin/auth-oauth.t
+++ b/t/plugin/auth-oauth.t
@@ -940,7 +940,8 @@
"client_description" => 'Description Plugin 1',
"client_url" => 'http://example.client.de',
"registration_date" => '2022-05-31T14:30:09+02:00[Europe/Berlin]',
-"registered_by" => 'system'
+"registered_by" => 'testuser',
+"refresh_token_expiry" => '7776000',
});
@@ -994,9 +995,10 @@
->text_is('html head title' => 'Marketplace')
->element_exists('ul.plugin-list')
->element_exists('ul.plugin-list > li')
- ->element_exists('p.registration_date')
->text_is('span.client-name','Plugin 1')
->text_is('p.plugin-desc','Description Plugin 1')
+ ->text_is('p.registration_date', 'Date of registration: 2022-05-31T14:30:09+02:00[Europe/Berlin]')
+ ->text_is('p.registered_by', 'Registered by: testuser')
;
@@ -1037,7 +1039,7 @@
->element_exists('ul.plugin_in-list')
->element_exists('ul.plugin_in-list > li')
->text_is('ul.plugin_in-list > li > span.client-name','Plugin 1')
- ->text_is('ul.plugin_in-list > li > p.inst_date','Date of Installation: 2022-12-13T16:33:27.621+01:00[Europe/Berlin]')
+ ->text_is('ul.plugin_in-list > li > p.inst_date','Installation date: 2022-12-13T16:33:27.621+01:00[Europe/Berlin]')
;
$t->ua->max_redirects(0);