diff options
-rw-r--r-- | tests/acceptance/features/app-theming.feature | 8 | ||||
-rw-r--r-- | tests/acceptance/features/bootstrap/ThemingAppContext.php | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/acceptance/features/app-theming.feature b/tests/acceptance/features/app-theming.feature index b6364ae4f44..676b90ab06e 100644 --- a/tests/acceptance/features/app-theming.feature +++ b/tests/acceptance/features/app-theming.feature @@ -9,10 +9,10 @@ Feature: app-theming # The "eventually" part is not really needed here, as the colour is not # being animated at this point, but there is no need to create a specific # step just for this. - And I see that the header color is eventually "#0082C9" + And I see that the background color is eventually "#0082C9" When I set the "Color" parameter in the Theming app to "#C9C9C9" Then I see that the parameters in the Theming app are eventually saved - And I see that the header color is eventually "#C9C9C9" + And I see that the background color is eventually "#C9C9C9" Scenario: resetting the color updates the header color Given I am logged in as the admin @@ -21,7 +21,7 @@ Feature: app-theming And I see that the color selector in the Theming app has loaded And I set the "Color" parameter in the Theming app to "#C9C9C9" And I see that the parameters in the Theming app are eventually saved - And I see that the header color is eventually "#C9C9C9" + And I see that the background color is eventually "#C9C9C9" When I reset the "Color" parameter in the Theming app to its default value Then I see that the parameters in the Theming app are eventually saved - And I see that the header color is eventually "#0082C9" + And I see that the background color is eventually "#0082C9" diff --git a/tests/acceptance/features/bootstrap/ThemingAppContext.php b/tests/acceptance/features/bootstrap/ThemingAppContext.php index d17d9c18109..248d58a1794 100644 --- a/tests/acceptance/features/bootstrap/ThemingAppContext.php +++ b/tests/acceptance/features/bootstrap/ThemingAppContext.php @@ -125,19 +125,19 @@ class ThemingAppContext implements Context, ActorAwareInterface { } /** - * @Then I see that the header color is eventually :color + * @Then I see that the background color is eventually :color */ - public function iSeeThatTheHeaderColorIsEventually($color) { - $headerColorMatchesCallback = function () use ($color) { - $headerColor = $this->actor->getSession()->evaluateScript("return $('#header').css('background-color');"); + public function iSeeThatTheBackgroundColorIsEventually($color) { + $backgroundColorMatchesCallback = function () use ($color) { + $headerColor = $this->actor->getSession()->evaluateScript("return $('body').css('background-color');"); $headerColor = $this->getRGBArray($headerColor); $color = $this->getRGBArray($color); return $headerColor == $color; }; - if (!Utils::waitFor($headerColorMatchesCallback, $timeout = 10 * $this->actor->getFindTimeoutMultiplier(), $timeoutStep = 1)) { - Assert::fail("The header color is not $color yet after $timeout seconds"); + if (!Utils::waitFor($backgroundColorMatchesCallback, $timeout = 10 * $this->actor->getFindTimeoutMultiplier(), $timeoutStep = 1)) { + Assert::fail("The background color is not $color yet after $timeout seconds"); } } |