Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
03309a00
Commit
03309a00
authored
Aug 23, 2018
by
Rebecca Blundell
Committed by
Cecilia Vela Gurovic
Sep 05, 2018
Browse files
Bug 1788532: Behat add text not in row step
behatnotneeded Change-Id: Icc43dc9697882bda25ba5b503b2fcf543914b4b2
parent
f68635ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/testing/frameworks/behat/classes/BehatGeneral.php
View file @
03309a00
...
...
@@ -498,6 +498,29 @@ EOF;
$this
->
ensure_node_is_visible
(
$elementnode
);
}
/**
* Checks the list/table row does not contain the specified text.
*
* @Then I should not see :text in the :rowtext row
* @param string $text we look for
* @param string $rowtext The list/table row text
* @throws ExpectationException
*/
public
function
not_in_row
(
$text
,
$rowtext
)
{
// The table row container.
try
{
$this
->
i_find_in_row
(
$text
,
$rowtext
);
$exists
=
true
;
}
catch
(
Exception
$e
)
{
$exists
=
false
;
}
if
(
$exists
)
{
throw
new
ExpectationException
(
'"'
.
$args
[
'text'
]
.
'" text was found in the "'
.
$args
[
'element'
]
.
'" element'
,
$context
->
getSession
());
}
}
/**
* Click on the link or button inside a list/table row containing the specified text.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment