diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-07-29 23:18:08 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-07-29 23:18:08 +0200 |
commit | fff85cab2eac394c41e1c3f88ed9bd3d41f2b895 (patch) | |
tree | a7421e563922b82e2627850c7163e99826f68efd /tests/acceptance | |
parent | 0d78ee1b8530d31530cad2e87b4b68211c9f9ea4 (diff) |
Filter system messages in acceptance tests
The specification of acceptance tests for chats do not take into account
the system messages, so now the selector for chat messages filters them
out and leaves only messages sent by users.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance')
-rw-r--r-- | tests/acceptance/features/bootstrap/ChatContext.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/acceptance/features/bootstrap/ChatContext.php b/tests/acceptance/features/bootstrap/ChatContext.php index a016dc628..f5c90a80a 100644 --- a/tests/acceptance/features/bootstrap/ChatContext.php +++ b/tests/acceptance/features/bootstrap/ChatContext.php @@ -100,7 +100,7 @@ class ChatContext implements Context, ActorAwareInterface { * @return Locator */ public static function chatMessage($chatAncestor, $number) { - return Locator::forThe()->xpath("li[$number]")-> + return Locator::forThe()->xpath("li[not(contains(concat(' ', normalize-space(@class), ' '), ' systemMessage '))][$number]")-> descendantOf(self::chatMessagesList($chatAncestor))-> describedAs("Chat message $number in the list of received messages"); } @@ -109,7 +109,7 @@ class ChatContext implements Context, ActorAwareInterface { * @return Locator */ public static function groupedChatMessage($chatAncestor, $number) { - return Locator::forThe()->xpath("li[position() = $number and contains(concat(' ', normalize-space(@class), ' '), ' grouped ')]")-> + return Locator::forThe()->xpath("li[not(contains(concat(' ', normalize-space(@class), ' '), ' systemMessage '))][position() = $number and contains(concat(' ', normalize-space(@class), ' '), ' grouped ')]")-> descendantOf(self::chatMessagesList($chatAncestor))-> describedAs("Grouped chat message $number in the list of received messages"); } |