mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-08 01:58:34 +00:00
test: remove time checks
This commit is contained in:
@ -15,8 +15,8 @@ Feature: SMTP with bcc
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | hello |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | hello |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -50,8 +50,8 @@ Feature: SMTP with bcc
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | | hello |
|
||||
| from | to | subject |
|
||||
| [userAddress] | | hello |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -20,8 +20,8 @@ Feature: SMTP sending of HTML messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | HTML text external |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | HTML text external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -95,8 +95,8 @@ Feature: SMTP sending of HTML messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Html Inline External |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | Html Inline External |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -184,8 +184,8 @@ Feature: SMTP sending of HTML messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Html Inline Alternative Internal |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | Html Inline Alternative Internal |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -273,8 +273,8 @@ Feature: SMTP sending of HTML messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Html Inline Alternative External |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | Html Inline Alternative External |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -39,8 +39,8 @@ Feature: SMTP sending of HTML messages with attachments
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | HTML with attachment internal |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | HTML with attachment internal |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -98,8 +98,8 @@ Feature: SMTP sending of HTML messages with attachments
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | HTML with attachment external PGP |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | HTML with attachment external PGP |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -14,8 +14,8 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -48,8 +48,8 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -85,8 +85,8 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Plain text internal |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | Plain text internal |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -122,8 +122,8 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text external |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | Plain text external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -159,8 +159,8 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -199,8 +199,8 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -234,8 +234,8 @@ Feature: SMTP sending of plain messages
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -39,8 +39,8 @@ Feature: SMTP sending of plain messages with attachments
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Plain with attachment |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | Plain with attachment |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -98,8 +98,8 @@ Feature: SMTP sending of plain messages with attachments
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain with attachment external |
|
||||
| from | to | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | Plain with attachment external |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
@ -158,8 +158,8 @@ Feature: SMTP sending of plain messages with attachments
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | cc | subject |
|
||||
| now | [userAddress] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
|
||||
| from | to | cc | subject |
|
||||
| [userAddress] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
|
||||
And message is sent with API call:
|
||||
"""
|
||||
{
|
||||
|
||||
@ -25,8 +25,8 @@ Feature: SMTP sending the same message twice
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Hello |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | Hello |
|
||||
|
||||
Scenario: Slight change means different message and is sent twice
|
||||
When SMTP client sends message
|
||||
@ -40,6 +40,6 @@ Feature: SMTP sending the same message twice
|
||||
"""
|
||||
Then SMTP response is "OK"
|
||||
And mailbox "Sent" for "user" has messages
|
||||
| time | from | to | subject |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Hello |
|
||||
| now | [userAddress] | bridgetest@protonmail.com | Hello. |
|
||||
| from | to | subject |
|
||||
| [userAddress] | bridgetest@protonmail.com | Hello |
|
||||
| [userAddress] | bridgetest@protonmail.com | Hello. |
|
||||
|
||||
@ -172,15 +172,6 @@ func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []*pm
|
||||
matches := true
|
||||
for n, cell := range row.Cells {
|
||||
switch head[n].Value {
|
||||
case "time":
|
||||
switch cell.Value {
|
||||
case "now":
|
||||
if (time.Now().Unix() - message.Time) > 5 {
|
||||
matches = false
|
||||
}
|
||||
default:
|
||||
return false, fmt.Errorf("unexpected time value: %s", cell.Value)
|
||||
}
|
||||
case "from":
|
||||
address := ctx.EnsureAddress(account.Username(), cell.Value)
|
||||
if !areAddressesSame(message.Sender.Address, address) {
|
||||
|
||||
Reference in New Issue
Block a user