mirror of
https://github.com/google/nomulus
synced 2026-10-01 12:16:02 +00:00
Disable legacy registrar console (#2575)
This commit is contained in:
@@ -20,6 +20,7 @@ import static google.registry.request.auth.AuthenticatedRegistrarAccessor.Role.A
|
||||
import static google.registry.request.auth.AuthenticatedRegistrarAccessor.Role.OWNER;
|
||||
import static jakarta.servlet.http.HttpServletResponse.SC_UNAUTHORIZED;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSetMultimap;
|
||||
@@ -84,6 +85,7 @@ class ConsoleUiActionTest {
|
||||
"NewRegistrar", ADMIN,
|
||||
"AdminRegistrar", ADMIN));
|
||||
RegistrarConsoleMetrics.consoleRequestMetric.reset();
|
||||
when(request.getParameter("noredirect")).thenReturn("true");
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@@ -98,6 +100,14 @@ class ConsoleUiActionTest {
|
||||
registrarId, explicitClientId, roles, status);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testWebPage_redirect() {
|
||||
when(request.getParameter("noredirect")).thenReturn(null);
|
||||
action.run();
|
||||
assertThat(response.getStatus()).isEqualTo(302);
|
||||
assertThat(response.getPayload()).isEqualTo("Redirected to /console");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testWebPage_disallowsIframe() {
|
||||
action.run();
|
||||
|
||||
@@ -43,12 +43,14 @@ import google.registry.testing.DatabaseHelper;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
import org.junitpioneer.jupiter.RetryingTest;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.Dimension;
|
||||
|
||||
/** Registrar Console Screenshot Differ tests. */
|
||||
@Disabled
|
||||
class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
|
||||
|
||||
@RegisterExtension
|
||||
|
||||
@@ -28,12 +28,14 @@ import google.registry.model.registrar.RegistrarPoc;
|
||||
import google.registry.module.frontend.FrontendServlet;
|
||||
import google.registry.server.RegistryTestServer;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
import org.junitpioneer.jupiter.RetryingTest;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
/** WebDriver tests for Registrar Console UI. */
|
||||
@Disabled
|
||||
public class RegistrarConsoleWebTest extends WebDriverTestCase {
|
||||
|
||||
@RegisterExtension
|
||||
|
||||
Reference in New Issue
Block a user