A platform for community discussion. Free, open, simple.
FIX: ensure we can lookup identical ip addresses (#32725)
Joffrey JAFFEUX33fbf19d050e
diff --git a/app/assets/javascripts/admin/addon/components/ip-lookup.gjs b/app/assets/javascripts/admin/addon/components/ip-lookup.gjsindex 1cb45f04fa9..d5946513383 100644--- a/app/assets/javascripts/admin/addon/components/ip-lookup.gjs+++ b/app/assets/javascripts/admin/addon/components/ip-lookup.gjs@@ -71,9 +71,9 @@ export default class IpLookup extends Component {data,});this.totalOthersWithSameIP = result.total;+ let request = await AdminUser.findAll("active", data);- const users = await AdminUser.findAll("active", data);- this.otherAccounts = users;+ this.otherAccounts = request.users;this.otherAccountsLoading = false;}} catch (error) {diff --git a/spec/system/admin_user_spec.rb b/spec/system/admin_user_spec.rbindex 9cac00a8bff..82c65c9c09a 100644--- a/spec/system/admin_user_spec.rb+++ b/spec/system/admin_user_spec.rb@@ -39,6 +39,17 @@ describe "Admin User Page", type: :system dobefore { admin_user_page.visit(user) }+ it "can list accounts with identical IPs" do+ find(".ip-lookup-trigger").click++ expect(page).to have_content("#{I18n.t("js.ip_lookup.other_accounts")}\n3")++ table = page.find(".other-accounts table")+ expect(table).to have_content(similar_user.username)+ expect(table).to have_content(another_mod.username)+ expect(table).to have_content(another_admin.username)+ end+it "displays the suspend and silence buttons" doexpect(admin_user_page).to have_suspend_buttonexpect(admin_user_page).to have_silence_button