From 7631d4e0db763dab0ceb7da8e860589783e74f96 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Mon, 13 Jul 2020 21:23:32 +0200
Subject: [PATCH] FIX #13670 TIME 0:15 fix front test

---
 src/frontend/plugins/modal/alert.component.html | 2 +-
 test/e2e/login-spec.js                          | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/frontend/plugins/modal/alert.component.html b/src/frontend/plugins/modal/alert.component.html
index f1811d29b69..5f342114b07 100644
--- a/src/frontend/plugins/modal/alert.component.html
+++ b/src/frontend/plugins/modal/alert.component.html
@@ -5,6 +5,6 @@
     </div>
     <span class="divider-modal"></span>
     <div mat-dialog-actions *ngIf="!data.hidebutton">
-        <button class="actions" color="primary" mat-raised-button (click)="this.dialogRef.close();">{{lang.ok}}</button>
+        <button id="alertComponentClose" class="actions" color="primary" mat-raised-button (click)="this.dialogRef.close();">{{lang.ok}}</button>
     </div>
 </div>
diff --git a/test/e2e/login-spec.js b/test/e2e/login-spec.js
index 5f102929502..d078f2613e7 100644
--- a/test/e2e/login-spec.js
+++ b/test/e2e/login-spec.js
@@ -16,6 +16,15 @@ describe('Login to app', function() {
         browser.takeScreenshot().then(function (png) {
             ScreenshotReporter(png, 'test/e2e/screenshots/login_to_app_' + browser.browserName);
         });
+        var alertComponent = element(by.id('alertComponentClose'));
+        alertComponent.isPresent().then(function(result) {
+            if (result) {
+                element(by.id('alertComponentClose')).click();
+                browser.sleep(500);
+            }
+        });
+        element(by.id('alertComponentClose')).click();
+        browser.sleep(500);
         element(by.id('login')).sendKeys('bblier');
         browser.sleep(500);
         element(by.id('password')).sendKeys('maarch');
-- 
GitLab