summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/ThemingAppContext.php
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-09-29 01:38:23 +0000
committerChristopher Ng <chrng8@gmail.com>2022-10-05 06:19:08 +0000
commit7044191eb69bb1e2aa4c3edaf03ce73c77971793 (patch)
tree6d9d6bb8ed5e17ba8ded049fd521024d4d900b01 /tests/acceptance/features/bootstrap/ThemingAppContext.php
parente962d3fba4430f3a13cda70db9009784fc24112a (diff)
downloadnextcloud-server-7044191eb69bb1e2aa4c3edaf03ce73c77971793.tar.gz
nextcloud-server-7044191eb69bb1e2aa4c3edaf03ce73c77971793.zip
Use brand color for background only and keep accessible color as color primary
Signed-off-by: Christopher Ng <chrng8@gmail.com>
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() {