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:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-03-05 23:57:47 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-08 10:59:36 +0300
commit30c91a730381e45d74f56759547b8f07fe5e1add (patch)
treed9402ff1fac0e90cebbe5de549c411d39630ffb0 /tests
parent00b38db77fe933e769cfd2bc79c76e6c98231eae (diff)
Add explicit locator for "Enable all" bundle button
Instead of looking for the bundle button and then checking its value now the expected value is included in the locator and the button is checked similarly to other elements. No "Disable all" locator was added as it was not currently needed anywhere. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/features/bootstrap/AppsManagementContext.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/acceptance/features/bootstrap/AppsManagementContext.php b/tests/acceptance/features/bootstrap/AppsManagementContext.php
index 56ec7c6b85f..82d4561bd28 100644
--- a/tests/acceptance/features/bootstrap/AppsManagementContext.php
+++ b/tests/acceptance/features/bootstrap/AppsManagementContext.php
@@ -84,10 +84,10 @@ class AppsManagementContext implements Context, ActorAwareInterface {
/**
* @return Locator
*/
- public static function bundleButton($bundle) {
- return Locator::forThe()->xpath("//div[@class='apps-header']/h2[normalize-space() = '$bundle']/input")->
+ public static function enableAllBundleButton($bundle) {
+ return Locator::forThe()->xpath("//div[@class='apps-header']/h2[normalize-space() = '$bundle']/input[@value='Enable all']")->
descendantOf(self::appsList())->
- describedAs("Button to enable / disable bundles");
+ describedAs("Button to enable bundles");
}
/**
@@ -245,14 +245,16 @@ class AppsManagementContext implements Context, ActorAwareInterface {
* @When /^I enable all apps from the "([^"]*)"$/
*/
public function iEnableAllAppsFromThe($bundle) {
- $this->actor->find(self::bundleButton($bundle), 2)->click();
+ $this->actor->find(self::enableAllBundleButton($bundle), 2)->click();
}
/**
* @Given /^I see that the "([^"]*)" is disabled$/
*/
public function iSeeThatTheIsDisabled($bundle) {
- PHPUnit\Framework\Assert::assertEquals('Enable all', $this->actor->find(self::bundleButton($bundle), 2)->getValue());
+ PHPUnit_Framework_Assert::assertTrue(
+ $this->actor->find(self::enableAllBundleButton($bundle), 2)->isVisible()
+ );
}
/**