mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
validate password in the frontend too (#2017)
This commit is contained in:
@@ -6,7 +6,6 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.commafeed.TestConstants;
|
||||
import com.microsoft.playwright.BrowserContext;
|
||||
import com.microsoft.playwright.Locator;
|
||||
import com.microsoft.playwright.Page;
|
||||
import com.microsoft.playwright.assertions.PlaywrightAssertions;
|
||||
import com.microsoft.playwright.options.AriaRole;
|
||||
@@ -48,17 +47,6 @@ class AuthentificationIT {
|
||||
PlaywrightAssertions.assertThat(page).hasURL("http://localhost:8085/#/app/category/all");
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerFailPasswordTooSimple() {
|
||||
Page page = context.newPage();
|
||||
page.navigate(getLoginPageUrl());
|
||||
page.getByText("Sign up!").click();
|
||||
PlaywrightTestUtils.register(page, "user", "user@domain.com", "p");
|
||||
|
||||
Locator alert = page.getByRole(AriaRole.ALERT);
|
||||
PlaywrightAssertions.assertThat(alert).containsText("Password must be 4 or more characters in length.");
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerSuccess() {
|
||||
Page page = context.newPage();
|
||||
|
||||
@@ -22,6 +22,7 @@ class ServerIT extends BaseIT {
|
||||
Assertions.assertEquals(900000, serverInfos.getWebsocketPingInterval());
|
||||
Assertions.assertEquals(30000, serverInfos.getTreeReloadInterval());
|
||||
Assertions.assertEquals(60000, serverInfos.getForceRefreshCooldownDuration());
|
||||
Assertions.assertEquals(4, serverInfos.getMinimumPasswordLength());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user