diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-11-20 17:09:52 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-11-20 21:15:46 +0100 |
commit | 0abff19aa91e4ba8bffd99b963fdb2b33a3d7639 (patch) | |
tree | 3493646aa18a841742eb4977efb7d91c4567a244 /tests | |
parent | baf709213669ced60ce6a234bc976be8e7689950 (diff) | |
download | nextcloud-server-0abff19aa91e4ba8bffd99b963fdb2b33a3d7639.tar.gz nextcloud-server-0abff19aa91e4ba8bffd99b963fdb2b33a3d7639.zip |
Rename "Notification" to "Toast"
Since Nextcloud 17 the proper name for the old built-in notifications is
"Toast". Moreover, this will reduce ambiguity when using the
"notification" term to refer to elements in the Notifications app.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/config/behat.yml | 4 | ||||
-rw-r--r-- | tests/acceptance/features/bootstrap/ToastContext.php (renamed from tests/acceptance/features/bootstrap/NotificationContext.php) | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 182629701e8..53633d9345a 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -19,12 +19,12 @@ default: - FilesAppContext - FilesAppSharingContext - LoginPageContext - - NotificationContext - PublicShareContext - SearchContext - SettingsContext - SettingsMenuContext - ThemingAppContext + - ToastContext - UsersSettingsContext filters: tags: "~@apache" @@ -48,12 +48,12 @@ default: - FilesAppContext - FilesAppSharingContext - LoginPageContext - - NotificationContext - PublicShareContext - SearchContext - SettingsContext - SettingsMenuContext - ThemingAppContext + - ToastContext - UsersSettingsContext filters: tags: "@apache" diff --git a/tests/acceptance/features/bootstrap/NotificationContext.php b/tests/acceptance/features/bootstrap/ToastContext.php index 717de4302da..28c81f8c50d 100644 --- a/tests/acceptance/features/bootstrap/NotificationContext.php +++ b/tests/acceptance/features/bootstrap/ToastContext.php @@ -23,33 +23,33 @@ use Behat\Behat\Context\Context; -class NotificationContext implements Context, ActorAwareInterface { +class ToastContext implements Context, ActorAwareInterface { use ActorAware; /** * @return Locator */ - public static function notificationMessage($message) { + public static function toastMessage($message) { return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' toastify ') and normalize-space(text()) = '$message']")-> - descendantOf(self::notificationContainer())-> - describedAs("$message notification"); + descendantOf(self::toastContainer())-> + describedAs("$message toast"); } /** * @return Locator */ - private static function notificationContainer() { + private static function toastContainer() { return Locator::forThe()->id("content")-> - describedAs("Notification container"); + describedAs("Toast container"); } /** - * @Then I see that the :message notification is shown + * @Then I see that the :message toast is shown */ - public function iSeeThatTheNotificationIsShown($message) { + public function iSeeThatTheToastIsShown($message) { PHPUnit_Framework_Assert::assertTrue($this->actor->find( - self::notificationMessage($message), 10)->isVisible()); + self::toastMessage($message), 10)->isVisible()); } } |