mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-31 09:18:38 +00:00
Login with email and confirm age on registration (#493)
* Implement login with email * Add confirm age checkbox to register page * Fix registration unit tests * Fix registration unit tests for real this time Co-authored-by: Dagg <32235163+daggintosh@users.noreply.github.com>
This commit is contained in:
parent
f46bd4fc87
commit
ee11798dc6
7 changed files with 45 additions and 10 deletions
|
@ -28,6 +28,8 @@ public class RegisterTests : LighthouseWebTest
|
|||
this.Driver.FindElement(By.Id("password")).SendKeys(password);
|
||||
this.Driver.FindElement(By.Id("confirmPassword")).SendKeys(password);
|
||||
|
||||
this.Driver.FindElement(By.Id("age-checkbox")).Click();
|
||||
|
||||
this.Driver.FindElement(By.Id("submit")).Click();
|
||||
|
||||
User? user = await database.Users.FirstOrDefaultAsync(u => u.Username == username);
|
||||
|
@ -51,6 +53,8 @@ public class RegisterTests : LighthouseWebTest
|
|||
this.Driver.FindElement(By.Id("password")).SendKeys(password);
|
||||
this.Driver.FindElement(By.Id("confirmPassword")).SendKeys(password + "a");
|
||||
|
||||
this.Driver.FindElement(By.Id("age-checkbox")).Click();
|
||||
|
||||
this.Driver.FindElement(By.Id("submit")).Click();
|
||||
|
||||
User? user = await database.Users.FirstOrDefaultAsync(u => u.Username == username);
|
||||
|
@ -76,6 +80,8 @@ public class RegisterTests : LighthouseWebTest
|
|||
this.Driver.FindElement(By.Id("password")).SendKeys(password);
|
||||
this.Driver.FindElement(By.Id("confirmPassword")).SendKeys(password);
|
||||
|
||||
this.Driver.FindElement(By.Id("age-checkbox")).Click();
|
||||
|
||||
this.Driver.FindElement(By.Id("submit")).Click();
|
||||
|
||||
Assert.Contains("The username you've chosen is already taken.", this.Driver.PageSource);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue