Completed
Push — apply-codeceptions ( 341052...a29855 )
by Kentaro
53:23 queued 21:51
created

AuthorityManagePage::入力()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Page\Admin;
5
6
class AuthorityManagePage extends AbstractAdminPageStyleGuide
7
{
8
    public static $完了メッセージ = '.c-contentsArea .alert-success';
9
10
    public function __construct(\AcceptanceTester $I)
11
    {
12
        parent::__construct($I);
13
    }
14
15
    public static function go(\AcceptanceTester $I)
16
    {
17
        $page = new self($I);
18
        return $page->goPage('/setting/system/authority', '権限管理システム設定');
19
    }
20
21
    public function 行追加()
22
    {
23
        $this->tester->click('form .add');
24
        return $this;
25
    }
26
27
    public function 行削除($rowNum)
28
    {
29
        $this->tester->click(['css' => "form #table-authority tbody tr:nth-child($rowNum) td:nth-child(3) button"]);
30
        return $this;
31
    }
32
33
    public function 入力($rowNum, $role, $url) {
34
        $this->tester->selectOption(['css' => "form #table-authority tbody tr:nth-child(${rowNum}) td:nth-child(1) select"], $role);
35
        $this->tester->fillField(['css' => "form #table-authority tbody tr:nth-child(${rowNum}) td:nth-child(2) input"], $url);
36
        return $this;
37
    }
38
39
    public function 登録()
40
    {
41
        $this->tester->click('form .c-conversionArea button');
42
        return $this;
43
    }
44
}