From 4819baaa078bbf2907844d25cb6b45f8f17366e8 Mon Sep 17 00:00:00 2001
From: Badlop
Date: Tue, 4 Jun 2024 21:37:15 +0200
Subject: [PATCH] Test: Update to the new webadmin pages
---
test/ejabberd_SUITE_data/ejabberd.yml | 1 +
test/webadmin_tests.erl | 15 ++++++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/test/ejabberd_SUITE_data/ejabberd.yml b/test/ejabberd_SUITE_data/ejabberd.yml
index d3a24315f..0155e8f90 100644
--- a/test/ejabberd_SUITE_data/ejabberd.yml
+++ b/test/ejabberd_SUITE_data/ejabberd.yml
@@ -108,6 +108,7 @@ max_fsm_queue: 1000
queue_type: file
modules:
mod_adhoc: []
+ mod_admin_extra: []
mod_admin_update_sql: []
mod_announce: []
mod_configure: []
diff --git a/test/webadmin_tests.erl b/test/webadmin_tests.erl
index a8251dca7..753f87930 100644
--- a/test/webadmin_tests.erl
+++ b/test/webadmin_tests.erl
@@ -76,10 +76,11 @@ adduser(Config) ->
Body = make_query(
Config,
"server/" ++ binary_to_list(Server) ++ "/users/",
- <<"newusername=", (mue(User))/binary, "&newuserpassword=",
- (mue(Password))/binary, "&addnewuser=Add+User">>),
+ <<"register/user=", (mue(User))/binary, "®ister/password=",
+ (mue(Password))/binary, "®ister=Register">>),
Password = ejabberd_auth:get_password(User, Server),
- ?match({_, _}, binary:match(Body, <<"Submitted
">>)).
+ ?match({_, _}, binary:match(Body, <<"ok
">>)).
removeuser(Config) ->
User = <<"userwebadmin-", (?config(user, Config))/binary>>,
@@ -101,7 +102,7 @@ removeuser(Config) ->
Config,
"server/" ++ binary_to_list(Server)
++ "/user/" ++ binary_to_list(mue(User)) ++ "/",
- <<"password=&removeuser=Remove+User">>),
+ <<"&unregister=Unregister">>),
false = ejabberd_auth:user_exists(User, Server),
?match(nomatch, binary:match(Body, <<"Last Activity
20">>)).