<commit_before><?php

require_once 'unittests/selenium_tests/SeleniumTest.php';

class TransferExpiredTest extends SeleniumTest
{

    protected $start_url_path = '';
    

    public function testTransferExpired()
    {
        extract($this->getKeyBindings());

        $this->setupAuthenticated();
        
        $checkbox = $this->byCssSelector('[name="get_a_link"]');
        if (!$checkbox->selected()) {
            $checkbox->click();
        }
        
        ${"temp"} = $this->execute(array('script' => "var file_upload_container = document.getElementsByClassName('file_selector')[0];file_upload_container.style.display='block';", 'args' => array()));

        $this->setMaxTransferFileSize(1024);
        
        $test1_file = "unittests/selenium_tests/assets/124bytes.txt";
        $test1_file_data = file_get_contents($test1_file);
        $this->sendKeys($this->byCssSelector(".file_selector input[name=\"files\"]"), $test1_file);

        $test2_file = "unittests/selenium_tests/assets/125bytes.txt";
        $test2_file_data = file_get_contents($test2_file);
        $this->sendKeys($this->byCssSelector(".file_selector input[name=\"files\"]"), $test2_file);

        $this->byCssSelector('.start.ui-button')->click();


        $this->waitUntil(function(){
            $elements = $this->elements($this->using('css selector')->value('.ui-dialog-content.ui-widget-content.success'));
            $count = count($elements);
            if($count > 0)
            {
                return true;
            }
        }, 10000);


        $url = trim($this->byCssSelector('.ui-dialog-content.ui-widget-content.success textarea')->value());

        $this->checkDownloadUrl($url, [$test1_file_data, $test2_file_data]);
    }
}<commit_msg>adding a waiting time to the transfer expired test<commit_after><?php

require_once 'unittests/selenium_tests/SeleniumTest.php';

class TransferExpiredTest extends SeleniumTest
{

    protected $start_url_path = '';
    

    public function testTransferExpired()
    {
        extract($this->getKeyBindings());

        $this->setupAuthenticated();
        
        $checkbox = $this->byCssSelector('[name="get_a_link"]');
        if (!$checkbox->selected()) {
            $checkbox->click();
        }
        
        ${"temp"} = $this->execute(array('script' => "var file_upload_container = document.getElementsByClassName('file_selector')[0];file_upload_container.style.display='block';", 'args' => array()));

        $this->setMaxTransferFileSize(1024);
        
        $test1_file = "unittests/selenium_tests/assets/124bytes.txt";
        $test1_file_data = file_get_contents($test1_file);
        $this->sendKeys($this->byCssSelector(".file_selector input[name=\"files\"]"), $test1_file);

        $test2_file = "unittests/selenium_tests/assets/125bytes.txt";
        $test2_file_data = file_get_contents($test2_file);
        $this->sendKeys($this->byCssSelector(".file_selector input[name=\"files\"]"), $test2_file);

        $this->byCssSelector('.start.ui-button')->click();


        $this->waitUntil(function(){
            $elements = $this->elements($this->using('css selector')->value('.ui-dialog-content.ui-widget-content.success'));
            $count = count($elements);
            if($count > 0)
            {
                return true;
            }
        }, 10000);

       
        $this->waitUntil(function(){

            $elements = $this->elements($this->using('css selector')->value('.ui-dialog-content.ui-widget-content.success textarea'));

            if(count($elements) > 0){
                $container = array_pop($elements);
                $url = $container->value();

                return true;
            }   
        }, 10000);

        $this->checkDownloadUrl($url, [$test1_file_data, $test2_file_data]);
    }
}
{'fraction_non_alphanumeric': 0.1642221058145626, 'fraction_numerical': 0.01571503404924044, 'mean_word_length': 2.83049147442327, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '976197', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1118, 'n_words': 137}