Completed
Push — 4.0 ( 87d096...bcc1be )
by Kiyotaka
05:44 queued 11s
created

codeception/_support/Page/Admin/NewsManagePage.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.ec-cube.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 NewsManagePage extends AbstractAdminPage
17
{
18
    public static $登録完了メッセージ = '.c-container .c-contentsArea .alert-success';
19
20
    /**
21
     * ContentsRegisterPage constructor.
22
     */
23
    public function __construct(\AcceptanceTester $I)
24
    {
25
        parent::__construct($I);
26
    }
27
28
    public static function go($I)
29
    {
30
        $page = new self($I);
31
32
        return $page->goPage('/content/news', 'コンテンツ管理新着情報管理');
33
    }
34
35
    public static function at($I)
36
    {
37
        $page = new self($I);
38
39
        return $page->atPage('コンテンツ管理新着情報管理');
40
    }
41
42
    public function 新規登録()
43
    {
44
        $this->tester->click('.c-contentsArea .c-contentsArea__cols .c-contentsArea__primaryCol .justify-content-between #addNew
45
        ');
46
    }
47
48
    public function 一覧_編集($rowNum)
49
    {
50
        $this->tester->click(" ul .list-group li:nth-child(${rowNum})
51
     div > div :nth-child(4) > a");
52
53
        return $this;
54
    }
55
56
    public function 一覧_タイトル($rowNum)
57
    {
58
        return $this->tester->grabTextFrom(['css' => "ul.list-group li:nth-child(${rowNum}) div > div:nth-child(4) a"]);
59
    }
60
61
    public function 一覧_下へ($rowNum)
62
    {
63
        $this->tester->click(" ul .list-group li:nth-child(${rowNum})
64
     div > div :nth-child(4) > a");
65
66
        return $this;
67
    }
68
69
    public function 一覧_削除($rowNum)
70
    {
71
        $this->tester->click("ul.list-group li:nth-child(${rowNum}) div > div:nth-child(5) > div > div:nth-child(3) > a.btn-ec-actionIcon");
72
73
        return $this;
74
    }
75
76 View Code Duplication
    public function ポップアップを受け入れます($rowNum)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
77
    {
78
        $modal = "ul.list-group li:nth-child(${rowNum}) div > div:nth-child(5) > div > div:nth-child(3) div.modal";
79
        $this->tester->waitForElementVisible(['css' => $modal]);
80
        $this->tester->click($modal.' .modal-footer a.btn-ec-delete');
81
82
        return $this;
83
    }
84
}
85