@@ -5145,60 +5145,62 @@ trait EmailGetMethodContract {
51455145 .body
51465146 .asString
51475147
5148- assertThatJson(response)
5149- .whenIgnoringPaths(" methodResponses[0][1].state" , " methodResponses[0][1].list[0].attachments[0].blobId" , " methodResponses[0][1].list[0].attachments[1].blobId" )
5150- .isEqualTo(
5151- s """ {
5152- | "sessionState": " ${SESSION_STATE .value}",
5153- | "methodResponses": [
5154- | [
5155- | "Email/get",
5156- | {
5157- | "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
5158- | "notFound": [],
5159- | "list": [{
5160- | "preview": "Main test message...",
5161- | "to": [{
5162- | "name": "Alice",
5163- | "email": "alice@domain.tld"
5164- | }],
5165- | "id": " ${messageId.serialize}",
5166- | "mailboxIds": {
5167- | " ${mailboxId.serialize}": true
5168- | },
5169- | "from": [{
5170- | "name": "Bob",
5171- | "email": "bob@domain.tld"
5172- | }],
5173- | "keywords": {
5174- |
5175- | },
5176- | "receivedAt": " $$ {json-unit.ignore}",
5177- | "sentAt": " $$ {json-unit.ignore}",
5178- | "hasAttachment": true,
5179- | "attachments": [{
5180- | "charset": "US-ASCII",
5181- | "disposition": "attachment",
5182- | "size": 102,
5183- | "name": "yyy.txt",
5184- | "type": "application/json"
5185- | },
5186- | {
5187- | "charset": "US-ASCII",
5188- | "disposition": "attachment",
5189- | "size": 102,
5190- | "name": "xxx.txt",
5191- | "type": "application/json"
5192- | }
5193- | ],
5194- | "subject": "My subject",
5195- | "size": 1011
5196- | }]
5197- | },
5198- | "c1"
5199- | ]
5200- | ]
5201- |} """ .stripMargin)
5148+ Awaitility .await().atMost(Duration .ofSeconds(5 ))
5149+ .untilAsserted(() =>
5150+ assertThatJson(response)
5151+ .whenIgnoringPaths(" methodResponses[0][1].state" , " methodResponses[0][1].list[0].attachments[0].blobId" , " methodResponses[0][1].list[0].attachments[1].blobId" )
5152+ .isEqualTo(
5153+ s """ {
5154+ | "sessionState": " ${SESSION_STATE .value}",
5155+ | "methodResponses": [
5156+ | [
5157+ | "Email/get",
5158+ | {
5159+ | "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
5160+ | "notFound": [],
5161+ | "list": [{
5162+ | "preview": "Main test message...",
5163+ | "to": [{
5164+ | "name": "Alice",
5165+ | "email": "alice@domain.tld"
5166+ | }],
5167+ | "id": " ${messageId.serialize}",
5168+ | "mailboxIds": {
5169+ | " ${mailboxId.serialize}": true
5170+ | },
5171+ | "from": [{
5172+ | "name": "Bob",
5173+ | "email": "bob@domain.tld"
5174+ | }],
5175+ | "keywords": {
5176+ |
5177+ | },
5178+ | "receivedAt": " $$ {json-unit.ignore}",
5179+ | "sentAt": " $$ {json-unit.ignore}",
5180+ | "hasAttachment": true,
5181+ | "attachments": [{
5182+ | "charset": "US-ASCII",
5183+ | "disposition": "attachment",
5184+ | "size": 102,
5185+ | "name": "yyy.txt",
5186+ | "type": "application/json"
5187+ | },
5188+ | {
5189+ | "charset": "US-ASCII",
5190+ | "disposition": "attachment",
5191+ | "size": 102,
5192+ | "name": "xxx.txt",
5193+ | "type": "application/json"
5194+ | }
5195+ | ],
5196+ | "subject": "My subject",
5197+ | "size": 1011
5198+ | }]
5199+ | },
5200+ | "c1"
5201+ | ]
5202+ | ]
5203+ |} """ .stripMargin))
52025204 }
52035205
52045206 @ Test
0 commit comments