Code Duplication    Length = 15-15 lines in 2 locations

src/Oro/Bundle/SalesBundle/Tests/Selenium/Pages/Lead.php 1 location

@@ 201-215 (lines=15) @@
198
        return $this->employees->value();
199
    }
200
201
    public function setCampaign($campaign)
202
    {
203
        $this->test->moveto($this->campaign);
204
        $this->campaign->click();
205
        $this->waitForAjax();
206
        $this->test->byXpath("//div[@id='select2-drop']/div/input")->value($campaign);
207
        $this->waitForAjax();
208
        $this->assertElementPresent(
209
            "//div[@id='select2-drop']//div[contains(., '{$campaign}')]",
210
            "Campaign autocomplete doesn't return search value"
211
        );
212
        $this->test->byXpath("//div[@id='select2-drop']//div[contains(., '{$campaign}')]")->click();
213
214
        return $this;
215
    }
216
217
    public function setAddressPrimary($value, $addressId = 0)
218
    {

src/Oro/Bundle/SalesBundle/Tests/Selenium/Pages/SalesFunnel.php 1 location

@@ 33-47 (lines=15) @@
30
        return $this;
31
    }
32
33
    public function setLead($lead)
34
    {
35
        $this->lead = $this->test->byXpath("//div[starts-with(@id,'s2id_oro_workflow_transition_lead')]/a");
36
        $this->lead->click();
37
        $this->waitForAjax();
38
        $this->test->byXpath("//div[@id='select2-drop']/div/input")->value($lead);
39
        $this->waitForAjax();
40
        $this->assertElementPresent(
41
            "//div[@id='select2-drop']//div[contains(., '{$lead}')]",
42
            "Lead autocomplete doesn't return search value"
43
        );
44
        $this->test->byXpath("//div[@id='select2-drop']//div[contains(., '{$lead}')]")->click();
45
46
        return $this;
47
    }
48
49
    public function selectEntity($type, $entity)
50
    {