scenerio added only for Deutsch and Spanish language (#6523)

This commit is contained in:
Sabin Panta
2023-06-15 14:32:34 +05:45
committed by GitHub
parent 8be86f6535
commit 0bd628a956
2 changed files with 21 additions and 2 deletions

View File

@@ -293,4 +293,23 @@ Feature: antivirus
| dav-path-version |
| old |
| new |
| spaces |
| spaces |
@issue-enterprise-5706
Scenario Outline: upload a file with virus and get notification in different languages
Given user "Alice" has switched the system language to "<language>"
And using <dav-path-version> DAV path
When user "Alice" uploads file "filesForUpload/filesWithVirus/eicar.com" to "/aFileWithVirus.txt" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification with subject "<subject>" and message:
| message |
| <message> |
And as "Alice" file "/aFileWithVirus.txt" should not exist
Examples:
| dav-path-version | language | subject | message |
| old | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
| new | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
| spaces | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
| old | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
| new | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
| spaces | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |

View File

@@ -202,7 +202,7 @@ class NotificationContext implements Context {
public function userShouldGetANotificationWithMessage(string $user, string $subject, TableNode $table):void {
$this->userListAllNotifications($user);
$this->featureContext->theHTTPStatusCodeShouldBe(200);
$actualMessage = $this->filterResponseAccordingToNotificationSubject($subject)->message;
$actualMessage = str_replace(["\r", "\n"], " ", $this->filterResponseAccordingToNotificationSubject($subject)->message);
$expectedMessage = $table->getColumnsHash()[0]['message'];
Assert::assertSame(
$expectedMessage,