Fix tests for staff members (#2426)
This commit is contained in:
parent
faa41039fe
commit
019a419411
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
"",
|
||||
|
|
Loading…
Reference in a new issue