Code Duplication    Length = 18-21 lines in 2 locations

src/Oro/Bundle/NoteBundle/Tests/Selenium/Pages/Notes.php 1 location

@@ 22-39 (lines=18) @@
19
    /**
20
     * @return $this
21
     */
22
    public function addNote()
23
    {
24
        if ($this->isElementPresent("//div[@class='pull-right']//a[@class='btn dropdown-toggle']")) {
25
            $this->runActionInGroup('Add note');
26
        } else {
27
            $this->test->byXPath(
28
                "//div[@class='pull-right title-buttons-container']//a[@id='add-entity-note-button']"
29
            )->click();
30
            $this->waitForAjax();
31
            $this->assertElementPresent(
32
                "//div[contains(@class,'ui-dialog-titlebar')]".
33
                "/span[normalize-space(.)='Add note']",
34
                'Add Note window is not opened'
35
            );
36
        }
37
38
        return $this;
39
    }
40
41
    /**
42
     * @param string $note

src/Oro/Bundle/UserBundle/Tests/Selenium/Pages/User.php 1 location

@@ 350-370 (lines=21) @@
347
        );
348
    }
349
350
    public function checkHistoryWindow()
351
    {
352
        $this->test->byXpath(
353
            "//div[@class='navigation clearfix navbar-extra navbar-extra-right']//a[contains(., 'Change History')]"
354
        )->click();
355
        $this->waitForAjax();
356
        $this->assertElementPresent(
357
            "//div[@class='ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable " .
358
            "ui-dialog-normal']"
359
        );
360
        $this->test->byXpath(
361
            "//div[@class='ui-dialog-titlebar-buttonpane']/button[@title='close']"
362
        )->click();
363
        $this->waitForAjax();
364
        $this->assertElementNotPresent(
365
            "//div[@class='ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable " .
366
            "ui-dialog-normal']"
367
        );
368
369
        return $this;
370
    }
371
372
    /**
373
     * Method configure user IMAP sync