Fix tests for staff members (#2426)

This commit is contained in:
Karolina Rakoczy 2022-10-20 16:07:45 +04:00 committed by GitHub
parent faa41039fe
commit 019a419411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ export function getMailActivationLinkForUser(email, i = 0) {
.should("not.eq", undefined)
.mhGetBody()
.then(body => {
const urlRegex = /\[([^\]]*)\]/;
const urlRegex = /\[\w*password\w*\]\(([^\)]*)/;
const bodyWithoutWhiteSpaces = body.replace(/(\r\n|\n|\r|\s)/gm, "");
return urlRegex.exec(bodyWithoutWhiteSpaces)[1];
});
@ -65,7 +65,7 @@ export function getMailActivationLinkForUserAndSubject(email, subject, i = 0) {
.should("not.eq", undefined)
.mhGetBody()
.then(body => {
const urlRegex = /\[([^\]]*)\]/;
const urlRegex = /\[\w*password\w*\]\(([^\)]*)/;
const bodyWithoutWhiteSpaces = body.replace(
/(\r\n|\n|\r|\s)/gm,
"",