Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-09-01 09:22:43 +0300
committerJulius Härtl <jus@bitgrid.net>2022-09-01 15:15:43 +0300
commit6dac33ee562316f0ed3bb89b66885693b51ff10d (patch)
tree880e810d28a9653e4aaab606b7364fc66ecd8e03 /tests
parent6ad600ea8adb13b53ccb74ea8c59100b2ce11941 (diff)
Adjust theming acceptance tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/features/app-theming.feature8
-rw-r--r--tests/acceptance/features/bootstrap/ThemingAppContext.php12
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");
}
}