summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/features/bootstrap/NotificationContext.php4
-rw-r--r--tests/acceptance/features/bootstrap/PublicShareContext.php9
-rw-r--r--tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php6
3 files changed, 11 insertions, 8 deletions
diff --git a/tests/acceptance/features/bootstrap/NotificationContext.php b/tests/acceptance/features/bootstrap/NotificationContext.php
index ac9838562e1..717de4302da 100644
--- a/tests/acceptance/features/bootstrap/NotificationContext.php
+++ b/tests/acceptance/features/bootstrap/NotificationContext.php
@@ -31,7 +31,7 @@ class NotificationContext implements Context, ActorAwareInterface {
* @return Locator
*/
public static function notificationMessage($message) {
- return Locator::forThe()->xpath("//*[@class = 'row' and normalize-space() = '$message']")->
+ return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' toastify ') and normalize-space(text()) = '$message']")->
descendantOf(self::notificationContainer())->
describedAs("$message notification");
}
@@ -40,7 +40,7 @@ class NotificationContext implements Context, ActorAwareInterface {
* @return Locator
*/
private static function notificationContainer() {
- return Locator::forThe()->id("notification-container")->
+ return Locator::forThe()->id("content")->
describedAs("Notification container");
}
diff --git a/tests/acceptance/features/bootstrap/PublicShareContext.php b/tests/acceptance/features/bootstrap/PublicShareContext.php
index 02508330391..891c231b164 100644
--- a/tests/acceptance/features/bootstrap/PublicShareContext.php
+++ b/tests/acceptance/features/bootstrap/PublicShareContext.php
@@ -202,11 +202,14 @@ class PublicShareContext implements Context, ActorAwareInterface {
// download item should not be shown in the menu (although it will be in
// the DOM).
PHPUnit_Framework_Assert::assertFalse(
- $this->actor->find(self::downloadItemInShareMenu())->isVisible());
+ $this->actor->find(self::downloadItemInShareMenu())->isVisible(),
+ "Download item in share menu is visible");
PHPUnit_Framework_Assert::assertTrue(
- $this->actor->find(self::directLinkItemInShareMenu())->isVisible());
+ $this->actor->find(self::directLinkItemInShareMenu())->isVisible(),
+ "Direct link item in share menu is not visible");
PHPUnit_Framework_Assert::assertTrue(
- $this->actor->find(self::saveItemInShareMenu())->isVisible());
+ $this->actor->find(self::saveItemInShareMenu())->isVisible(),
+ "Save item in share menu is not visible");
}
/**
diff --git a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php
index 8738e19b513..fb5e815447c 100644
--- a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php
+++ b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php
@@ -81,8 +81,8 @@ class ActionProviderStoreTest extends TestCase {
$this->serverContainer->expects($this->exactly(2))
->method('query')
->will($this->returnValueMap([
- [EMailProvider::class, $provider1],
- ['OCA\Contacts\Provider1', $provider2]
+ [EMailProvider::class, true, $provider1],
+ ['OCA\Contacts\Provider1', true, $provider2]
]));
$providers = $this->actionProviderStore->getProviders($user);
@@ -106,7 +106,7 @@ class ActionProviderStoreTest extends TestCase {
$this->serverContainer->expects($this->once())
->method('query')
->will($this->returnValueMap([
- [EMailProvider::class, $provider1],
+ [EMailProvider::class, true, $provider1],
]));
$providers = $this->actionProviderStore->getProviders($user);