Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Don't use deprecated jQuery size() function in behat #1298

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/behat/src/FixtureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function iShouldSeeTheFileStatusFlag()
// TODO This should wait for any XHRs and React rendering to finish
$this->getMainContext()->getSession()->wait(
1000,
"window.jQuery && window.jQuery('.editor__status-flag').size() > 0"
"window.jQuery && window.jQuery('.editor__status-flag').length > 0"
);

$page = $this->getMainContext()->getSession()->getPage();
Expand All @@ -114,7 +114,7 @@ public function iShouldNotSeeTheFileStatusFlag()
*/
public function iShouldSeeTheFileStatusIconWithTheClass($class)
{
$js = "window.jQuery && window.jQuery('.file-status-icon__icon').size() > 0";
$js = "window.jQuery && window.jQuery('.file-status-icon__icon').length > 0";
$this->getMainContext()->getSession()->wait(1000, $js);
$icon = $this->getMainContext()->getSession()->getPage()->find('css', "{$class}.file-status-icon__icon");
Assert::assertNotNull($icon, "File status icon '$class' could not be found");
Expand Down Expand Up @@ -171,7 +171,7 @@ public function iClickOnTheLatestHistoryItem()
{
$this->getMainContext()->getSession()->wait(
5000,
"window.jQuery && window.jQuery('.history-list__list li').size() > 0"
"window.jQuery && window.jQuery('.history-list__list li').length > 0"
);

$page = $this->getMainContext()->getSession()->getPage();
Expand Down