Skip to content

Commit

Permalink
- fixing unit test on webmail
Browse files Browse the repository at this point in the history
Signed-off-by: automike <[email protected]>
  • Loading branch information
mikeliucc authored and mikeliu-cvet committed Jun 26, 2022
1 parent 33fd7eb commit 09e2376
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/test/kotlin/org/nexial/core/plugins/web/HeadlessWebMailTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ import org.nexial.core.ExcelBasedTests

class HeadlessWebMailTest : ExcelBasedTests() {

@Ignore("need to figure out the best way to sent SMTP mails on Jenkins...")
@Test
@Throws(Exception::class)
fun webmails() {
val executionSummary = testViaExcel("unitTest_webmail.xlsx", "mailinator", "mailinator_version")
assertNoFail(executionSummary, "mailinator")
assertPassFail(executionSummary, "mailinator_version", TestOutcomeStats.allPassed())
// unable to run on Jenkins/AIX... chrome headless doesn't seem to be redirecting correctly and at times the network request is blocked by temp-mail
// todo: need to run this locally
// assertNoFail(executionSummary, "temporary-mail")
assertNoFail(executionSummary, "mailinator_version")
}

@Ignore("skip for CI; chrome headless doesn't seem to be redirecting correctly and " +
"at times the network request is blocked by temp-mail")
@Test
@Throws(Exception::class)
fun testTempMail() {
val executionSummary = testViaExcel("unitTest_webmail.xlsx", "temporary-mail")
assertNoFail(executionSummary, "temporary-mail")
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sender": {
"email": "${sib.sender}"
},
"to": [ { "email": "${webmail.inbox}@mailinator.com" } ],
"htmlContent": "<!DOCTYPE html><html><body>${sib.content}</body></html>",
"subject": "${sib.subject}",
"replyTo": { "email": "${sib.replyTo}" },
"headers": {
"sender.ip": "1.2.3.4",
"X-Mailin-custom": "nexial",
"idempotencyKey": "nexial-$(sysdate|now|epoch)"
}
}
Binary file not shown.

0 comments on commit 09e2376

Please sign in to comment.