aboutsummaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/ThemingAppContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/features/bootstrap/ThemingAppContext.php')
-rw-r--r--tests/acceptance/features/bootstrap/ThemingAppContext.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/ThemingAppContext.php b/tests/acceptance/features/bootstrap/ThemingAppContext.php
index de5da5950d2..adf04eaca00 100644
--- a/tests/acceptance/features/bootstrap/ThemingAppContext.php
+++ b/tests/acceptance/features/bootstrap/ThemingAppContext.php
@@ -142,6 +142,23 @@ class ThemingAppContext implements Context, ActorAwareInterface {
}
/**
+ * @Then I see that the non-plain background color variable is eventually :color
+ */
+ public function iSeeThatTheNonPlainBackgroundColorVariableIsEventually($color) {
+ $colorVariableMatchesCallback = function () use ($color) {
+ $colorVariable = $this->actor->getSession()->evaluateScript("return getComputedStyle(document.documentElement).getPropertyValue('--color-main-background-not-plain').trim();");
+ $colorVariable = $this->getRGBArray($colorVariable);
+ $color = $this->getRGBArray($color);
+
+ return $colorVariable == $color;
+ };
+
+ if (!Utils::waitFor($colorVariableMatchesCallback, $timeout = 10 * $this->actor->getFindTimeoutMultiplier(), $timeoutStep = 1)) {
+ Assert::fail("The non-plain background color variable is not $color yet after $timeout seconds");
+ }
+ }
+
+ /**
* @Then I see that the parameters in the Theming app are eventually saved
*/
public function iSeeThatTheParametersInTheThemingAppAreEventuallySaved() {