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

Delete::deleteHub()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 12
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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