Completed
Push — 4.0 ( a8094a...5d4f47 )
by
unknown
09:10 queued 03:25
created

LayoutManagePage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 5
lcom 0
cbo 3

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A go() 0 6 1
A レイアウト編集() 0 4 1
A 削除() 0 7 1
A 新規登録() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Page\Admin;
15
16
class LayoutManagePage extends AbstractAdminPageStyleGuide
17
{
18
    public function __construct(\AcceptanceTester $I)
19
    {
20
        parent::__construct($I);
21
    }
22
23
    public static function go($I)
24
    {
25
        $page = new self($I);
26
27
        return $page->goPage('/content/layout', 'レイアウト管理コンテンツ管理');
28
    }
29
30
    public function レイアウト編集($layoutName)
31
    {
32
        $this->tester->click(['xpath' => "//*[@id=\"page_admin_content_layout\"]/div[1]/div[3]/div[2]/div/div//div/a[translate(text(), ' \r\n', '')='${layoutName}']"]);
33
    }
34
35
    public function 削除($layoutName)
36
    {
37
        $this->tester->getScenario()->incomplete('未実装:レイアウトの削除は未実装');
38
39
        $this->tester->click(['xpath' => "//div[@id='sortable_list_box__list']//div[@class='item_pattern td'][translate(text(), ' \r\n', '')='${layoutName}']/parent::node()/div[@class='icon_edit td']/div/span"]);
40
        $this->tester->click(['xpath' => "//div[@id='sortable_list_box__list']//div[@class='item_pattern td'][translate(text(), ' \r\n', '')='${layoutName}']/parent::node()/div[@class='icon_edit td']/div/ul/li[2]/span"]);
41
    }
42
43
    public function 新規登録()
44
    {
45
        $this->tester->click(['xpath' => "//*[@id=\"page_admin_content_layout\"]/div[1]/div[3]/div[2]/div/div/div[1]/a"]);
46
    }
47
}
48