Implemented mailer for new users, creation fails on invalid email address
This commit is contained in:
parent
c9f84a04c5
commit
184fc8c10e
|
@ -156,9 +156,8 @@ public static class SessionMethods
|
|||
.WithParent(sessionUser)
|
||||
.Do(() => newUser.Password = newUser.SaltAndHashPassword(newUser.Password))
|
||||
.Do(() => newUser.MustResetPassword = true)
|
||||
.Apply(Db.Create);
|
||||
|
||||
// && Mailer.Mailer.SendVerificationMessage(newUser);
|
||||
.Apply(Db.Create)
|
||||
&& Mailer.Mailer.SendVerificationMessage(newUser);
|
||||
|
||||
//Send Email to new user to verify email and set password
|
||||
|
||||
|
|
|
@ -97,4 +97,5 @@ public static partial class Db
|
|||
Connection.Insert(relation);
|
||||
}
|
||||
}
|
||||
//TODO fake OrderNumbers
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"Url": "smtp.ethereal.email",
|
||||
"Url": "mail.agenturserver.de",
|
||||
"Port": 587,
|
||||
"Username": "fern95@ethereal.email",
|
||||
"Password": "dYKVnc4RQNEFckHaNV"
|
||||
"Username": "p518526p69",
|
||||
"Password": "i;b*xqm4iB5uhl"
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -21,6 +21,7 @@
|
|||
"chart.js": "^4.2.1",
|
||||
"css-loader": "^6.7.3",
|
||||
"formik": "^2.2.9",
|
||||
"package.json": "^2.0.1",
|
||||
"react": "^18.2.0",
|
||||
"react-chartjs-2": "^5.2.0",
|
||||
"react-dnd": "^16.0.1",
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
import {Selector, t} from 'testcafe';
|
||||
|
||||
export async function login(name, pw) {
|
||||
await t
|
||||
.typeText('#username-textfield', name)
|
||||
.typeText('#password-textfield', pw)
|
||||
.click('.MuiButtonBase-root') //todo id
|
||||
}
|
||||
|
||||
export async function logout() {
|
||||
await t
|
||||
.click('.MuiButtonBase-root');
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
import { Selector } from 'testcafe';
|
||||
|
||||
fixture('Login testing')
|
||||
.page('http://localhost:3000/'); //Todo write me in a config file
|
||||
|
||||
|
||||
|
||||
test('Lulu login', async t => {
|
||||
// await t
|
||||
// .debug();
|
||||
await t
|
||||
.login('lulu', '1233') //Todo write me in a config file
|
||||
.expect(Selector('#demo-simple-select').visible).ok();
|
||||
});
|
||||
|
||||
|
||||
test('Wrong PW', async t => {
|
||||
await t
|
||||
.login('lulu', '12334') //Todo write me in a config file
|
||||
.expect(Selector('#demo-simple-select').visible).notOk(); //Todo check for feedback
|
||||
});
|
||||
|
||||
test('Invalid Username', async t => {
|
||||
await t
|
||||
.login('Not Agent Smith', '12334') //Todo write me in a config file
|
||||
.expect(Selector('#demo-simple-select').visible).notOk(); //Todo check for feedback
|
||||
});
|
||||
|
||||
test('Logout', async t => {
|
||||
await t
|
||||
.login('lulu', '1233') //Todo write me in a config file
|
||||
.logout()
|
||||
.expect(Selector('#username-textfield').visible).Ok();
|
||||
});
|
||||
|
||||
test('Installation List Loads', async t => {
|
||||
await t
|
||||
.login('lulu', '1233') //Todo write me in a config file
|
||||
.expect(Selector('').visible).Ok();
|
||||
});
|
Loading…
Reference in New Issue