7848-recoveryPassword #617
|
@ -26,10 +26,8 @@ describe('Recover Password', () => {
|
||||||
cy.request(
|
cy.request(
|
||||||
`http://localhost:3000/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
`http://localhost:3000/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
cy.log('response: ', response.body[0].body);
|
|
||||||
const regex = /access_token=([a-zA-Z0-9]+)/;
|
const regex = /access_token=([a-zA-Z0-9]+)/;
|
||||||
const [match] = response.body[0].body.match(regex);
|
const [match] = response.body[0].body.match(regex);
|
||||||
cy.log('response: ', match);
|
|
||||||
|
|
||||||
const resetUrl = '/#/resetPassword?' + match;
|
const resetUrl = '/#/resetPassword?' + match;
|
||||||
cy.visit(resetUrl);
|
cy.visit(resetUrl);
|
||||||
|
|
|
@ -47,7 +47,6 @@ describe('Two Factor', () => {
|
||||||
tempDiv.innerHTML = response.body[0].body;
|
tempDiv.innerHTML = response.body[0].body;
|
||||||
const codeElement = tempDiv.querySelector('.code');
|
const codeElement = tempDiv.querySelector('.code');
|
||||||
const code = codeElement ? codeElement.textContent.trim() : null;
|
const code = codeElement ? codeElement.textContent.trim() : null;
|
||||||
cy.log('response: ', code);
|
|
||||||
|
|
||||||
alexm marked this conversation as resolved
|
|||||||
cy.get('input[type="text"]').type(code);
|
cy.get('input[type="text"]').type(code);
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('button[type="submit"]').click();
|
||||||
|
|
Loading…
Reference in New Issue
quitar