<commit_before><?php
/**
 * Client module for HiPanel
 *
 * @link      https://github.com/hiqdev/hipanel-module-client
 * @package   hipanel-module-client
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/)
 */

namespace hipanel\modules\client\tests\acceptance\admin\client;

use hipanel\helpers\Url;
use hipanel\tests\_support\Step\Acceptance\Admin;

class ContactInformationCest
{
    public function ensureThatContactInformationBlockWorks(Admin $I)
    {
        $I->login();
        $I->needPage(Url::to(['@client/view', 'id' => $I->id]));
        $I->seeLink('Details', Url::to(['@contact/view',  'id' => $I->id]));
        $I->seeLink('Change', Url::to(['@contact/update',  'id' => $I->id]));
        $key = 'data-resizable-column-id';
        $tbody = [
            [$key => 'name_with_verification',  'text' => 'Name',         'td' => 'Admin HiPanel'],
            [$key => 'organization',            'text' => 'Organization', 'td' => 'HiQDev'],
            [$key => 'email_with_verification', 'text' => 'Email',        'td' => '<EMAIL>'],
            [$key => 'abuse_email',             'text' => 'Abuse email',  'td' => '<EMAIL>'],
            [$key => 'messengers',              'text' => 'Messengers',   'td' => "Skype: hipanel_test_admin\n" .
                                                                                  "ICQ: 888777\n" .
                                                                                  "Jabber: <EMAIL>\n" .
                                                                                  "Telegram: hipanel_test_admin\n" .
                                                                                  'WhatsApp: 380932003040', ],
            [$key => 'social_net',              'text' => 'Social',       'td' => 'https://facebook.com/hipanel_test_admin'],
            [$key => 'voice_phone',             'text' => 'Phone',        'td' => '380932003040'],
            [$key => 'fax_phone',               'text' => 'Fax',          'td' => '380445203040'],
            [$key => 'street',                  'text' => 'Street',       'td' => '42 Foo str.'],
            [$key => 'city',                    'text' => 'City',         'td' => 'Bar'],
            [$key => 'province',                'text' => 'Province',     'td' => 'Kyiv'],
            [$key => 'postal_code',             'text' => 'Postal code',  'td' => '01001'],
            [$key => 'country_name',            'text' => 'Country',      'td' => 'Ukraine'],
        ];
        foreach ($tbody as $tr) {
            $I->seeElement(['css' => 'table tbody tr th'], [$key => $tr[$key]]);
            $I->see($tr['text'], "//table/tbody/tr/th[@$key='{$tr[$key]}']");
            if ($tr['td'] !== '') {
                $I->see($tr['td'], "//table/tbody/tr/th[@$key='{$tr[$key]}']/../td");
            }
        }
    }
}<commit_msg>Changed test according to changed Street to Address<commit_after><?php
/**
 * Client module for HiPanel
 *
 * @link      https://github.com/hiqdev/hipanel-module-client
 * @package   hipanel-module-client
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/)
 */

namespace hipanel\modules\client\tests\acceptance\admin\client;

use hipanel\helpers\Url;
use hipanel\tests\_support\Step\Acceptance\Admin;

class ContactInformationCest
{
    public function ensureThatContactInformationBlockWorks(Admin $I)
    {
        $I->login();
        $I->needPage(Url::to(['@client/view', 'id' => $I->id]));
        $I->seeLink('Details', Url::to(['@contact/view',  'id' => $I->id]));
        $I->seeLink('Change', Url::to(['@contact/update',  'id' => $I->id]));
        $key = 'data-resizable-column-id';
        $tbody = [
            [$key => 'name_with_verification',  'text' => 'Name',         'td' => 'Admin HiPanel'],
            [$key => 'organization',            'text' => 'Organization', 'td' => 'HiQDev'],
            [$key => 'email_with_verification', 'text' => 'Email',        'td' => '<EMAIL>'],
            [$key => 'abuse_email',             'text' => 'Abuse email',  'td' => '<EMAIL>'],
            [$key => 'messengers',              'text' => 'Messengers',   'td' => "Skype: hipanel_test_admin\n" .
                                                                                  "ICQ: 888777\n" .
                                                                                  "Jabber: <EMAIL>\n" .
                                                                                  "Telegram: hipanel_test_admin\n" .
                                                                                  'WhatsApp: 380932003040', ],
            [$key => 'social_net',              'text' => 'Social',       'td' => 'https://facebook.com/hipanel_test_admin'],
            [$key => 'voice_phone',             'text' => 'Phone',        'td' => '380932003040'],
            [$key => 'fax_phone',               'text' => 'Fax',          'td' => '380445203040'],
            [$key => 'street',                  'text' => 'Address',      'td' => '42 Foo str.'],
            [$key => 'city',                    'text' => 'City',         'td' => 'Bar'],
            [$key => 'province',                'text' => 'Province',     'td' => 'Kyiv'],
            [$key => 'postal_code',             'text' => 'Postal code',  'td' => '01001'],
            [$key => 'country_name',            'text' => 'Country',      'td' => 'Ukraine'],
        ];
        foreach ($tbody as $tr) {
            $I->seeElement(['css' => 'table tbody tr th'], [$key => $tr[$key]]);
            $I->see($tr['text'], "//table/tbody/tr/th[@$key='{$tr[$key]}']");
            if ($tr['td'] !== '') {
                $I->see($tr['td'], "//table/tbody/tr/th[@$key='{$tr[$key]}']/../td");
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.2046079779917469, 'fraction_numerical': 0.019944979367262722, 'mean_word_length': 1.491220556745182, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 117, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7586713', 'n_tokens_mistral': 1824, 'n_tokens_neox': 1710, 'n_words': 313}