fix: simplify autoresponder list actions

This commit is contained in:
Marek Miklewicz
2026-06-03 15:31:03 +02:00
parent 9174d62706
commit 196ee224fe
5 changed files with 24 additions and 9 deletions
+17
View File
@@ -29,6 +29,23 @@ test('directadmin user hooks are clickable and point to reserved icon path', fun
assert_contains('Globalne autorespondery', $txt);
});
test('top navigation uses global autoresponder labels', function (): void {
$pl = require PLUGIN_ROOT . '/lang/pl.php';
$en = require PLUGIN_ROOT . '/lang/en.php';
assert_same('Lista globalnych autoresponderów', $pl['AUTORESPONDERS'] ?? '');
assert_same('Dodaj Globalny autoresponder', $pl['ADD AUTORESPONDER'] ?? '');
assert_same('Global autoresponder list', $en['AUTORESPONDERS'] ?? '');
assert_same('Add global autoresponder', $en['ADD AUTORESPONDER'] ?? '');
});
test('autoresponder index keeps add button only in top navigation', function (): void {
$source = file_get_contents(PLUGIN_ROOT . '/exec/handlers/index.php') ?: '';
assert_false(strpos($source, "ctx->url('create.html')") !== false);
assert_false(strpos($source, "ctx->t('Add autoresponder')") !== false);
});
test('rule form uses minute time input and no summary box in exim mode', function (): void {
require_once PLUGIN_ROOT . '/exec/lib/Settings.php';
require_once PLUGIN_ROOT . '/exec/lib/Lang.php';