Fix cypress tests for plugins and gift cards exports (#3626)
* Fix test for plugins * remove unused import * Fix plugins * decrease limit meaasge * Fix export gift cards * remove only
This commit is contained in:
parent
cf4adbc1af
commit
b9bf19ddfb
3 changed files with 8 additions and 8 deletions
|
@ -98,7 +98,7 @@ describe("As an admin I want to manage plugins", () => {
|
|||
.confirmationMessageShouldDisappear();
|
||||
requestPasswordReset(Cypress.env("USER_NAME"), defaultChannel.slug);
|
||||
getMailWithResetPasswordLink(Cypress.env("USER_NAME"), adminName)
|
||||
.its("0.Content.Headers.Subject.0")
|
||||
.its("Subject")
|
||||
.should("contains", adminName);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -110,7 +110,7 @@ export function getMailWithResetPasswordLink(email, subject, i = 0) {
|
|||
cy.wait(3000);
|
||||
getMailWithResetPasswordLink(serverStoredEmail, subject, i + 1);
|
||||
} else {
|
||||
cy.wrap(resetPasswordMails);
|
||||
cy.wrap(resetPasswordMails).mpLatest().mpGetMailDetails();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ export function getMailWithGiftCardExportWithAttachment(
|
|||
if (i > 5) {
|
||||
throw new Error(`There is no email Gift Card export for user ${email}`);
|
||||
}
|
||||
return cy.mhGetMailsByRecipient(email).then(mails => {
|
||||
return cy.mpGetMailsByRecipient(email).then(mails => {
|
||||
if (!mails.length) {
|
||||
cy.wait(3000);
|
||||
getMailWithGiftCardExportWithAttachment(
|
||||
|
@ -154,7 +154,7 @@ export function getMailWithGiftCardExportWithAttachment(
|
|||
i + 1,
|
||||
);
|
||||
} else {
|
||||
cy.mhGetMailsBySubject(subject).then(mailsWithSubject => {
|
||||
cy.mpGetMailsBySubject(subject).then(mailsWithSubject => {
|
||||
if (!mailsWithSubject.length) {
|
||||
cy.wait(10000);
|
||||
getMailWithGiftCardExportWithAttachment(
|
||||
|
@ -165,10 +165,10 @@ export function getMailWithGiftCardExportWithAttachment(
|
|||
);
|
||||
} else {
|
||||
cy.wrap(mailsWithSubject)
|
||||
.mhFirst()
|
||||
.mpLatest()
|
||||
.mpGetMailDetails()
|
||||
.should("not.eq", undefined)
|
||||
.mhGetBody()
|
||||
.then(body => body);
|
||||
.its("Text");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Cypress.Commands.add("mpGetAllMails", (fromLast = 60000) =>
|
|||
cy
|
||||
.request({
|
||||
method: "GET",
|
||||
url: mhApiUrl("/v1/messages?limit=9999"),
|
||||
url: mhApiUrl("/v1/messages?limit=100"),
|
||||
})
|
||||
.then(response => {
|
||||
// by default get mails received in last 60000ms
|
||||
|
|
Loading…
Reference in a new issue