From 92925233ec2929b37124b68f9c1dc2df499f7547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 1 Sep 2022 12:47:39 +0200 Subject: Maximize browser window before running the tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By the default the browser window is not maximized, but opened with a size of 1050x978px. In the Files app, when the navigation bar and the side bar are both open, with the previous design that width caused the file name to be very very narrow, but still clickable. However, with the updated design the file name is too narrow and no longer clickable, which breaks several acceptance tests that descend into subfolders. To solve that now the browser window is maximized before running the tests, which makes the window wide enough (1360px) to show the file name and make it clickable. This commit also removes a step to close the sidebar that was recently added to address the problem mentioned above in a previous pull request. Signed-off-by: Daniel Calviño Sánchez --- tests/acceptance/features/app-files-sharing-link.feature | 1 - tests/acceptance/features/core/ActorContext.php | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/acceptance/features/app-files-sharing-link.feature b/tests/acceptance/features/app-files-sharing-link.feature index ac6ff058fec..4fab8391531 100644 --- a/tests/acceptance/features/app-files-sharing-link.feature +++ b/tests/acceptance/features/app-files-sharing-link.feature @@ -119,7 +119,6 @@ Feature: app-files-sharing-link And I create a new folder named "Subfolder" And I see that the file list contains a file named "Subfolder" When I act as John - And I close the details view And I enter in the folder named "Editable shared folder" Then I see that the file list contains a file named "Subfolder" diff --git a/tests/acceptance/features/core/ActorContext.php b/tests/acceptance/features/core/ActorContext.php index b3c8b6f0459..aa538f06069 100644 --- a/tests/acceptance/features/core/ActorContext.php +++ b/tests/acceptance/features/core/ActorContext.php @@ -137,6 +137,8 @@ class ActorContext extends RawMinkContext { $this->getSession()->start(); + $this->getSession()->maximizeWindow(); + $this->actors["default"] = new Actor("default", $this->getSession(), $this->getMinkParameter("base_url"), $this->sharedNotebook); $this->actors["default"]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier); @@ -163,6 +165,8 @@ class ActorContext extends RawMinkContext { if (!array_key_exists($actorName, $this->actors)) { $this->getSession($actorName)->start(); + $this->getSession($actorName)->maximizeWindow(); + $this->actors[$actorName] = new Actor($actorName, $this->getSession($actorName), $this->getMinkParameter("base_url"), $this->sharedNotebook); $this->actors[$actorName]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier); } -- cgit v1.2.3