Completed
Push — master ( 9fec5b...0ee870 )
by Andrii
06:47 queued 10s
created

Delete   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A deleteHub() 0 12 1
1
<?php
2
3
namespace hipanel\modules\server\tests\_support\Page\Hub;
4
5
use hipanel\helpers\Url;
6
7
class Delete extends Hub
8
{
9
    public function deleteHub(string $name): self
10
    {
11
        $I = $this->tester;
12
13
        $I->click("//a[contains(text(), 'Delete')]");
14
        $I->seeInPopup('Are you sure you want to delete this item?');
15
        $I->acceptPopup();
16
        $I->seeInCurrentUrl(Url::to('@hub/index'));
17
        $I->seeInTitle('Switches');
18
        $I->cantSee($name);
19
20
        return $this;
21
    }
22
}
23