<commit_before><?php

use Faker\Factory;

class TopicCest
{
    public function _before(AcceptanceTester $I)
    {
//        $I->login('admin', '<PASSWORD>');
    }

    public function _after(AcceptanceTester $I)
    {

    }

    public function createTopicWithEmptyContent(AcceptanceTester $I)
    {
        $I->wantTo('Create post with empty content');

        $I->amOnPage('/Forum');
        $I->click('Newbie');
        $I->click('Nowy wątek');

        $I->click('Wyślij');

        $I->wait(1);
        $I->see('Temat musi posiadać minimum 3 znaki długości.');
        $I->see('Proszę wpisać treść.');
        $I->see('Proszę wpisać nazwę użytkownika.');
    }

    // tests
    public function createTopic(AcceptanceTester $I)
    {
        $I->wantTo('Create new topic');
        $I->amOnPage('/Forum/Newbie/Submit');

        $fake = Factory::create();
        $text = $fake->text;
        $subject = $fake->title;

        $this->submit($I, $subject, $text, $fake->userName);

        $I->wait(1);
        $I->canSee($text);
        $I->seeInTitle($subject);
    }

    public function createTopicAndGetError(AcceptanceTester $I)
    {
        $I->wantTo('Try to create topic and get error message');
        $I->amOnPage('/Forum/Newbie/Submit');

        $fake = Factory::create();
        $this->submit($I, $fake->title, $fake->text, $fake->userName);
        $I->see('Musisz odczekać chwilę przed dodaniem kolejnego wpisu.');
    }

    private function submit(AcceptanceTester $I, $subject, $text, $username)
    {
        $I->fillField('user_name', $username);
        $I->fillField('subject', $subject);
        $I->fillField('text', $text);
        $I->click('Wyślij');
    }
}
<commit_msg>tworzenie watku jako zalogowany user<commit_after><?php

use Faker\Factory;

class TopicCest
{
    public function _before(AcceptanceTester $I)
    {
//        $I->login('admin', '123');
    }

    public function _after(AcceptanceTester $I)
    {

    }

    public function createTopicWithEmptyContent(AcceptanceTester $I)
    {
        $I->wantTo('Create post with empty content');

        $I->amOnPage('/Forum');
        $I->click('Newbie');
        $I->click('Nowy wątek');

        $I->click('Wyślij');

        $I->wait(1);
        $I->see('Temat musi posiadać minimum 3 znaki długości.');
        $I->see('Proszę wpisać treść.');
        $I->see('Proszę wpisać nazwę użytkownika.');
    }

    // tests
    public function createTopic(AcceptanceTester $I)
    {
        $I->wantTo('Create new topic');
        $I->amOnPage('/Forum/Newbie/Submit');

        $fake = Factory::create();
        $text = $fake->text;
        $subject = $fake->title;

        $this->submit($I, $subject, $text, $fake->userName);

        $I->wait(1);
        $I->canSee($text);
        $I->seeInTitle($subject);
    }

    public function createTopicAndGetError(AcceptanceTester $I)
    {
        $I->wantTo('Try to create topic and get error message');
        $I->amOnPage('/Forum/Newbie/Submit');

        $fake = Factory::create();
        $this->submit($I, $fake->title, $fake->text, $fake->userName);
        $I->see('Musisz odczekać chwilę przed dodaniem kolejnego wpisu.');
    }

    public function createTopicAsAuthenticatedUser(AcceptanceTester $I)
    {
        $I->wantTo('Create new topic as authenticated user');
        $I->login('admin', '123');
        $I->amOnPage('/Forum/Newbie/Submit');

        $fake = Factory::create();
        $text = $fake->text;
        $subject = $fake->title;

        $this->submit($I, $subject, $text);

        $I->wait(1);
        $I->canSee($text);
        $I->seeInTitle($subject);
    }

    private function submit(AcceptanceTester $I, $subject, $text, $username = null)
    {
        if ($username) {
            $I->fillField('user_name', $username);
        }

        $I->fillField('subject', $subject);
        $I->fillField('text', $text);
        $I->click('Wyślij');
    }
}

{'fraction_non_alphanumeric': 0.17551435102870205, 'fraction_numerical': 0.003302006604013208, 'mean_word_length': 2.448336252189142, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4245267', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1336, 'n_words': 244}