<commit_before><?php
/**
 * @group selenium
 */
class Vps_Connection_ErrorTest extends Vps_Test_SeleniumTestCase
{
    public function setUp()
    {
        parent::setUp();
        $this->setTimeout(120000);
    }
    public function testErrorDisplayErrorsFalse()
    {
        $this->_testError(false);
    }

    public function testErrorDisplayErrorsTrue()
    {
        $this->_testError(true);
    }

    private function _testError($errors) {
        $this->open('/vps/test/vps_connection_test');
        $this->click("//button[text()='testA']");
        $this->waitForConnections();
        if ($errors) $this->runScript('function foo() {Vps.Debug.displayErrors = false; Vps.log("selenium: "+Vps.Debug.displayErrors); }; foo();');
        $this->click("//button[text()='".trlVps('Retry')."']");
        $this->waitForConnections();
        $this->click("//button[text()='".trlVps('Abort')."']");
        $this->assertEquals("abort", $this->getText('id=abort'));


    }

    public function testSuccess()
    {
        $this->open('/vps/test/vps_connection_test');
        $this->click("//button[text()='testB']");
        $this->waitForConnections();
        $this->assertEquals("success", $this->getText('id=success'));
    }

    public function testMoreRequests()
    {
        $this->markTestIncomplete();

        $this->open('/vps/test/vps_connection_test');
        $this->click("//button[text()='testC']");
        $this->waitForConnections();
        // $this->click("//button[text()='Retry']");
        /*$this->click("dom=function foo() {
        var ret;
        Ext.ComponentMgr.all.each(function(c) {
            if (c instanceof Ext.Window && c.title == 'exceptionError') {
                c.buttons.each(function (b) {
                    if (b.text == 'Retry') {
                        ret = b.el.dom;
                    }
                });
            }
         });
         return ret;
         }
        foo();");
       // $this->getText(//)
        //$this->click("////button[text()='Abort']");
    }
}
<commit_msg>ausbau der test für test und lokalen server<commit_after><?php
/**
 * @group selenium
 */
class Vps_Connection_ErrorTest extends Vps_Test_SeleniumTestCase
{
    public function setUp()
    {
        parent::setUp();
        $this->setTimeout(120000);
    }
    public function testErrorDisplayErrorsFalse()
    {
        $this->_testError(false);
    }

    public function testErrorDisplayErrorsTrue()
    {
        $this->_testError(true);
    }

    private function _testError($errors) {
        $this->open('/vps/test/vps_connection_test');
        $this->click("//button[text()='testA']");
        $this->waitForConnections();
        if ($errors) $this->runScript('function foo() {Vps.Debug.displayErrors = false; Vps.log("selenium: "+Vps.Debug.displayErrors); }; foo();');
        $this->click("//button[text()='".trlVps('Retry')."']");
        $this->waitForConnections();
        $this->click("//button[text()='".trlVps('Abort')."']");
        $this->assertEquals("abort", $this->getText('id=abort'));


    }

    public function testSuccess()
    {
        $this->open('/vps/test/vps_connection_test');
        $this->click("//button[text()='testB']");
        $this->waitForConnections();
        $this->assertEquals("success", $this->getText('id=success'));
    }

    public function testMoreRequests()
    {
        $this->markTestIncomplete();

        $this->open('/vps/test/vps_connection_test');
        $this->click("//button[text()='testC']");
        $this->waitForConnections();
        // $this->click("//button[text()='Retry']");
        /*$this->click("dom=function foo() {
        var ret;
        Ext.ComponentMgr.all.each(function(c) {
            if (c instanceof Ext.Window && c.title == 'exceptionError') {
                c.buttons.each(function (b) {
                    if (b.text == 'Retry') {
                        ret = b.el.dom;
                    }
                });
            }
         });
         return ret;
         }
        foo();");
       // $this->getText(//)
        //$this->click("////button[text()='Abort']");*/
    }
}

{'fraction_non_alphanumeric': 0.196903725205612, 'fraction_numerical': 0.002902757619738752, 'mean_word_length': 2.243137254901961, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, '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': '3292302', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1254, 'n_words': 165}