1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Page\Admin; |
4
|
|
|
|
5
|
|
|
use Facebook\WebDriver\Interactions\WebDriverActions; |
6
|
|
|
use Facebook\WebDriver\WebDriverBy; |
7
|
|
|
|
8
|
|
|
class ClassCategoryManagePage extends AbstractAdminPageStyleGuide |
9
|
|
|
{ |
10
|
|
|
|
11
|
|
|
public static $登録完了メッセージ = ['css' => '#page_admin_product_class_category > div > div.c-contentsArea > div.alert']; |
12
|
|
|
|
13
|
|
|
public static $分類名 = ['id' => 'admin_class_category_name']; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* ProductClassCategoryPage constructor. |
17
|
|
|
*/ |
18
|
|
|
public function __construct(\AcceptanceTester $I) |
19
|
|
|
{ |
20
|
|
|
parent::__construct($I); |
21
|
|
|
} |
22
|
|
|
|
23
|
|
|
public static function at($I) |
24
|
|
|
{ |
25
|
|
|
$page = new ClassCategoryManagePage($I); |
26
|
|
|
return $page->atPage('規格管理商品管理'); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
public function 入力_分類名($value) |
30
|
|
|
{ |
31
|
|
|
$this->tester->fillField(self::$分類名, $value); |
32
|
|
|
return $this; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function 分類作成() |
36
|
|
|
{ |
37
|
|
|
$this->tester->click('#form1 button'); |
38
|
|
|
return $this; |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
public function 一覧_編集($rowNum) |
42
|
|
|
{ |
43
|
|
|
$rowNum += 1; |
44
|
|
|
$this->tester->click("ul.list-group > li:nth-child(${rowNum}) a:nth-child(3)"); |
45
|
|
|
return $this; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function 一覧_入力_分類名($row, $value) |
49
|
|
|
{ |
50
|
|
|
$row += 1; |
51
|
|
|
$this->tester->fillField(['css' => "ul.list-group > li:nth-child(${row}) form input[type=text]"], $value); |
52
|
|
|
return $this; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function 一覧_分類作成($row) |
56
|
|
|
{ |
57
|
|
|
$row += 1; |
58
|
|
|
$this->tester->click("ul.list-group > li:nth-child(${row}) form button[type=submit]"); |
59
|
|
|
return $this; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
public function 一覧_削除($rowNum) |
63
|
|
|
{ |
64
|
|
|
$rowNum += 1; |
65
|
|
|
$this->tester->click("ul.list-group > li:nth-child(${rowNum}) a:nth-child(4)"); |
66
|
|
|
return $this; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function acceptModal($rowNum) |
70
|
|
|
{ |
71
|
|
|
$rowNum += 1; |
72
|
|
|
$this->tester->waitForElementVisible("ul.list-group > li:nth-child(${rowNum}) div.modal"); |
73
|
|
|
$this->tester->click("ul.list-group > li:nth-child(${rowNum}) div.modal a.btn-ec-delete"); |
74
|
|
|
return $this; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
public function 一覧_上に($rowNum) |
78
|
|
|
{ |
79
|
|
|
|
80
|
|
|
$rowNum += 1; |
81
|
|
|
$this->tester->dragAndDropBy("ul.list-group > li:nth-child(${rowNum})", 0, -60); |
82
|
|
|
return $this; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
public function 一覧_下に($rowNum) |
86
|
|
|
{ |
87
|
|
|
$rowNum += 1; |
88
|
|
|
$this->tester->dragAndDropBy("ul.list-group > li:nth-child(${rowNum})", 0, 60); |
89
|
|
|
return $this; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
public function 一覧_名称($rowNum) |
93
|
|
|
{ |
94
|
|
|
$rowNum += 1; |
95
|
|
|
return "ul.list-group > li:nth-child(${rowNum}) > div > div.col.d-flex.align-items-center"; |
96
|
|
|
} |
97
|
|
|
} |