Code Duplication    Length = 11-13 lines in 2 locations

src/SilverStripe/BehatExtension/Context/BasicContext.php 2 locations

@@ 904-916 (lines=13) @@
901
    *
902
    * @Given /^I wait for (\d+) seconds until I see the "([^"]*)" element$/
903
    **/
904
    public function iWaitXUntilISee($wait, $selector)
905
    {
906
        $page = $this->getSession()->getPage();
907
908
        $this->spin(function ($page) use ($page, $selector) {
909
            $element = $page->find('css', $selector);
910
911
            if (empty($element)) {
912
                return false;
913
            } else {
914
                return $element->isVisible();
915
            }
916
        });
917
    }
918
919
    /**
@@ 927-937 (lines=11) @@
924
     *
925
     * @Given /^I wait until I see the "([^"]*)" element$/
926
     */
927
    public function iWaitUntilISee($selector)
928
    {
929
        $page = $this->getSession()->getPage();
930
        $this->spin(function ($page) use ($page, $selector) {
931
            $element = $page->find('css', $selector);
932
            if (empty($element)) {
933
                return false;
934
            } else {
935
                return ($element->isVisible());
936
            }
937
        });
938
    }
939
940
    /**