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)
|
.should("not.eq", undefined)
|
||||||
.mhGetBody()
|
.mhGetBody()
|
||||||
.then(body => {
|
.then(body => {
|
||||||
const urlRegex = /\[([^\]]*)\]/;
|
const urlRegex = /\[\w*password\w*\]\(([^\)]*)/;
|
||||||
const bodyWithoutWhiteSpaces = body.replace(/(\r\n|\n|\r|\s)/gm, "");
|
const bodyWithoutWhiteSpaces = body.replace(/(\r\n|\n|\r|\s)/gm, "");
|
||||||
return urlRegex.exec(bodyWithoutWhiteSpaces)[1];
|
return urlRegex.exec(bodyWithoutWhiteSpaces)[1];
|
||||||
});
|
});
|
||||||
|
@ -65,7 +65,7 @@ export function getMailActivationLinkForUserAndSubject(email, subject, i = 0) {
|
||||||
.should("not.eq", undefined)
|
.should("not.eq", undefined)
|
||||||
.mhGetBody()
|
.mhGetBody()
|
||||||
.then(body => {
|
.then(body => {
|
||||||
const urlRegex = /\[([^\]]*)\]/;
|
const urlRegex = /\[\w*password\w*\]\(([^\)]*)/;
|
||||||
const bodyWithoutWhiteSpaces = body.replace(
|
const bodyWithoutWhiteSpaces = body.replace(
|
||||||
/(\r\n|\n|\r|\s)/gm,
|
/(\r\n|\n|\r|\s)/gm,
|
||||||
"",
|
"",
|
||||||
|
|
Loading…
Reference in a new issue