From 589041b3ed4289bad238b8cfe5b83ad46fd3f470 Mon Sep 17 00:00:00 2001 From: gbrodman Date: Wed, 29 May 2024 12:54:01 -0400 Subject: [PATCH] Fully reset domain-list page on registrar change (#2456) When the registrar changes we should reset the page and the total results to 0 (since we haven't loaded them yet) https://b.corp.google.com/issues/343193698 --- console-webapp/src/app/domains/domainList.component.ts | 2 ++ core/src/test/java/google/registry/server/Fixture.java | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/console-webapp/src/app/domains/domainList.component.ts b/console-webapp/src/app/domains/domainList.component.ts index a7159a59c..f4ac8dc4e 100644 --- a/console-webapp/src/app/domains/domainList.component.ts +++ b/console-webapp/src/app/domains/domainList.component.ts @@ -59,6 +59,8 @@ export class DomainListComponent { ) { effect(() => { if (this.registrarService.registrarId()) { + this.pageNumber = 0; + this.totalResults = 0; this.reloadData(); } }); diff --git a/core/src/test/java/google/registry/server/Fixture.java b/core/src/test/java/google/registry/server/Fixture.java index 988f7556c..c92e5b14c 100644 --- a/core/src/test/java/google/registry/server/Fixture.java +++ b/core/src/test/java/google/registry/server/Fixture.java @@ -154,6 +154,13 @@ public enum Fixture { persistActiveHost("ns5.linode.com").createVKey())) .build()); + persistResource( + DatabaseHelper.newDomain("newregistrar.example") + .asBuilder() + .setPersistedCurrentSponsorRegistrarId("NewRegistrar") + .setCreationRegistrarId("NewRegistrar") + .build()); + persistResource( loadRegistrar("TheRegistrar") .asBuilder()