-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspec.cy.js
29 lines (28 loc) · 977 Bytes
/
spec.cy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/// <reference types="Cypress" />
describe("Email assertion:", () => {
it("Using gmail_tester.get_messages(), look for an email with specific subject and link in email body", function () {
// debugger; //Uncomment for debugger to work...
cy.task("gmail:get-messages", {
options: {
from: "[email protected]",
subject: "Ubisoft Password Change Request",
include_body: true,
before: new Date(2019, 8, 24, 12, 31, 13), // Before September 24rd, 2019 12:31:13
after: new Date(2019, 7, 23), // After August 23, 2019
},
}).then((emails) => {
assert.isAtLeast(
emails.length,
1,
"Expected to find at least one email, but none were found!"
);
const body = emails[0].body.html;
assert.isTrue(
body.indexOf(
"https://account-uplay.ubi.com/en-GB/action/change-password?genomeid="
) >= 0,
"Found reset link!"
);
});
});
});