From dd5b39e6b8d74c62575601039090b1187c18d8d0 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 6 Oct 2022 14:40:57 +1300 Subject: [PATCH] MNT Don't use deprecated jQuery size() function in behat (#10524) --- tests/behat/src/CmsUiContext.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/behat/src/CmsUiContext.php b/tests/behat/src/CmsUiContext.php index 1b861a33d..62504e63b 100644 --- a/tests/behat/src/CmsUiContext.php +++ b/tests/behat/src/CmsUiContext.php @@ -141,7 +141,7 @@ class CmsUiContext implements Context { $this->getSession()->wait( 5000, - "window.jQuery && window.jQuery('.cms-content-header-tabs').size() > 0" + "window.jQuery && window.jQuery('.cms-content-header-tabs').length > 0" ); $page = $this->getSession()->getPage(); @@ -155,8 +155,8 @@ class CmsUiContext implements Context { $this->getSession()->wait( 5000, - "window.jQuery && window.jQuery('.cms-content-toolbar').size() > 0 " - . "&& window.jQuery('.cms-content-toolbar').children().size() > 0" + "window.jQuery && window.jQuery('.cms-content-toolbar').length > 0 " + . "&& window.jQuery('.cms-content-toolbar').children().length > 0" ); $page = $this->getSession()->getPage(); @@ -170,7 +170,7 @@ class CmsUiContext implements Context { $this->getSession()->wait( 5000, - "window.jQuery && window.jQuery('.cms-tree').size() > 0" + "window.jQuery && window.jQuery('.cms-tree').length > 0" ); $page = $this->getSession()->getPage(); @@ -281,7 +281,7 @@ class CmsUiContext implements Context // Wait until context menu has appeared $this->getSession()->wait( 1000, - "window.jQuery && window.jQuery('.jstree-apple-context').size() > 0" + "window.jQuery && window.jQuery('.jstree-apple-context').length > 0" ); $regionObj = $context->getRegionObj('.jstree-apple-context'); Assert::assertNotNull($regionObj, "Context menu could not be found"); @@ -448,7 +448,7 @@ SCRIPT { $this->getSession()->wait( 5000, - "window.jQuery && window.jQuery('.ui-tabs-nav').size() > 0" + "window.jQuery && window.jQuery('.ui-tabs-nav').length > 0" ); $page = $this->getSession()->getPage(); @@ -477,7 +477,7 @@ SCRIPT { $this->getSession()->wait( 5000, - "window.jQuery && window.jQuery('.ui-tabs-nav').size() > 0" + "window.jQuery && window.jQuery('.ui-tabs-nav').length > 0" ); $page = $this->getSession()->getPage();